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

Everything looks good until the aws ssm send-command is invoked from lambda funciton #13

Closed njchandu closed 4 years ago

njchandu commented 4 years ago

Thanks for the script, solves a good problem.

Everything looks good until https://github.com/aws-samples/aws-lambda-lifecycle-hooks-function/blob/master/cloudformation/lambda_backup.py#L61

An error occurred (InvalidInstanceId) when calling the SendCommand operation:

Screen Shot 2019-11-01 at 12 50 44 PM

I tried to manually execute the aws ssm send-command --instance-ids "i-0657394a515364bd0" --document-name "ASGLogBackup1" --timeout "120" --region us-east-1 from the new instance on the instance which is in terminate:wait state and got the same response.

njchandu commented 4 years ago

Apologies, invalid issue. Closing it.