AWS serverless and event-driven architecture - Lambda, API Gateway, DynamoDB, Step Functions, EventBridge, SQS, SNS
Ships in aws. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
AWS serverless and event-driven architecture - Lambda, API Gateway, DynamoDB, Step Functions, EventBridge, SQS, SNS.
Use this skill when:
// index.js
exports.handler = async (event) => {
console.log('Event:', JSON.stringify(event, null, 2));
const response = {
statusCode: 200,
body: JSON.stringify({
message: 'Hello from Lambda!',
input: event
})
};
return response;
};
const AWS = require('aws-sdk');
const dynamodb = new AWS.DynamoDB.DocumentClient();
exports.handler = async (event) => {
const params = {
TableName: 'Users',
Item: {
id: event.id,
name: event.name,
email: event.email
}
};
await dynamodb.put(params).promise();
return {
statusCode: 201,
body: JSON.stringify({ message: 'User created' })
};
};
import json
import boto3
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('Users')
def lambda_handler(event, context):
# Process event
user_id = event['id']
name = event['name']
# Save to DynamoDB
table.put_item(
Item={
'id': user_id,
'name': name
}
)
return {
'statusCode': 200,
'body': json.dumps({'message': 'User created'})
}
# serverless.yml
service: my-api
provider:
name: aws
runtime: nodejs18.x
functions:
hello:
handler: handler.hello
events:
- http:
path: hello
method: get
createUser:
handler: handler.createUser
events:
- http:
path: users
method: post
plugins:
- serverless-offline
# Create HTTP API
aws apigatewayv2 create-api \
--name MyAPI \
--protocol-type HTTP
# Create integration with Lambda
aws apigatewayv2 create-integration \
--api-id $API_ID \
--integration-type AWS_PROXY \
--integration-uri arn:aws:lambda:us-east-1:123456789012:function:my-function
# Create route
aws apigatewayv2 create-route \
--api-id $API_ID \
--route-key 'GET /hello' \
--target $INTEGRATION_ID
import boto3
dynamodb = boto3.client('dynamodb')
# Create table
response = dynamodb.create_table(
TableName='Users',
KeySchema=[
{
'AttributeName': 'id',
'KeyType': 'HASH'
}
],
AttributeDefinitions=[
{
'AttributeName': 'id',
'AttributeType': 'S'
}
],
ProvisionedThroughput={
'ReadCapacityUnits': 5,
'WriteCapacityUnits': 5
}
)
# Wait for table to be created
dynamodb.get_waiter('table_exists').wait(TableName='Users')
from boto3 import resource
dynamodb = resource('dynamodb')
table = dynamodb.Table('Users')
# Put item
table.put_item(
Item={
'id': 'user1',
'name': 'John Doe',
'email': '[email protected]'
}
)
# Get item
response = table.get_item(
Key={'id': 'user1'}
)
item = response['Item']
# Query items
response = table.query(
KeyConditionExpression='id = :id',
ExpressionAttributeValues={
':id': 'user1'
}
)
{
"Comment": "Hello world workflow",
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123456789012:function:HelloWorld",
"End": true
}
}
}
{
"Comment": "Process order workflow",
"StartAt": "ValidateOrder",
"States": {
"ValidateOrder": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123456789012:function:ValidateOrder",
"Next": "ProcessPayment"
},
"ProcessPayment": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123456789012:function:ProcessPayment",
"Next": "IsPaymentSuccessful"
},
"IsPaymentSuccessful": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.paymentSuccess",
"BooleanEquals": true,
"Next": "ShipOrder"
}
],
"Default": "PaymentFailed"
},
"ShipOrder": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123456789012:function:ShipOrder",
"End": true
},
"PaymentFailed": {
"Type": "Fail",
"Cause": "Payment processing failed",
"Error": "PaymentError"
}
}
}
import boto3
events = boto3.client('events')
# Create rule to trigger Lambda on schedule
response = events.put_rule(
Name='DailyCleanup',
ScheduleExpression='rate(1 day)',
State='ENABLED'
)
# Add Lambda target
events.put_targets(
Rule='DailyCleanup',
Targets=[
{
'Arn': 'arn:aws:lambda:us-east-1:123456789012:function:CleanupFunction',
'Id': '1'
}
]
)
# Trigger on S3 object creation
response = events.put_rule(
Name='S3ObjectCreated',
EventPattern=json.dumps({
"source": ["aws.s3"],
"detail-type": ["Object Created"],
"detail": {
"bucket": {
"name": ["my-bucket"]
}
}
})
)
import boto3
sqs = boto3.client('sqs')
# Create queue
response = sqs.create_queue(
QueueName='my-queue',
Attributes={
'DelaySeconds': '0',
'VisibilityTimeout': '60',
'MessageRetentionPeriod': '86400'
}
)
queue_url = response['QueueUrl']
# Send message
sqs.send_message(
QueueUrl=queue_url,
MessageBody='Hello from SQS'
)
# Receive message
messages = sqs.receive_message(
QueueUrl=queue_url,
MaxNumberOfMessages=10,
WaitTimeSeconds=20
)
import json
def lambda_handler(event, context):
for record in event['Records']:
message = json.loads(record['body'])
# Process message
print(f"Processing: {message}")
return {
'statusCode': 200,
'body': json.dumps('Processed')
}
import boto3
sns = boto3.client('sns')
# Create topic
response = sns.create_topic(
Name='my-topic'
)
topic_arn = response['TopicArn']
# Subscribe to topic (email)
sns.subscribe(
TopicArn=topic_arn,
Protocol='email',
Endpoint='[email protected]'
)
# Publish message
sns.publish(
TopicArn=topic_arn,
Message='Hello from SNS!',
Subject='Notification'
)
{
"StartAt": "Broadcast",
"States": {
"Broadcast": {
"Type": "Parallel",
"Branches": [
{
"StartAt": "ProcessA"
},
{
"StartAt": "ProcessB"
},
{
"StartAt": "ProcessC"
}
]
}
}
}
import json
def lambda_handler(event, context):
try:
# Process event
result = process_event(event)
return {
'statusCode': 200,
'body': json.dumps(result)
}
except Exception as e:
# Log error
print(f"Error: {str(e)}")
# Send to dead-letter queue
send_to_dlq(event)
# Return error
return {
'statusCode': 500,
'body': json.dumps({'error': str(e)})
}
Look for:
**/lambda/**/*.{js,py,go}**/serverless/**/*.yml**/step-functions/**/*.json**/sam/**/*.yaml**/cdk/**/*.tsAWS serverless, Lambda, API Gateway, DynamoDB, Step Functions, EventBridge, SQS, SNS, event-driven architecture, SAM, Serverless Framework, CDK, microservices
What SKILL.md sets; muted values are Claude Code's defaults
/aws:aws-serverless-edafrom aws
npx claudepluginhub dxta/claude-code-skills --plugin aws3 skills in this plugin
/aws-cdk-developmentAWS Cloud Development Kit (CDK) expert for building cloud infrastructure with TypeScript/Python. Use when creating CDK stacks, defining CDK constructs, implementing infrastructure as code, or when the user mentions CDK, CloudFormation, IaC, cdk synth, cdk deploy, or wants to define AWS infrastructure programmatically. Covers CDK app structure, construct patterns, stack composition, and deployment workflows./aws-cost-operationsAWS cost optimization, monitoring, billing analysis, Cost Explorer, CloudWatch, CloudTrail, Well-Architected FrameworkOther plugins' skills for the same job