Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Evaluates, configures, and migrates workloads to AWS Lambda Managed Instances on EC2 capacity in your account.
Use this skill ↓27% 91%+64 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 6 of 22 without it.
3 of 3 safety checks passed
Not used yet
#!/usr/bin/env bash
set -euo pipefail
# Setup script for AWS Lambda Managed Instances (LMI)
# Usage: ./setup-lmi.sh <function-name> <capacity-provider-name> <architecture>
#
# Prerequisites:
# - AWS CLI configured with appropriate credentials
# - VPC subnets and security group created
# - IAM roles created (see references/infrastructure-setup.md)
#
# Environment variables (required):
# SUBNET_IDS - Comma-separated subnet IDs (3+ AZs)
# SECURITY_GROUP_ID - Security group ID
# ACCOUNT_ID - AWS account ID
# OPERATOR_ROLE_ARN - ARN of the LMI operator role
# EXECUTION_ROLE_ARN - ARN of the Lambda execution role
#
# Environment variables (optional):
# AWS_REGION - AWS region (default: from AWS CLI config)
# MAX_VCPU_COUNT - Max vCPU limit (default: 30)
# MEMORY_SIZE - Function memory in MB (default: 4096)
# RUNTIME - Lambda runtime (default: python3.13)
# HANDLER - Function handler (default: app.handler)
FUNCTION_NAME="${1:?Usage: $0 <function-name> <capacity-provider-name> <architecture>}"
CP_NAME="${2:?Usage: $0 <function-name> <capacity-provider-name> <architecture>}"
ARCHITECTURE="${3:-arm64}"
: "${SUBNET_IDS:?Set SUBNET_IDS (comma-separated, 3+ AZs)}"
: "${SECURITY_GROUP_ID:?Set SECURITY_GROUP_ID}"
: "${ACCOUNT_ID:?Set ACCOUNT_ID}"
: "${OPERATOR_ROLE_ARN:?Set OPERATOR_ROLE_ARN}"
: "${EXECUTION_ROLE_ARN:?Set EXECUTION_ROLE_ARN}"
MAX_VCPU_COUNT="${MAX_VCPU_COUNT:-30}"
MEMORY_SIZE="${MEMORY_SIZE:-4096}"
RUNTIME="${RUNTIME:-python3.13}"
HANDLER="${HANDLER:-app.handler}"
REGION="${AWS_REGION:-$(aws configure get region)}"Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.