New serverless pattern: sqs to lambda managed instance with provisioned mode esm#3001
New serverless pattern: sqs to lambda managed instance with provisioned mode esm#3001kasacis wants to merge 2 commits intoaws-samples:mainfrom
Conversation
d8e4358 to
2539b22
Compare
| CapacityProviderConfig: | ||
| Arn: !GetAtt CapacityProvider.Arn | ||
| # Memory-to-vCPU ratio per execution environment: 2, 4, or 8 GiB/vCPU | ||
| # Must not exceed the function's total memory (512 MB here = 0.5 GiB, |
There was a problem hiding this comment.
512 MB here = 0.5 GiB but Globals.
Function.MemorySize is actually 2048 (2 GiB). The configuration is valid, 2 GiB memory with a 2:1 ratio yields 1 vCPU, which meets the LMI minimum of 2 GiB, No memory increase is needed, just fix the stale comment.
Reference: https://aws.amazon.com/blogs/compute/build-high-performance-apps-with-aws-lambda-managed-instances/.
| * [Create an AWS account](https://portal.aws.amazon.com/gp/aws/developer/registration/index.html) if you do not already have one and log in. The IAM user that you use must have sufficient permissions to make necessary AWS service calls and manage AWS resources. | ||
| * [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured | ||
| * [Git Installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) | ||
| * [AWS Serverless Application Model](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) (AWS SAM) installed |
There was a problem hiding this comment.
Since LMI and AWS::Serverless::CapacityProvider are brand new, could we add a note in the Requirements section that SAM CLI v1.158.0+ is needed? That's the first version with aws-sam-translator >= 1.106.0 support for these resources, without it users will hit transform errors on deploy.
| @@ -0,0 +1,68 @@ | |||
| { | |||
| "title": "Amazon SQS to AWS Lambda with Lambda Managed Instances (LMI) Provisioned Mode ESM", | |||
There was a problem hiding this comment.
Current title exceeds the 75-character max and description exceeds 150 characters. Consider trimming, here's a suggestion:
"SQS to Lambda with LMI and Provisioned Mode ESM"
"Process SQS messages using Lambda Managed Instances (LMI) with Provisioned Mode ESM for faster scaling and higher throughput."
Issue #, if available:
Description of changes:
A new serverless pattern submitted : This pattern deploys an Amazon SQS Standard Queue connected to an AWS Lambda function via an Event Source Mapping (ESM) configured with Provisioned Mode — an ESM feature that pre-allocates dedicated polling resources for predictable, high-throughput message processing.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.