Aws Lambda And Cloudwatch Events Lab

1 minute read

AWS Lambda function and Amazon CloudWatch event are best practice to control EC2 instances start or stop. They trigger the function every minute. AWS Lambda is the code function what you want to set up with Amazon S3, CloudWatch, DynamoDB, etc. It executes code in response to triggers such as change in the actions by user or shifts in system states. AWS Lambda can allow you to build application that respond quickly to new information that upload application code as function and run code to control cloud infrastructure. AWS Lambda can limit and trigger function to stop EC2 instances for saving money. Don’t waste your money if your EC2 instance keep running for longer! I noticed AWS CloudWatch Events/EventBridge in the scroll bar during Vocareum Activity – AWS Lambda lab. I think CloudWatch Events and EventBridge are same thing but EventBridge offers more features. AWS CloudWatch Events delivers the real-time system events that it can control EC2 instances, Lambda functions, many AWS services you want. It schedules automated actions that self-trigger at certain times using cron or rate expressions. Best practice is to create Lambda function and choose CloudWatch events then type out code and save it. It targets EC2 instance ID and set up time every minute to trigger the function as stopping EC2 instance. Best practice lab helps saving money.

AWS EventBridge is a serverless event bus that makes it easy to connect application together using data from own application. It is similar as CloudWatch Events. AWS EventBridge delivers real-time data from event sources and routes data to target AWS Lambda. It can set up routing rules to determine where to send data to build application architectures that react in real time to all of data sources. It makes easy to build event-driver applications and can take care of event, delivery, security, authorization, and error handling for you. AWS EventBridge benefits are connect data from SaaS apps, write less code, easily build event-driven architectures, and reduce operational overhead. I will learn more about AWS EventBridge later!

Updated: