Skip to content

New serverless pattern: sqs to lambda managed instance with provisioned mode esm#3001

Open
kasacis wants to merge 2 commits intoaws-samples:mainfrom
kasacis:kasacis-lmi-esm-provisoned-mode
Open

New serverless pattern: sqs to lambda managed instance with provisioned mode esm#3001
kasacis wants to merge 2 commits intoaws-samples:mainfrom
kasacis:kasacis-lmi-esm-provisoned-mode

Conversation

@kasacis
Copy link
Copy Markdown

@kasacis kasacis commented Mar 21, 2026

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.

@kasacis
Copy link
Copy Markdown
Author

kasacis commented Mar 21, 2026

#3002

@kasacis kasacis force-pushed the kasacis-lmi-esm-provisoned-mode branch from d8e4358 to 2539b22 Compare April 9, 2026 08:09
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,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants