AWS Lambda serverless functions for event-driven compute. An agent skill from itsmostafa/aws-agent-skills.

MITAuto-check passedBackend & APIs

Install Lambda

skills CLI
$ npx skills add itsmostafa/aws-agent-skills --skill lambda -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install itsmostafa/aws-agent-skills lambda --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/itsmostafa/aws-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/lambda .claude/skills/lambda && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
lambda
GitHub stars
1.2k
Token cost
~2.2k tokens
SKILL.md length
488 words
Files
3
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

AWS Lambda serverless functions for event-driven compute. An agent skill from itsmostafa/aws-agent-skills.

  • Creating functions
  • SKILL.md covers Table of Contents, Core Concepts, Common Patterns and CLI Reference, plus 2 more sections
  • Calls aws
  • Configuring triggers

What it does

Lambda is an agent skill from itsmostafa/aws-agent-skills. AWS Lambda serverless functions for event-driven compute. Use when creating functions, configuring triggers, debugging invocations, optimizing cold starts, setting up event source mappings, or managing layers.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `debugging.md` and `deployment.md`).

It sits in Backend & APIs, covering Event-driven systems and Serverless. It works with AWS Lambda. The repository describes itself as: AWS Skills for Agents. The licence is MIT.

When your agent uses it

  • Creating functions
  • Configuring triggers
  • Debugging invocations
  • Optimizing cold starts

Example prompts

  • “/lambda”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit e786d25. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • aws

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.aws.amazon.com
    • boto3.amazonaws.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Lambda loads about 2.2k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 488 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from itsmostafa/aws-agent-skills at commit e786d25, republished under its MIT licence (© itsmostafa). 488 words, ~2,153 tokens.

Download SKILL.mdSave it as .claude/skills/lambda/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
lambda
description
AWS Lambda serverless functions for event-driven compute. Use when creating functions, configuring triggers, debugging invocations, optimizing cold starts, setting up event source mappings, or managing layers.
last_updated
2026-01-07
doc_source
https://docs.aws.amazon.com/lambda/latest/dg/

AWS Lambda

AWS Lambda runs code without provisioning servers. You pay only for compute time consumed. Lambda automatically scales from a few requests per day to thousands per second.

Table of Contents

Core Concepts

Function

Your code packaged with configuration. Includes runtime, handler, memory, timeout, and IAM role.

Invocation Types
TypeDescriptionUse Case
SynchronousCaller waits for responseAPI Gateway, direct invoke
AsynchronousFire and forgetS3, SNS, EventBridge
Poll-basedLambda polls sourceSQS, Kinesis, DynamoDB Streams
Execution Environment

Lambda creates execution environments to run your function. Components:

  • Cold start: New environment initialization
  • Warm start: Reusing existing environment
  • Handler: Entry point function
  • Context: Runtime information
Layers

Reusable packages of libraries, dependencies, or custom runtimes (up to 5 per function).

Common Patterns

Create a Python Function

AWS CLI:

bash
# Create deployment package
zip function.zip lambda_function.py

# Create function
aws lambda create-function \
  --function-name MyFunction \
  --runtime python3.12 \
  --role arn:aws:iam::123456789012:role/lambda-role \
  --handler lambda_function.handler \
  --zip-file fileb://function.zip \
  --timeout 30 \
  --memory-size 256

# Update function code
aws lambda update-function-code \
  --function-name MyFunction \
  --zip-file fileb://function.zip

boto3:

python
import boto3
import zipfile
import io

lambda_client = boto3.client('lambda')

# Create zip in memory
zip_buffer = io.BytesIO()
with zipfile.ZipFile(zip_buffer, 'w') as zf:
    zf.writestr('lambda_function.py', '''
def handler(event, context):
    return {"statusCode": 200, "body": "Hello"}
''')
zip_buffer.seek(0)

# Create function
lambda_client.create_function(
    FunctionName='MyFunction',
    Runtime='python3.12',
    Role='arn:aws:iam::123456789012:role/lambda-role',
    Handler='lambda_function.handler',
    Code={'ZipFile': zip_buffer.read()},
    Timeout=30,
    MemorySize=256
)
Add S3 Trigger
bash
# Add permission for S3 to invoke Lambda
aws lambda add-permission \
  --function-name MyFunction \
  --statement-id s3-trigger \
  --action lambda:InvokeFunction \
  --principal s3.amazonaws.com \
  --source-arn arn:aws:s3:::my-bucket \
  --source-account 123456789012

# Configure S3 notification (see S3 skill)
Add SQS Event Source
bash
aws lambda create-event-source-mapping \
  --function-name MyFunction \
  --event-source-arn arn:aws:sqs:us-east-1:123456789012:my-queue \
  --batch-size 10 \
  --maximum-batching-window-in-seconds 5
Environment Variables
bash
aws lambda update-function-configuration \
  --function-name MyFunction \
  --environment "Variables={DB_HOST=mydb.cluster-xyz.us-east-1.rds.amazonaws.com,LOG_LEVEL=INFO}"
Create and Attach Layer
bash
# Create layer
zip -r layer.zip python/

aws lambda publish-layer-version \
  --layer-name my-dependencies \
  --compatible-runtimes python3.12 \
  --zip-file fileb://layer.zip

# Attach to function
aws lambda update-function-configuration \
  --function-name MyFunction \
  --layers arn:aws:lambda:us-east-1:123456789012:layer:my-dependencies:1
Invoke Function
bash
# Synchronous invoke
aws lambda invoke \
  --function-name MyFunction \
  --payload '{"key": "value"}' \
  response.json

# Asynchronous invoke
aws lambda invoke \
  --function-name MyFunction \
  --invocation-type Event \
  --payload '{"key": "value"}' \
  response.json

CLI Reference

Function Management
CommandDescription
aws lambda create-functionCreate new function
aws lambda update-function-codeUpdate function code
aws lambda update-function-configurationUpdate settings
aws lambda delete-functionDelete function
aws lambda list-functionsList all functions
aws lambda get-functionGet function details
Invocation
CommandDescription
aws lambda invokeInvoke function
aws lambda invoke-asyncAsync invoke (deprecated)
Event Sources
CommandDescription
aws lambda create-event-source-mappingAdd event source
aws lambda list-event-source-mappingsList mappings
aws lambda update-event-source-mappingUpdate mapping
aws lambda delete-event-source-mappingRemove mapping
Permissions
CommandDescription
aws lambda add-permissionAdd resource-based policy
aws lambda remove-permissionRemove permission
aws lambda get-policyView resource policy

Best Practices

Performance
  • Right-size memory: More memory = more CPU = faster execution
  • Minimize cold starts: Keep functions warm, use Provisioned Concurrency
  • Optimize package size: Smaller packages deploy faster
  • Use layers for shared dependencies
  • Initialize outside handler: Reuse connections across invocations
python
# GOOD: Initialize outside handler
import boto3
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('MyTable')

def handler(event, context):
    # Reuses existing connection
    return table.get_item(Key={'id': event['id']})
Show full SKILL.md (196 more words)Show less
Security
  • Least privilege IAM roles — only grant needed permissions
  • Use Secrets Manager for sensitive data
  • Enable VPC only if needed (adds latency)
  • Encrypt environment variables with KMS
Cost Optimization
  • Set appropriate timeout — don't use max 15 minutes unnecessarily
  • Use ARM architecture (Graviton2) for 34% better price/performance
  • Batch process where possible
  • Use Reserved Concurrency to limit costs
Reliability
  • Configure DLQ for async invocations
  • Handle retries — async events retry twice
  • Make handlers idempotent
  • Use structured logging

Troubleshooting

Timeout Errors

Symptom: Task timed out after X seconds

Causes:

  • Function takes longer than timeout
  • Network call to unreachable resource
  • VPC configuration issues

Debug:

bash
# Check function configuration
aws lambda get-function-configuration \
  --function-name MyFunction \
  --query "Timeout"

# Increase timeout
aws lambda update-function-configuration \
  --function-name MyFunction \
  --timeout 60
Out of Memory

Symptom: Function crashes with memory error

Fix:

bash
aws lambda update-function-configuration \
  --function-name MyFunction \
  --memory-size 512
Cold Start Latency

Causes:

  • Large deployment package
  • VPC configuration
  • Many dependencies to load

Solutions:

  • Use Provisioned Concurrency
  • Reduce package size
  • Use layers for dependencies
  • Consider Graviton2 (ARM)
bash
# Enable Provisioned Concurrency
aws lambda put-provisioned-concurrency-config \
  --function-name MyFunction \
  --qualifier LIVE \
  --provisioned-concurrent-executions 5
Permission Denied

Symptom: AccessDeniedException

Debug:

bash
# Check execution role
aws lambda get-function-configuration \
  --function-name MyFunction \
  --query "Role"

# Check role policies
aws iam list-attached-role-policies \
  --role-name lambda-role
VPC Connectivity Issues

Symptom: Cannot reach internet or AWS services

Causes:

  • No NAT Gateway for internet access
  • Missing VPC endpoint for AWS services
  • Security group blocking outbound

Solutions:

  • Add NAT Gateway for internet
  • Add VPC endpoints for AWS services
  • Check security group rules

References

© itsmostafa, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in skills/lambda of itsmostafa/aws-agent-skills.

  • SKILL.md
  • debugging.md
  • deployment.md

Open the folder on GitHubat commit e786d25

Compare with similar skills

Lambda next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Lambda compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lambda this skillitsmostafa/aws-agent-skills1.2k—~2.2kAutomated safety check: PassMIT
AWS Serverless Edazxkane/aws-skills3674 repos~3.2kAutomated safety check: PassMIT
Polylith Base CreationDavidVujic/python-polylith553—~757Automated safety check: PassMIT
Processing S3 Uploads With Step Functionsaws/agent-toolkit-for-aws2.8k—~4kAutomated safety check: PassApache-2.0
AWS Serverlessdavila7/claude-code-templates32k7 repos~2kAutomated safety check: PassMIT
AWS Lambda Microvmsawslabs/agent-plugins9121 repos~4.1kAutomated safety check: PassApache-2.0

Similar skills

  • AWS Serverless Eda

    zxkane/aws-skills

    AWS serverless and event-driven architecture expert based on Well-Architected Framework.

    367 GitHub starsUsed in 4 repos~3.2k tokens
    Backend & APIsAuto-check passed
  • Polylith Base Creation

    DavidVujic/python-polylith

    Create a Polylith base with poly create base — the entry point of a deployable application (HTTP API, CLI, message-queue consumer, AWS Lambda handler, GCP Cloud Function, scheduled job).

    553 GitHub stars~757 tokensUpdated 3 days ago
    Backend & APIsAuto-check passed
  • Official

    Deploy an event-driven workflow that routes S3 uploads to either Lambda or Fargate via Step Functions based on file size.

    2.8k GitHub stars~4k tokensUpdated today
    Backend & APIsAuto-check passed
  • AWS Serverless

    davila7/claude-code-templates

    Specialized skill for building production-ready serverless applications on AWS.

    32k GitHub starsUsed in 7 repos~2k tokens
    Backend & APIsAuto-check passed
  • AWS Lambda Microvms

    awslabs/agent-plugins

    Official

    Build, run, debug, and operate applications on AWS Lambda MicroVMs — Firecracker-isolated, snapshot-resumable serverless compute environments that run inside a container with up to 8-hour lifetimes.

    912 GitHub starsUsed in 1 repo~4.1k tokens
    Backend & APIsAuto-check passed
  • AWS Lambda

    awslabs/agent-plugins

    Official

    Design, build, deploy, test, and debug serverless applications with AWS Lambda.

    912 GitHub stars~3.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from itsmostafa/aws-agent-skills

All 17 skills in this repo
  • API Gateway

    itsmostafa/aws-agent-skills

    AWS API Gateway for REST and HTTP API management. An agent skill from itsmostafa/aws-agent-skills.

    1.2k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Bedrock

    itsmostafa/aws-agent-skills

    AWS Bedrock foundation models for generative AI. An agent skill from itsmostafa/aws-agent-skills.

    1.2k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed
  • Cognito

    itsmostafa/aws-agent-skills

    AWS Cognito user authentication and authorization service. An agent skill from itsmostafa/aws-agent-skills.

    1.2k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Cloudformation

    itsmostafa/aws-agent-skills

    AWS CloudFormation infrastructure as code for stack management.

    1.2k GitHub stars~2.5k tokensUpdated 2 days ago
    Auto-check passed
  • Cloudwatch

    itsmostafa/aws-agent-skills

    AWS CloudWatch monitoring for logs, metrics, alarms, and dashboards.

    1.2k GitHub stars~3.5k tokensUpdated 2 days ago
    Auto-check passed
  • Dynamodb

    itsmostafa/aws-agent-skills

    AWS DynamoDB NoSQL database for scalable data storage. An agent skill from itsmostafa/aws-agent-skills.

    1.2k GitHub stars~2.5k tokensUpdated 2 days ago
    Auto-check passed

Works with

Categories

Questions about Lambda

What does Lambda do?

AWS Lambda serverless functions for event-driven compute. An agent skill from itsmostafa/aws-agent-skills. Lambda is an agent skill from itsmostafa/aws-agent-skills. AWS Lambda serverless functions for event-driven compute.

When should I use Lambda?

Lambda fits situations like: creating functions; configuring triggers; debugging invocations; optimizing cold starts.

How do I install Lambda in Claude Code?

Run `npx skills add itsmostafa/aws-agent-skills --skill lambda -a claude-code`. Or copy the skill folder (skills/lambda in itsmostafa/aws-agent-skills) into .claude/skills/lambda in your project. Claude Code loads it when a task matches its description.

How do I install Lambda in Codex?

Run `npx skills add itsmostafa/aws-agent-skills --skill lambda -a codex`. Or copy the skill folder (skills/lambda in itsmostafa/aws-agent-skills) into .agents/skills/lambda in your project. Codex loads it when a task matches its description.

Can I use Lambda in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add itsmostafa/aws-agent-skills --skill lambda -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lambda, .gemini/skills/lambda, .github/skills/lambda and .opencode/skills/lambda in your project.

What does Lambda need to run?

Going by SKILL.md and its folder, Lambda needs the command-line tools its instructions call (aws). Our summary lists: Python 3.

Does Lambda access the network?

SKILL.md names 2 domains. As links in the text: docs.aws.amazon.com and boto3.amazonaws.com. This is read from the text; nothing was executed.

Is Lambda safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Lambda use?

Lambda is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Lambda use?

About 2.2k tokens (SKILL.md is roughly 8.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Lambda?

Skills that share tags, products or a category with Lambda: AWS Serverless Eda (zxkane/aws-skills, 367 stars), Polylith Base Creation (DavidVujic/python-polylith, 553 stars), Processing S3 Uploads With Step Functions (aws/agent-toolkit-for-aws, 2.8k stars) and AWS Serverless (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lambda?

itsmostafa (a GitHub user) maintains it in itsmostafa/aws-agent-skills, which has 1,160 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 5, 2026.

Source: itsmostafa/aws-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.