Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 627 Bytes

README.md

File metadata and controls

11 lines (6 loc) · 627 Bytes

LambdaCodeToStopEC2

This Lambda Code Stop Running EC2 Instance which have specific Tag.

Steps to create Schedule to stop EC2 Instances in AWS

  1. Create Lambda as per lambda_function.py code(Python 3.7)

  2. Schedule CloudWatch Trigger in Lambda with Schedule expression: cron(01 15 * * ? *) . This will trigger lambda function every day on 9:01 PM

  3. Add Tag(Mention in cunstom_filter) in EC2 instace so that code identify the same.