Lambda function reaches max timeout limit (5min) in diff_zones()
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start by profiling diff_zones() while processing a zone of roughly 43,500 records, focusing on traversal and comparison of dns.zone.Zone nodes and records before the differences loop. Confirm that the AXFR request is not the bottleneck, and define done as generating the differences list without hitting the five-minute Lambda timeout; update_resource_record() is reached only afterward.
Written by the indexing model from the issue text.
Description
When running this Lambda function to mirror a zone containing a large amount of DNS records (~43500), it reaches max Lambda timeout limit of 5 minutes inside function diff_zones().
The DNS AXFR request returns within 500 to 1000 milliseconds with dig, returning the 40k records very fast. The problem lies in the python code which needs to parse through all the dns.zone.Zone nodes, records, etc... and diff them to build the differences list.
The code never even gets to the looping over differences and running update_resource_record() to make changes to Route53.
It's hard to believe that the python code is so slow to generate a list of DNS zone differences. I can imagine a simple bash script using dig and diff that would be much more efficient to perform the same function for this portion of the Lambda code.
- Dominant language
- Python
- Stars
- 41
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws-samples/aws-lambda-mirror-dns-function
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
aws-samples/aws-lambda-mirror-dns-function#3 · 1 comment · 3 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
aws-samples/aws-lambda-mirror-dns-function#2 · 1 comment ·
All issues in aws-samples/aws-lambda-mirror-dns-function
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100