- lambda_function.py - python based lambda function for scheduling EC2 shutdown/startup
- requirements.txt - python dependencies for lambda
- template.yaml - AWS SAM template to build function and related IAM Role
- buildspec.yml - CodeBuild template to provision/update function using AWS SAM
sam build
sam package --s3-bucket <s3_bucket> --s3-prefix sampkg-code --output-template-file packaged.yaml
sam deploy --template-file packaged.yaml --stack-name <stack_name> --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM
aws cloudformation delete-stack --stack-name <stack_name>