aws-samples / aws-lambda-lifecycle-hooks-function

Using Auto Scaling lifecycle hooks, Lambda, and EC2 Run Command
Apache License 2.0
102 stars 61 forks source link

Add a CloudFormation template #2

Closed chris-redekop closed 6 years ago

chris-redekop commented 7 years ago

Thanks for a great lab. I wrote a CloudFormation template as I followed the instructions. Would you like to include it with the README and the Python script?

diegonat commented 6 years ago

Chris, can your pull have a separate lambda python script? In this way, I do not need to change lambda_backup.py for a few reasons.

chris-redekop commented 6 years ago

Sure, I can remove the python script.

This will create an issue, though, where the master version of the python script won't find the SSM Document when it looks for it as ASGLogBackup. (I don't see a way to provide ASGLogBackup or any name to the AWS::SSM::Document resource in CFn.)

(How) do you want to address this before merging this branch?

diegonat commented 6 years ago

I would like to have two different scripts one for the cloudformation template and the other as it is now. The one for CF would be the one you provided that gets the name from the ENV.

chris-redekop commented 6 years ago

I moved the CFn files to their own CFn directory, leaving the original lambda_backup.yaml file as-is.

diegonat commented 6 years ago

Thank you a lot! Great work!