-
Notifications
You must be signed in to change notification settings - Fork 1
added sns support and workaround for route53 api limit #16
Conversation
|
Added a missing carriage return at the end of the file and incremented version to 0.1.20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cho00013 Is this code ready to go (other than the couple of minor changes)?
yeah should be good to go. If you want to test the SNS, don't forget to add the SNS topic resource via TF and adjust the IAM role permission for the Lambda. |
Let me address the SNS topic suggestions you have.. Give me few mins to add to the merge request |
|
Can I add something to the SNS policy to allow the lambda to use it, or do I have to add to the lambda role policy to access the SNS? |
- SNS code prep
- SNS resource prep
- refactor the route53 API calls
- add better API timeouts
- new variables:
- sns_topic_name
- sqs_queue_name
- enable_sns
- enable_sqs
Prob can do it via SNS resource policy, but it's easier and more manageable to do it via IAM Role Permission attached the Lambda. The resource policy is usually used to cross-account access as well as doing it grant to AWS service directly and also doing Deny statement with Condition. I would recommend modifying the Lambda Role IAM permission. |
Ok, that is how I set it up (if |
I did check your SNS Resource policy and it looks good - looks the same as default one. It appears that you need to grant perms to both Resource policy AND the IAM principal. So we'll need to add the Lambda Role Permission. Something like this... adding the Sid to the existing inline policy attached to the Lambda ROle. |
from lib2to3.pgen2.pgen import DFAStateNOTE: In my testing (terminating instance), I was able to get 50 simultaneous without an issue. The highest WAIT retry observed was 4 (meaning, it waited 4 times which is 10 seconds) so with the SDK wait of 5 times, that means that the particular instance retried at least 20 (5x4) due to API limit. I think we should be able to support and handle much higher than 50 instances.
delete_recordsvariable to track deletion of ALL Route53 records correctly. If one failed, then retain the DDB item in case we need the meta-data to delete things properly.change_batch).Code /TF changes required
Env Variable for the Lambda function - add: