aws-samples / aws-lambda-ddns-function

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

Scalr (opensource version) adds tag too late (I think) #3

Closed ghost closed 7 years ago

ghost commented 8 years ago

I am testing Scalr for launching instances. I have tested it having Scalr add the tag for CNAME. However, I think the tag is getting added too late for the lambda function to pick it up properly.

This is the log:

START RequestId: 58a34117-40ae-11e6-929c-23df89031780 Version: $LATEST 
DynamoDB table already exists 
The reverse lookup zone for this instance is: 0.10.10.in-addr.arpa. 
DNS hostnames enabled for vpc-eea5d48a 
DNS support enabled for vpc-eea5d48a 
Reverse lookup zone found: 0.10.10.in-addr.arpa. 
Reverse lookup zone ZTRE2RXR9RUPC is associated with VPC vpc-eea5d48a 
Private zone found nxt.panosoft.com. 
Private hosted zone ZYLLXXMYRQLX9 is associated with VPC vpc-eea5d48a 
Updating A record ip-10-10-0-95 in zone nxt.panosoft.com.  
Updating PTR record 95.0.10.10. in zone in-addr.arpa  
No matching zone for AmazonProvidedDNS. 
END RequestId: 58a34117-40ae-11e6-929c-23df89031780
jicowan commented 8 years ago

You can add a time.sleep() function to the beginning of the Lambda function to wait a few seconds. You may need to experiment with the length of time to wait. Tags are applied to instances after the instance is instantiated.

ghost commented 8 years ago

added "time.sleep (10)" on line 9. Worked perfectly. Thanks.

On Sat, Jul 2, 2016 at 6:41 PM, Jeremy Cowan notifications@github.com wrote:

You can add a time.sleep() function to the beginning of the Lambda function to wait a few seconds. You may need to experiment with the length of time to wait. Tags are applied to instances after the instance is instantiated.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/awslabs/aws-lambda-ddns-function/issues/3#issuecomment-230130516, or mute the thread https://github.com/notifications/unsubscribe/ARA0THqyBFQoT6nJPNP2CntD797NFS_Mks5qRxNYgaJpZM4JDxio .

Laurie Kepford Cloud DevOps Engineer Panoramic Software 760-712-2266