
Run a steady SQS workload on Lambda Managed Instances and open a Standard Lambda burst tier on the same queue when a temporary traffic burst outpaces it.
GetQueueAttributes every 10 seconds, and toggles the burst mapping with UpdateEventSourceMapping. Two thresholds form a dead band: above the open threshold the burst tier opens immediately, and it closes only once depth is below the close threshold, flat or falling over a 30-second window, and a minimum dwell time has elapsed. Polling replaces the CloudWatch depth alarms this pattern originally used, because a load test measured 2m 15s of metric-publish and alarm-evaluation lag, more than half the total time to engage the burst tier, and irreducible on a metric SQS publishes once a minute. The controller is on the control plane and never touches a workload message.git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/sqs-lmi-standard-lambda-overflow/python/samsam validate --lintsam buildsam deploy --guidedaws cloudformation delete-stack --stack-name STACK_NAME. Deleting the stack terminates the Lambda Managed Instances.