aws-samples / aws-lambda-ddns-function

Dynamically create Route 53 resource records using CloudWatch Events and Lambda
Apache License 2.0
236 stars 115 forks source link

Auto Scaling Group EC2 Instances fail to return tags #5

Closed lngarrett closed 7 years ago

lngarrett commented 8 years ago

When an ASG creates instances it propagates the tags at launch. Unlike a manually created instance, these tags are not written to the instance until after the event fires. This introduces a race condition where when the Lambda function pulls tags for the instance none are available.

I believe a 60 second sleep would resolve this.

egalano commented 7 years ago

I am also seeing this issue on regular non auto-scaled instances.

jicowan commented 7 years ago

Try adding a line to sleep or increase the sleep time.