- Newest
- Most votes
- Most comments
The issue you're experiencing with AWS SAM CodeDeploy Lambda deployment failures is related to the number of Lambda functions being deployed simultaneously and the resulting API request limits being exceeded. This is a known challenge when deploying a large number of Lambda functions, especially with versioning enabled.
Lambda versioning and CodeDeploy are designed to work with multiple functions, but there are practical limits due to API request quotas. In your case, with 29 Lambda functions and versioning enabled, you're hitting these limits during deployment.
To address this issue, consider the following approaches:
-
Staggered Deployments: Instead of deploying all 29 functions at once, split them into smaller groups and deploy them in stages. This can help reduce the number of simultaneous API calls to Lambda.
-
Increase Deployment Duration: If possible, adjust the deployment configuration to spread the updates over a longer period. This can help reduce the API call frequency.
-
Reduce Versioning Frequency: If feasible, consider reducing the frequency of creating new versions for functions that don't change often.
-
Use Canary Deployments: Implement canary deployments for critical functions, which can help reduce the number of simultaneous updates.
-
Optimize Lambda Configuration: Review and optimize your Lambda function configurations to reduce unnecessary API calls during deployment.
-
AWS Support: If these solutions don't resolve the issue, consider reaching out to AWS Support for guidance on handling deployments with a large number of Lambda functions.
It's important to note that while Lambda versioning and CodeDeploy can work with a high number of functions, there are practical limits due to API quotas. Your approach of splitting deployments or reducing the number of functions updated simultaneously might be necessary for reliable deployments with this many functions.
Remember, the 15 requests per second quota for Lambda API calls is a hard limit and cannot be increased. Therefore, managing your deployment strategy to work within this constraint is crucial for successful large-scale Lambda deployments.
Sources
Error codes for AWS CodeDeploy - AWS CodeDeploy
Error while deploying the HTTP API + Lambda using AWS SAM | AWS re:Post
answered 2 years ago
Relevant content
asked 2 years ago
