0

I have deployed an AWS Lambda with Python 3.6 and CloudFormation executing a scheduled task which writes a JSON file once a minute to an S3 bucket. Now I wonder if this is a good way of doing it, or if an automation tool such as Ansible would be better suited for the task?

The background is that I am developing a PoC for data analysis.

0

CloudFormation by itself has no way to schedule execution every minute. CloudFormation is great to create AWS resources, like Lambda, but not execute them.

There is another facility in AWS that allows scheduling execution of Lambda functions, it is called “CloudWatch Events”. You can set it to run the Lambda every minute, and you can create the rule for CWE using CloudFormation.

Ansible is similar to CloudFormation in this regard, it can create resources - but has no mechanism to do scheduled executions, only setup some other resource to execute on a schedule.

0

CloudFormation is service that allows you to create your infrastructure from code to automate your deployments.

You can set up a rule to run an AWS Lambda function on a schedule by using CloudWatch event. https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/RunLambdaSchedule.html

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.