[{"data":1,"prerenderedAt":68},["ShallowReactive",2],{"pattern-sqs-lambda-lmi-esm-provisioned-sam":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":16,"extension":17,"framework":18,"gitHub":19,"highlight":6,"introBox":25,"language":32,"level":33,"meta":34,"patternArch":35,"resources":49,"s3URL":6,"services":6,"stem":63,"testing":64,"videoId":6,"__hash__":67},"patterns\u002Fpatterns\u002Fsqs-lambda-lmi-esm-provisioned-sam.json","Amazon SQS to AWS Lambda with LMI Provisioned Mode",null,{"text":8},[9],"Delete the stack: \u003Ccode>aws cloudformation delete-stack --stack-name STACK_NAME\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fserda-kasaci-yildirim.json",{"text":13},[14,15],"sam build","sam deploy --guided","Process SQS messages using Lambda Managed Instances (LMI) with Provisioned Mode ESM for faster scaling and higher throughput.","json","AWS SAM",{"template":20},{"repoURL":21,"templateURL":22,"projectFolder":23,"templateFile":24},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fsqs-lambda-lmi-esm-provisioned-sam","serverless-patterns\u002Fsqs-lambda-lmi-esm-provisioned-sam","sqs-lambda-lmi-esm-provisioned-sam","template.yaml",{"headline":26,"text":27},"How it works",[28,29,30,31],"A producer sends messages to an Amazon SQS Standard Queue. The Event Source Mapping (ESM) is configured with Provisioned Mode, which pre-allocates dedicated event pollers between a configurable minimum and maximum. Each poller handles up to 1 MB\u002Fs throughput, 10 concurrent Lambda invocations, and 10 SQS API calls per second.","The Lambda function runs on Lambda Managed Instances (LMI) — an EC2-backed execution model that supports multiconcurrency, allowing each execution environment to handle multiple SQS batches simultaneously. LMI instances run inside a private VPC with outbound access via a NAT Gateway.","Partial batch failure reporting (ReportBatchItemFailures) ensures only failed messages are returned to the queue. After 3 failed attempts, messages are moved to a Dead Letter Queue. A CloudWatch Alarm fires as soon as any message lands in the DLQ.","This pattern deploys one SQS Standard Queue, one Dead Letter Queue, one Lambda function with an LMI Capacity Provider, one Event Source Mapping with Provisioned Mode, a VPC with private subnets and NAT Gateway, and one CloudWatch Alarm.","Python","300",{},{"icon1":36,"icon2":41,"line1":45},{"x":37,"y":38,"service":39,"label":40},20,50,"sqs","Amazon SQS",{"x":42,"y":38,"service":43,"label":44},80,"lambda","AWS Lambda Managed Instances",{"from":46,"to":47,"label":48},"icon1","icon2","Lambda ESM Provisioned Mode",{"bullets":50},[51,54,57,60],{"text":52,"link":53},"Using Lambda with Amazon SQS","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fwith-sqs.html",{"text":55,"link":56},"Lambda Managed Instances (LMI) overview","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fmanaged-instances.html",{"text":58,"link":59},"Event Source Mapping Provisioned Mode for SQS","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fwith-sqs.html#sqs-esm-provisioned-mode",{"text":61,"link":62},"Reporting batch item failures for SQS","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fwith-sqs.html#services-sqs-batchfailurereporting","patterns\u002Fsqs-lambda-lmi-esm-provisioned-sam",{"text":65},[66],"See the GitHub repo for detailed testing instructions.","Mr_BYBF79Kcm6wROgV3Y2gNnYwL0Hb1UiHQi3r28_b0",1783593320520]