[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71G37CWQRFP4ZY6AAM7BSST":3,"skill-same:01M71G37CWQRFP4ZY6AAM7BSST":95},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":54,"install":55,"resources":68},"01M71G37CWQRFP4ZY6AAM7BSST","aws-serverless-eda",null,"AWS serverless and event-driven architecture expert based on Well-Architected Framework. Use when building serverless APIs, Lambda functions, REST APIs, microservices, or async workflows. Covers Lambda with TypeScript\u002FPython, API Gateway (REST\u002FHTTP), DynamoDB, Step Functions, EventBridge, SQS, SNS, and serverless patterns. Essential when user mentions serverless, Lambda, API Gateway, event-driven, async processing, queues, pub\u002Fsub, or wants to build scalable serverless applications with AWS best practices.","JSGforever\u002Fskillguard","JSGforever","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F85541948?v=4","01M71FQD3E132VMR5F4TAYX3YS","01M71FQD4DYW0XJ4XQ4YQH75Y9",2,"GPL-3.0","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__Microck--aws-skills\u002Fskills\u002Faws-serverless-eda\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"aws","eda","aws serverless eda","serverless","aws serverless","sqs","patterns","queues","api gateway","dynamodb","Scalable","typescript","lambda","eventbridge","api","architecture","when","workflows","expert","processing","2026-11-10 10:12:30",false,"---\nname: aws-serverless-eda\ndescription: AWS serverless and event-driven architecture expert based on Well-Architected Framework. Use when building serverless APIs, Lambda functions, REST APIs, microservices, or async workflows. Covers Lambda with TypeScript\u002FPython, API Gateway (REST\u002FHTTP), DynamoDB, Step Functions, EventBridge, SQS, SNS, and serverless patterns. Essential when user mentions serverless, Lambda, API Gateway, event-driven, async processing, queues, pub\u002Fsub, or wants to build scalable serverless applications with AWS best practices.\n---\n\n# AWS Serverless & Event-Driven Architecture\n\nThis skill provides comprehensive guidance for building serverless applications and event-driven architectures on AWS based on Well-Architected Framework principles.\n\n## Integrated MCP Servers\n\nThis skill includes 5 MCP servers for serverless development:\n\n### AWS Documentation MCP Server\n**When to use**: Always verify AWS service information before implementation\n- Search AWS documentation for latest features and best practices\n- Check regional availability of AWS services\n- Verify service limits and quotas\n- Confirm API specifications and parameters\n- Access up-to-date AWS service information\n\n### AWS Serverless MCP Server\n**Purpose**: Complete serverless application lifecycle with SAM CLI\n- Initialize new serverless applications\n- Deploy serverless applications\n- Test Lambda functions locally\n- Generate SAM templates\n- Manage serverless application lifecycle\n\n### AWS Lambda Tool MCP Server\n**Purpose**: Execute Lambda functions as tools\n- Invoke Lambda functions directly\n- Test Lambda integrations\n- Execute workflows requiring private resource access\n- Run Lambda-based automation\n\n### AWS Step Functions MCP Server\n**Purpose**: Execute complex workflows and orchestration\n- Create and manage state machines\n- Execute workflow orchestrations\n- Handle distributed transactions\n- Implement saga patterns\n- Coordinate microservices\n\n### Amazon SNS\u002FSQS MCP Server\n**Purpose**: Event-driven messaging and queue management\n- Publish messages to SNS topics\n- Send\u002Freceive messages from SQS queues\n- Manage event-driven communication\n- Implement pub\u002Fsub patterns\n- Handle asynchronous processing\n\n## When to Use This Skill\n\nUse this skill when:\n- Building serverless applications with Lambda\n- Designing event-driven architectures\n- Implementing microservices patterns\n- Creating asynchronous processing workflows\n- Orchestrating multi-service transactions\n- Building real-time data processing pipelines\n- Implementing saga patterns for distributed transactions\n- Designing for scale and resilience\n\n## AWS Well-Architected Serverless Design Principles\n\n### 1. Speedy, Simple, Singular\n\n**Functions should be concise and single-purpose**\n\n```typescript\n\u002F\u002F ✅ GOOD - Single purpose, focused function\nexport const processOrder = async (event: OrderEvent) => {\n  \u002F\u002F Only handles order processing\n  const order = await validateOrder(event);\n  await saveOrder(order);\n  await publishOrderCreatedEvent(order);\n  return { statusCode: 200, body: JSON.stringify({ orderId: order.id }) };\n};\n\n\u002F\u002F ❌ BAD - Function does too much\nexport const handleEverything = async (event: any) => {\n  \u002F\u002F Handles orders, inventory, payments, shipping...\n  \u002F\u002F Too many responsibilities\n};\n```\n\n**Keep functions environmentally efficient and cost-aware**:\n- Minimize cold start times\n- Optimize memory allocation\n- Use provisioned concurrency only when needed\n- Leverage connection reuse\n\n### 2. Think Concurrent Requests, Not Total Requests\n\n**Design for concurrency, not volume**\n\nLambda scales horizontally - design considerations should focus on:\n- Concurrent execution limits\n- Downstream service throttling\n- Shared resource contention\n- Connection pool sizing\n\n```typescript\n\u002F\u002F Consider concurrent Lambda executions accessing DynamoDB\nconst table = new dynamodb.Table(this, 'Table', {\n  billingMode: dynamodb.BillingMode.PAY_PER_REQUEST, \u002F\u002F Auto-scales with load\n});\n\n\u002F\u002F Or with provisioned capacity + auto-scaling\nconst table = new dynamodb.Table(this, 'Table', {\n  billingMode: dynamodb.BillingMode.PROVISIONED,\n  readCapacity: 5,\n  writeCapacity: 5,\n});\n\n\u002F\u002F Enable auto-scaling for concurrent load\ntable.autoScaleReadCapacity({ minCapacity: 5, maxCapacity: 100 });\ntable.autoScaleWriteCapacity({ minCapacity: 5, maxCapacity: 100 });\n```\n\n### 3. Share Nothing\n\n**Function runtime environments are short-lived**\n\n```typescript\n\u002F\u002F ❌ BAD - Relying on local file system\nexport const handler = async (event: any) => {\n  fs.writeFileSync('\u002Ftmp\u002Fdata.json', JSON.stringify(data)); \u002F\u002F Lost after execution\n};\n\n\u002F\u002F ✅ GOOD - Use persistent storage\nexport const handler = async (event: any) => {\n  await s3.putObject({\n    Bucket: process.env.BUCKET_NAME,\n    Key: 'data.json',\n    Body: JSON.stringify(data),\n  });\n};\n```\n\n**State management**:\n- Use DynamoDB for persistent state\n- Use Step Functions for workflow state\n- Use ElastiCache for session state\n- Use S3 for file storage\n\n### 4. Assume No Hardware Affinity\n\n**Applications must be hardware-agnostic**\n\nInfrastructure can change without notice:\n- Lambda functions can run on different hardware\n- Container instances can be replaced\n- No assumption about underlying infrastructure\n\n**Design for portability**:\n- Use environment variables for configuration\n- Avoid hardware-specific optimizations\n- Test across different environments\n\n### 5. Orchestrate with State Machines, Not Function Chaining\n\n**Use Step Functions for orchestration**\n\n```typescript\n\u002F\u002F ❌ BAD - Lambda function chaining\nexport const handler1 = async (event: any) => {\n  const result = await processStep1(event);\n  await lambda.invoke({\n    FunctionName: 'handler2',\n    Payload: JSON.stringify(result),\n  });\n};\n\n\u002F\u002F ✅ GOOD - Step Functions orchestration\nconst stateMachine = new stepfunctions.StateMachine(this, 'OrderWorkflow', {\n  definition: stepfunctions.Chain\n    .start(validateOrder)\n    .next(processPayment)\n    .next(shipOrder)\n    .next(sendConfirmation),\n});\n```\n\n**Benefits of Step Functions**:\n- Visual workflow representation\n- Built-in error handling and retries\n- Execution history and debugging\n- Parallel and sequential execution\n- Service integrations without code\n\n### 6. Use Events to Trigger Transactions\n\n**Event-driven over synchronous request\u002Fresponse**\n\n```typescript\n\u002F\u002F Pattern: Event-driven processing\nconst bucket = new s3.Bucket(this, 'DataBucket');\n\nbucket.addEventNotification(\n  s3.EventType.OBJECT_CREATED,\n  new s3n.LambdaDestination(processFunction),\n  { prefix: 'uploads\u002F' }\n);\n\n\u002F\u002F Pattern: EventBridge integration\nconst rule = new events.Rule(this, 'OrderRule', {\n  eventPattern: {\n    source: ['orders'],\n    detailType: ['OrderPlaced'],\n  },\n});\n\nrule.addTarget(new targets.LambdaFunction(processOrderFunction));\n```\n\n**Benefits**:\n- Loose coupling between services\n- Asynchronous processing\n- Better fault tolerance\n- Independent scaling\n\n### 7. Design for Failures and Duplicates\n\n**Operations must be idempotent**\n\n```typescript\n\u002F\u002F ✅ GOOD - Idempotent operation\nexport const handler = async (event: SQSEvent) => {\n  for (const record of event.Records) {\n    const orderId = JSON.parse(record.body).orderId;\n\n    \u002F\u002F Check if already processed (idempotency)\n    const existing = await dynamodb.getItem({\n      TableName: process.env.TABLE_NAME,\n      Key: { orderId },\n    });\n\n    if (existing.Item) {\n      console.log('Order already processed:', orderId);\n      continue; \u002F\u002F Skip duplicate\n    }\n\n    \u002F\u002F Process order\n    await processOrder(orderId);\n\n    \u002F\u002F Mark as processed\n    await dynamodb.putItem({\n      TableName: process.env.TABLE_NAME,\n      Item: { orderId, processedAt: Date.now() },\n    });\n  }\n};\n```\n\n**Implement retry logic with exponential backoff**:\n```typescript\nasync function withRetry\u003CT>(fn: () => Promise\u003CT>, maxRetries = 3): Promise\u003CT> {\n  for (let i = 0; i \u003C maxRetries; i++) {\n    try {\n      return await fn();\n    } catch (error) {\n      if (i === maxRetries - 1) throw error;\n      await new Promise(resolve => setTimeout(resolve, Math.pow(2, i) * 1000));\n    }\n  }\n  throw new Error('Max retries exceeded');\n}\n```\n\n## Event-Driven Architecture Patterns\n\n### Pattern 1: Event Router (EventBridge)\n\nUse EventBridge for event routing and filtering:\n\n```typescript\n\u002F\u002F Create custom event bus\nconst eventBus = new events.EventBus(this, 'AppEventBus', {\n  eventBusName: 'application-events',\n});\n\n\u002F\u002F Define event schema\nconst schema = new events.Schema(this, 'OrderSchema', {\n  schemaName: 'OrderPlaced',\n  definition: events.SchemaDefinition.fromInline({\n    openapi: '3.0.0',\n    info: { version: '1.0.0', title: 'Order Events' },\n    paths: {},\n    components: {\n      schemas: {\n        OrderPlaced: {\n          type: 'object',\n          properties: {\n            orderId: { type: 'string' },\n            customerId: { type: 'string' },\n            amount: { type: 'number' },\n          },\n        },\n      },\n    },\n  }),\n});\n\n\u002F\u002F Create rules for different consumers\nnew events.Rule(this, 'ProcessOrderRule', {\n  eventBus,\n  eventPattern: {\n    source: ['orders'],\n    detailType: ['OrderPlaced'],\n  },\n  targets: [new targets.LambdaFunction(processOrderFunction)],\n});\n\nnew events.Rule(this, 'NotifyCustomerRule', {\n  eventBus,\n  eventPattern: {\n    source: ['orders'],\n    detailType: ['OrderPlaced'],\n  },\n  targets: [new targets.LambdaFunction(notifyCustomerFunction)],\n});\n```\n\n### Pattern 2: Queue-Based Processing (SQS)\n\nUse SQS for reliable asynchronous processing:\n\n```typescript\n\u002F\u002F Standard queue for at-least-once delivery\nconst queue = new sqs.Queue(this, 'ProcessingQueue', {\n  visibilityTimeout: Duration.seconds(300),\n  retentionPeriod: Duration.days(14),\n  deadLetterQueue: {\n    queue: dlq,\n    maxReceiveCount: 3,\n  },\n});\n\n\u002F\u002F FIFO queue for ordered processing\nconst fifoQueue = new sqs.Queue(this, 'OrderedQueue', {\n  fifo: true,\n  contentBasedDeduplication: true,\n  deduplicationScope: sqs.DeduplicationScope.MESSAGE_GROUP,\n});\n\n\u002F\u002F Lambda consumer\nnew lambda.EventSourceMapping(this, 'QueueConsumer', {\n  target: processingFunction,\n  eventSourceArn: queue.queueArn,\n  batchSize: 10,\n  maxBatchingWindow: Duration.seconds(5),\n});\n```\n\n### Pattern 3: Pub\u002FSub (SNS + SQS Fan-Out)\n\nImplement fan-out pattern for multiple consumers:\n\n```typescript\n\u002F\u002F Create SNS topic\nconst topic = new sns.Topic(this, 'OrderTopic', {\n  displayName: 'Order Events',\n});\n\n\u002F\u002F Multiple SQS queues subscribe to topic\nconst inventoryQueue = new sqs.Queue(this, 'InventoryQueue');\nconst shippingQueue = new sqs.Queue(this, 'ShippingQueue');\nconst analyticsQueue = new sqs.Queue(this, 'AnalyticsQueue');\n\ntopic.addSubscription(new subscriptions.SqsSubscription(inventoryQueue));\ntopic.addSubscription(new subscriptions.SqsSubscription(shippingQueue));\ntopic.addSubscription(new subscriptions.SqsSubscription(analyticsQueue));\n\n\u002F\u002F Each queue has its own Lambda consumer\nnew lambda.EventSourceMapping(this, 'InventoryConsumer', {\n  target: inventoryFunction,\n  eventSourceArn: inventoryQueue.queueArn,\n});\n```\n\n### Pattern 4: Saga Pattern with Step Functions\n\nImplement distributed transactions:\n\n```typescript\nconst reserveFlight = new tasks.LambdaInvoke(this, 'ReserveFlight', {\n  lambdaFunction: reserveFlightFunction,\n  outputPath: '$.Payload',\n});\n\nconst reserveHotel = new tasks.LambdaInvoke(this, 'ReserveHotel', {\n  lambdaFunction: reserveHotelFunction,\n  outputPath: '$.Payload',\n});\n\nconst processPayment = new tasks.LambdaInvoke(this, 'ProcessPayment', {\n  lambdaFunction: processPaymentFunction,\n  outputPath: '$.Payload',\n});\n\n\u002F\u002F Compensating transactions\nconst cancelFlight = new tasks.LambdaInvoke(this, 'CancelFlight', {\n  lambdaFunction: cancelFlightFunction,\n});\n\nconst cancelHotel = new tasks.LambdaInvoke(this, 'CancelHotel', {\n  lambdaFunction: cancelHotelFunction,\n});\n\n\u002F\u002F Define saga with compensation\nconst definition = reserveFlight\n  .next(reserveHotel)\n  .next(processPayment)\n  .addCatch(cancelHotel.next(cancelFlight), {\n    resultPath: '$.error',\n  });\n\nnew stepfunctions.StateMachine(this, 'BookingStateMachine', {\n  definition,\n  timeout: Duration.minutes(5),\n});\n```\n\n### Pattern 5: Event Sourcing\n\nStore events as source of truth:\n\n```typescript\n\u002F\u002F Event store with DynamoDB\nconst eventStore = new dynamodb.Table(this, 'EventStore', {\n  partitionKey: { name: 'aggregateId', type: dynamodb.AttributeType.STRING },\n  sortKey: { name: 'version', type: dynamodb.AttributeType.NUMBER },\n  stream: dynamodb.StreamViewType.NEW_IMAGE,\n});\n\n\u002F\u002F Lambda function stores events\nexport const handleCommand = async (event: any) => {\n  const { aggregateId, eventType, eventData } = event;\n\n  \u002F\u002F Get current version\n  const items = await dynamodb.query({\n    TableName: process.env.EVENT_STORE,\n    KeyConditionExpression: 'aggregateId = :id',\n    ExpressionAttributeValues: { ':id': aggregateId },\n    ScanIndexForward: false,\n    Limit: 1,\n  });\n\n  const nextVersion = items.Items?.[0]?.version + 1 || 1;\n\n  \u002F\u002F Append new event\n  await dynamodb.putItem({\n    TableName: process.env.EVENT_STORE,\n    Item: {\n      aggregateId,\n      version: nextVersion,\n      eventType,\n      eventData,\n      timestamp: Date.now(),\n    },\n  });\n};\n\n\u002F\u002F Projections read from event stream\neventStore.grantStreamRead(projectionFunction);\n```\n\n## Serverless Architecture Patterns\n\n### Pattern 1: API-Driven Microservices\n\nREST APIs with Lambda backend:\n\n```typescript\nconst api = new apigateway.RestApi(this, 'Api', {\n  restApiName: 'microservices-api',\n  deployOptions: {\n    throttlingRateLimit: 1000,\n    throttlingBurstLimit: 2000,\n    tracingEnabled: true,\n  },\n});\n\n\u002F\u002F User service\nconst users = api.root.addResource('users');\nusers.addMethod('GET', new apigateway.LambdaIntegration(getUsersFunction));\nusers.addMethod('POST', new apigateway.LambdaIntegration(createUserFunction));\n\n\u002F\u002F Order service\nconst orders = api.root.addResource('orders');\norders.addMethod('GET', new apigateway.LambdaIntegration(getOrdersFunction));\norders.addMethod('POST', new apigateway.LambdaIntegration(createOrderFunction));\n```\n\n### Pattern 2: Stream Processing\n\nReal-time data processing with Kinesis:\n\n```typescript\nconst stream = new kinesis.Stream(this, 'DataStream', {\n  shardCount: 2,\n  retentionPeriod: Duration.days(7),\n});\n\n\u002F\u002F Lambda processes stream records\nnew lambda.EventSourceMapping(this, 'StreamProcessor', {\n  target: processFunction,\n  eventSourceArn: stream.streamArn,\n  batchSize: 100,\n  maxBatchingWindow: Duration.seconds(5),\n  parallelizationFactor: 10,\n  startingPosition: lambda.StartingPosition.LATEST,\n  retryAttempts: 3,\n  bisectBatchOnError: true,\n  onFailure: new lambdaDestinations.SqsDestination(dlq),\n});\n```\n\n### Pattern 3: Async Task Processing\n\nBackground job processing:\n\n```typescript\n\u002F\u002F SQS queue for tasks\nconst taskQueue = new sqs.Queue(this, 'TaskQueue', {\n  visibilityTimeout: Duration.minutes(5),\n  receiveMessageWaitTime: Duration.seconds(20), \u002F\u002F Long polling\n  deadLetterQueue: {\n    queue: dlq,\n    maxReceiveCount: 3,\n  },\n});\n\n\u002F\u002F Lambda worker processes tasks\nconst worker = new lambda.Function(this, 'TaskWorker', {\n  \u002F\u002F ... configuration\n  reservedConcurrentExecutions: 10, \u002F\u002F Control concurrency\n});\n\nnew lambda.EventSourceMapping(this, 'TaskConsumer', {\n  target: worker,\n  eventSourceArn: taskQueue.queueArn,\n  batchSize: 10,\n  reportBatchItemFailures: true, \u002F\u002F Partial batch failure handling\n});\n```\n\n### Pattern 4: Scheduled Jobs\n\nPeriodic processing with EventBridge:\n\n```typescript\n\u002F\u002F Daily cleanup job\nnew events.Rule(this, 'DailyCleanup', {\n  schedule: events.Schedule.cron({ hour: '2', minute: '0' }),\n  targets: [new targets.LambdaFunction(cleanupFunction)],\n});\n\n\u002F\u002F Process every 5 minutes\nnew events.Rule(this, 'FrequentProcessing', {\n  schedule: events.Schedule.rate(Duration.minutes(5)),\n  targets: [new targets.LambdaFunction(processFunction)],\n});\n```\n\n### Pattern 5: Webhook Processing\n\nHandle external webhooks:\n\n```typescript\n\u002F\u002F API Gateway endpoint for webhooks\nconst webhookApi = new apigateway.RestApi(this, 'WebhookApi', {\n  restApiName: 'webhooks',\n});\n\nconst webhook = webhookApi.root.addResource('webhook');\nwebhook.addMethod('POST', new apigateway.LambdaIntegration(webhookFunction, {\n  proxy: true,\n  timeout: Duration.seconds(29), \u002F\u002F API Gateway max\n}));\n\n\u002F\u002F Lambda handler validates and queues webhook\nexport const handler = async (event: APIGatewayProxyEvent) => {\n  \u002F\u002F Validate webhook signature\n  const isValid = validateSignature(event.headers, event.body);\n  if (!isValid) {\n    return { statusCode: 401, body: 'Invalid signature' };\n  }\n\n  \u002F\u002F Queue for async processing\n  await sqs.sendMessage({\n    QueueUrl: process.env.QUEUE_URL,\n    MessageBody: event.body,\n  });\n\n  \u002F\u002F Return immediately\n  return { statusCode: 202, body: 'Accepted' };\n};\n```\n\n## Best Practices\n\n### Error Handling\n\n**Implement comprehensive error handling**:\n\n```typescript\nexport const handler = async (event: SQSEvent) => {\n  const failures: SQSBatchItemFailure[] = [];\n\n  for (const record of event.Records) {\n    try {\n      await processRecord(record);\n    } catch (error) {\n      console.error('Failed to process record:', record.messageId, error);\n      failures.push({ itemIdentifier: record.messageId });\n    }\n  }\n\n  \u002F\u002F Return partial batch failures for retry\n  return { batchItemFailures: failures };\n};\n```\n\n### Dead Letter Queues\n\n**Always configure DLQs for error handling**:\n\n```typescript\nconst dlq = new sqs.Queue(this, 'DLQ', {\n  retentionPeriod: Duration.days(14),\n});\n\nconst queue = new sqs.Queue(this, 'Queue', {\n  deadLetterQueue: {\n    queue: dlq,\n    maxReceiveCount: 3,\n  },\n});\n\n\u002F\u002F Monitor DLQ depth\nnew cloudwatch.Alarm(this, 'DLQAlarm', {\n  metric: dlq.metricApproximateNumberOfMessagesVisible(),\n  threshold: 1,\n  evaluationPeriods: 1,\n  alarmDescription: 'Messages in DLQ require attention',\n});\n```\n\n### Observability\n\n**Enable tracing and monitoring**:\n\n```typescript\nnew NodejsFunction(this, 'Function', {\n  entry: 'src\u002Fhandler.ts',\n  tracing: lambda.Tracing.ACTIVE, \u002F\u002F X-Ray tracing\n  environment: {\n    POWERTOOLS_SERVICE_NAME: 'order-service',\n    POWERTOOLS_METRICS_NAMESPACE: 'MyApp',\n    LOG_LEVEL: 'INFO',\n  },\n});\n```\n\n## Using MCP Servers Effectively\n\n### AWS Serverless MCP Usage\n\n**Lifecycle management**:\n- Initialize new serverless projects\n- Generate SAM templates\n- Deploy applications\n- Test locally before deployment\n\n### Lambda Tool MCP Usage\n\n**Function execution**:\n- Test Lambda functions directly\n- Execute automation workflows\n- Access private resources\n- Validate integrations\n\n### Step Functions MCP Usage\n\n**Workflow orchestration**:\n- Create state machines for complex workflows\n- Execute distributed transactions\n- Implement saga patterns\n- Coordinate microservices\n\n### SNS\u002FSQS MCP Usage\n\n**Messaging operations**:\n- Test pub\u002Fsub patterns\n- Send test messages to queues\n- Validate event routing\n- Debug message processing\n\n## Additional Resources\n\nThis skill includes comprehensive reference documentation based on AWS best practices:\n\n- **Serverless Patterns**: `references\u002Fserverless-patterns.md`\n  - Core serverless architectures and API patterns\n  - Data processing and integration patterns\n  - Orchestration with Step Functions\n  - Anti-patterns to avoid\n\n- **Event-Driven Architecture Patterns**: `references\u002Feda-patterns.md`\n  - Event routing and processing patterns\n  - Event sourcing and saga patterns\n  - Idempotency and error handling\n  - Message ordering and deduplication\n\n- **Security Best Practices**: `references\u002Fsecurity-best-practices.md`\n  - Shared responsibility model\n  - IAM least privilege patterns\n  - Data protection and encryption\n  - Network security with VPC\n\n- **Observability Best Practices**: `references\u002Fobservability-best-practices.md`\n  - Three pillars: metrics, logs, traces\n  - Structured logging with Lambda Powertools\n  - X-Ray distributed tracing\n  - CloudWatch alarms and dashboards\n\n- **Performance Optimization**: `references\u002Fperformance-optimization.md`\n  - Cold start optimization techniques\n  - Memory and CPU optimization\n  - Package size reduction\n  - Provisioned concurrency patterns\n\n- **Deployment Best Practices**: `references\u002Fdeployment-best-practices.md`\n  - CI\u002FCD pipeline design\n  - Testing strategies (unit, integration, load)\n  - Deployment strategies (canary, blue\u002Fgreen)\n  - Rollback and safety mechanisms\n\n**External Resources**:\n- **AWS Well-Architected Serverless Lens**: https:\u002F\u002Fdocs.aws.amazon.com\u002Fwellarchitected\u002Flatest\u002Fserverless-applications-lens\u002F\n- **ServerlessLand.com**: Pre-built serverless patterns\n- **AWS Serverless Workshops**: https:\u002F\u002Fserverlessland.com\u002Flearn?type=Workshops\n\nFor detailed implementation patterns, anti-patterns, and code examples, refer to the comprehensive references in the skill directory.\n","# AWS Serverless & Event-Driven Architecture\n\nThis skill provides comprehensive guidance for building serverless applications and event-driven architectures on AWS based on Well-Architected Framework principles.\n\n## Integrated MCP Servers\n\nThis skill includes 5 MCP servers for serverless development:\n\n### AWS Documentation MCP Server\n**When to use**: Always verify AWS service information before implementation\n- Search AWS documentation for latest features and best practices\n- Check regional availability of AWS services\n- Verify service limits and quotas\n- Confirm API specifications and parameters\n- Access up-to-date AWS service information\n\n### AWS Serverless MCP Server\n**Purpose**: Complete serverless application lifecycle with SAM CLI\n- Initialize new serverless applications\n- Deploy serverless applications\n- Test Lambda functions locally\n- Generate SAM templates\n- Manage serverless application lifecycle\n\n### AWS Lambda Tool MCP Server\n**Purpose**: Execute Lambda functions as tools\n- Invoke Lambda functions directly\n- Test Lambda integrations\n- Execute workflows requiring private resource access\n- Run Lambda-based automation\n\n### AWS Step Functions MCP Server\n**Purpose**: Execute complex workflows and orchestration\n- Create and manage state machines\n- Execute workflow orchestrations\n- Handle distributed transactions\n- Implement saga patterns\n- Coordinate microservices\n\n### Amazon SNS\u002FSQS MCP Server\n**Purpose**: Event-driven messaging and queue management\n- Publish messages to SNS topics\n- Send\u002Freceive messages from SQS queues\n- Manage event-driven communication\n- Implement pub\u002Fsub patterns\n- Handle asynchronous processing\n\n## When to Use This Skill\n\nUse this skill when:\n- Building serverless applications with Lambda\n- Designing event-driven architectures\n- Implementing microservices patterns\n- Creating asynchronous processing workflows\n- Orchestrating multi-service transactions\n- Building real-time data processing pipelines\n- Implementing saga patterns for distributed transactions\n- Designing for scale and resilience\n\n## AWS Well-Architected Serverless Design Principles\n\n### 1. Speedy, Simple, Singular\n\n**Functions should be concise and single-purpose**\n\n```typescript\n\u002F\u002F ✅ GOOD - Single purpose, focused function\nexport const processOrder = async (event: OrderEvent) => {\n  \u002F\u002F Only handles order processing\n  const order = await validateOrder(event);\n  await saveOrder(order);\n  await publishOrderCreatedEvent(order);\n  return { statusCode: 200, body: JSON.stringify({ orderId: order.id }) };\n};\n\n\u002F\u002F ❌ BAD - Function does too much\nexport const handleEverything = async (event: any) => {\n  \u002F\u002F Handles orders, inventory, payments, shipping...\n  \u002F\u002F Too many responsibilities\n};\n```\n\n**Keep functions environmentally efficient and cost-aware**:\n- Minimize cold start times\n- Optimize memory allocation\n- Use provisioned concurrency only when needed\n- Leverage connection reuse\n\n### 2. Think Concurrent Requests, Not Total Requests\n\n**Design for concurrency, not volume**\n\nLambda scales horizontally - design considerations should focus on:\n- Concurrent execution limits\n- Downstream service throttling\n- Shared resource contention\n- Connection pool sizing\n\n```typescript\n\u002F\u002F Consider concurrent Lambda executions accessing DynamoDB\nconst table = new dynamodb.Table(this, 'Table', {\n  billingMode: dynamodb.BillingMode.PAY_PER_REQUEST, \u002F\u002F Auto-scales with load\n});\n\n\u002F\u002F Or with provisioned capacity + auto-scaling\nconst table = new dynamodb.Table(this, 'Table', {\n  billingMode: dynamodb.BillingMode.PROVISIONED,\n  readCapacity: 5,\n  writeCapacity: 5,\n});\n\n\u002F\u002F Enable auto-scaling for concurrent load\ntable.autoScaleReadCapacity({ minCapacity: 5, maxCapacity: 100 });\ntable.autoScaleWriteCapacity({ minCapacity: 5, maxCapacity: 100 });\n```\n\n### 3. Share Nothing\n\n**Function runtime environments are short-lived**\n\n```typescript\n\u002F\u002F ❌ BAD - Relying on local file system\nexport const handler = async (event: any) => {\n  fs.writeFileSync('\u002Ftmp\u002Fdata.json', JSON.stringify(data)); \u002F\u002F Lost after execution\n};\n\n\u002F\u002F ✅ GOOD - Use persistent storage\nexport const handler = async (event: any) => {\n  await s3.putObject({\n    Bucket: process.env.BUCKET_NAME,\n    Key: 'data.json',\n    Body: JSON.stringify(data),\n  });\n};\n```\n\n**State management**:\n- Use DynamoDB for persistent state\n- Use Step Functions for workflow state\n- Use ElastiCache for session state\n- Use S3 for file storage\n\n### 4. Assume No Hardware Affinity\n\n**Applications must be hardware-agnostic**\n\nInfrastructure can change without notice:\n- Lambda functions can run on different hardware\n- Container instances can be replaced\n- No assumption about underlying infrastructure\n\n**Design for portability**:\n- Use environment variables for configuration\n- Avoid hardware-specific optimizations\n- Test across different environments\n\n### 5. Orchestrate with State Machines, Not Function Chaining\n\n**Use Step Functions for orchestration**\n\n```typescript\n\u002F\u002F ❌ BAD - Lambda function chaining\nexport const handler1 = async (event: any) => {\n  const result = await processStep1(event);\n  await lambda.invoke({\n    FunctionName: 'handler2',\n    Payload: JSON.stringify(result),\n  });\n};\n\n\u002F\u002F ✅ GOOD - Step Functions orchestration\nconst stateMachine = new stepfunctions.StateMachine(this, 'OrderWorkflow', {\n  definition: stepfunctions.Chain\n    .start(validateOrder)\n    .next(processPayment)\n    .next(shipOrder)\n    .next(sendConfirmation),\n});\n```\n\n**Benefits of Step Functions**:\n- Visual workflow representation\n- Built-in error handling and retries\n- Execution history and debugging\n- Parallel and sequential execution\n- Service integrations without code\n\n### 6. Use Events to Trigger Transactions\n\n**Event-driven over synchronous request\u002Fresponse**\n\n```typescript\n\u002F\u002F Pattern: Event-driven processing\nconst bucket = new s3.Bucket(this, 'DataBucket');\n\nbucket.addEventNotification(\n  s3.EventType.OBJECT_CREATED,\n  new s3n.LambdaDestination(processFunction),\n  { prefix: 'uploads\u002F' }\n);\n\n\u002F\u002F Pattern: EventBridge integration\nconst rule = new events.Rule(this, 'OrderRule', {\n  eventPattern: {\n    source: ['orders'],\n    detailType: ['OrderPlaced'],\n  },\n});\n\nrule.addTarget(new targets.LambdaFunction(processOrderFunction));\n```\n\n**Benefits**:\n- Loose coupling between services\n- Asynchronous processing\n- Better fault tolerance\n- Independent scaling\n\n### 7. Design for Failures and Duplicates\n\n**Operations must be idempotent**\n\n```typescript\n\u002F\u002F ✅ GOOD - Idempotent operation\nexport const handler = async (event: SQSEvent) => {\n  for (const record of event.Records) {\n    const orderId = JSON.parse(record.body).orderId;\n\n    \u002F\u002F Check if already processed (idempotency)\n    const existing = await dynamodb.getItem({\n      TableName: process.env.TABLE_NAME,\n      Key: { orderId },\n    });\n\n    if (existing.Item) {\n      console.log('Order already processed:', orderId);\n      continue; \u002F\u002F Skip duplicate\n    }\n\n    \u002F\u002F Process order\n    await processOrder(orderId);\n\n    \u002F\u002F Mark as processed\n    await dynamodb.putItem({\n      TableName: process.env.TABLE_NAME,\n      Item: { orderId, processedAt: Date.now() },\n    });\n  }\n};\n```\n\n**Implement retry logic with exponential backoff**:\n```typescript\nasync function withRetry\u003CT>(fn: () => Promise\u003CT>, maxRetries = 3): Promise\u003CT> {\n  for (let i = 0; i \u003C maxRetries; i++) {\n    try {\n      return await fn();\n    } catch (error) {\n      if (i === maxRetries - 1) throw error;\n      await new Promise(resolve => setTimeout(resolve, Math.pow(2, i) * 1000));\n    }\n  }\n  throw new Error('Max retries exceeded');\n}\n```\n\n## Event-Driven Architecture Patterns\n\n### Pattern 1: Event Router (EventBridge)\n\nUse EventBridge for event routing and filtering:\n\n```typescript\n\u002F\u002F Create custom event bus\nconst eventBus = new events.EventBus(this, 'AppEventBus', {\n  eventBusName: 'application-events',\n});\n\n\u002F\u002F Define event schema\nconst schema = new events.Schema(this, 'OrderSchema', {\n  schemaName: 'OrderPlaced',\n  definition: events.SchemaDefinition.fromInline({\n    openapi: '3.0.0',\n    info: { version: '1.0.0', title: 'Order Events' },\n    paths: {},\n    components: {\n      schemas: {\n        OrderPlaced: {\n          type: 'object',\n          properties: {\n            orderId: { type: 'string' },\n            customerId: { type: 'string' },\n            amount: { type: 'number' },\n          },\n        },\n      },\n    },\n  }),\n});\n\n\u002F\u002F Create rules for different consumers\nnew events.Rule(this, 'ProcessOrderRule', {\n  eventBus,\n  eventPattern: {\n    source: ['orders'],\n    detailType: ['OrderPlaced'],\n  },\n  targets: [new targets.LambdaFunction(processOrderFunction)],\n});\n\nnew events.Rule(this, 'NotifyCustomerRule', {\n  eventBus,\n  eventPattern: {\n    source: ['orders'],\n    detailType: ['OrderPlaced'],\n  },\n  targets: [new targets.LambdaFunction(notifyCustomerFunction)],\n});\n```\n\n### Pattern 2: Queue-Based Processing (SQS)\n\nUse SQS for reliable asynchronous processing:\n\n```typescript\n\u002F\u002F Standard queue for at-least-once delivery\nconst queue = new sqs.Queue(this, 'ProcessingQueue', {\n  visibilityTimeout: Duration.seconds(300),\n  retentionPeriod: Duration.days(14),\n  deadLetterQueue: {\n    queue: dlq,\n    maxReceiveCount: 3,\n  },\n});\n\n\u002F\u002F FIFO queue for ordered processing\nconst fifoQueue = new sqs.Queue(this, 'OrderedQueue', {\n  fifo: true,\n  contentBasedDeduplication: true,\n  deduplicationScope: sqs.DeduplicationScope.MESSAGE_GROUP,\n});\n\n\u002F\u002F Lambda consumer\nnew lambda.EventSourceMapping(this, 'QueueConsumer', {\n  target: processingFunction,\n  eventSourceArn: queue.queueArn,\n  batchSize: 10,\n  maxBatchingWindow: Duration.seconds(5),\n});\n```\n\n### Pattern 3: Pub\u002FSub (SNS + SQS Fan-Out)\n\nImplement fan-out pattern for multiple consumers:\n\n```typescript\n\u002F\u002F Create SNS topic\nconst topic = new sns.Topic(this, 'OrderTopic', {\n  displayName: 'Order Events',\n});\n\n\u002F\u002F Multiple SQS queues subscribe to topic\nconst inventoryQueue = new sqs.Queue(this, 'InventoryQueue');\nconst shippingQueue = new sqs.Queue(this, 'ShippingQueue');\nconst analyticsQueue = new sqs.Queue(this, 'AnalyticsQueue');\n\ntopic.addSubscription(new subscriptions.SqsSubscription(inventoryQueue));\ntopic.addSubscription(new subscriptions.SqsSubscription(shippingQueue));\ntopic.addSubscription(new subscriptions.SqsSubscription(analyticsQueue));\n\n\u002F\u002F Each queue has its own Lambda consumer\nnew lambda.EventSourceMapping(this, 'InventoryConsumer', {\n  target: inventoryFunction,\n  eventSourceArn: inventoryQueue.queueArn,\n});\n```\n\n### Pattern 4: Saga Pattern with Step Functions\n\nImplement distributed transactions:\n\n```typescript\nconst reserveFlight = new tasks.LambdaInvoke(this, 'ReserveFlight', {\n  lambdaFunction: reserveFlightFunction,\n  outputPath: '$.Payload',\n});\n\nconst reserveHotel = new tasks.LambdaInvoke(this, 'ReserveHotel', {\n  lambdaFunction: reserveHotelFunction,\n  outputPath: '$.Payload',\n});\n\nconst processPayment = new tasks.LambdaInvoke(this, 'ProcessPayment', {\n  lambdaFunction: processPaymentFunction,\n  outputPath: '$.Payload',\n});\n\n\u002F\u002F Compensating transactions\nconst cancelFlight = new tasks.LambdaInvoke(this, 'CancelFlight', {\n  lambdaFunction: cancelFlightFunction,\n});\n\nconst cancelHotel = new tasks.LambdaInvoke(this, 'CancelHotel', {\n  lambdaFunction: cancelHotelFunction,\n});\n\n\u002F\u002F Define saga with compensation\nconst definition = reserveFlight\n  .next(reserveHotel)\n  .next(processPayment)\n  .addCatch(cancelHotel.next(cancelFlight), {\n    resultPath: '$.error',\n  });\n\nnew stepfunctions.StateMachine(this, 'BookingStateMachine', {\n  definition,\n  timeout: Duration.minutes(5),\n});\n```\n\n### Pattern 5: Event Sourcing\n\nStore events as source of truth:\n\n```typescript\n\u002F\u002F Event store with DynamoDB\nconst eventStore = new dynamodb.Table(this, 'EventStore', {\n  partitionKey: { name: 'aggregateId', type: dynamodb.AttributeType.STRING },\n  sortKey: { name: 'version', type: dynamodb.AttributeType.NUMBER },\n  stream: dynamodb.StreamViewType.NEW_IMAGE,\n});\n\n\u002F\u002F Lambda function stores events\nexport const handleCommand = async (event: any) => {\n  const { aggregateId, eventType, eventData } = event;\n\n  \u002F\u002F Get current version\n  const items = await dynamodb.query({\n    TableName: process.env.EVENT_STORE,\n    KeyConditionExpression: 'aggregateId = :id',\n    ExpressionAttributeValues: { ':id': aggregateId },\n    ScanIndexForward: false,\n    Limit: 1,\n  });\n\n  const nextVersion = items.Items?.[0]?.version + 1 || 1;\n\n  \u002F\u002F Append new event\n  await dynamodb.putItem({\n    TableName: process.env.EVENT_STORE,\n    Item: {\n      aggregateId,\n      version: nextVersion,\n      eventType,\n      eventData,\n      timestamp: Date.now(),\n    },\n  });\n};\n\n\u002F\u002F Projections read from event stream\neventStore.grantStreamRead(projectionFunction);\n```\n\n## Serverless Architecture Patterns\n\n### Pattern 1: API-Driven Microservices\n\nREST APIs with Lambda backend:\n\n```typescript\nconst api = new apigateway.RestApi(this, 'Api', {\n  restApiName: 'microservices-api',\n  deployOptions: {\n    throttlingRateLimit: 1000,\n    throttlingBurstLimit: 2000,\n    tracingEnabled: true,\n  },\n});\n\n\u002F\u002F User service\nconst users = api.root.addResource('users');\nusers.addMethod('GET', new apigateway.LambdaIntegration(getUsersFunction));\nusers.addMethod('POST', new apigateway.LambdaIntegration(createUserFunction));\n\n\u002F\u002F Order service\nconst orders = api.root.addResource('orders');\norders.addMethod('GET', new apigateway.LambdaIntegration(getOrdersFunction));\norders.addMethod('POST', new apigateway.LambdaIntegration(createOrderFunction));\n```\n\n### Pattern 2: Stream Processing\n\nReal-time data processing with Kinesis:\n\n```typescript\nconst stream = new kinesis.Stream(this, 'DataStream', {\n  shardCount: 2,\n  retentionPeriod: Duration.days(7),\n});\n\n\u002F\u002F Lambda processes stream records\nnew lambda.EventSourceMapping(this, 'StreamProcessor', {\n  target: processFunction,\n  eventSourceArn: stream.streamArn,\n  batchSize: 100,\n  maxBatchingWindow: Duration.seconds(5),\n  parallelizationFactor: 10,\n  startingPosition: lambda.StartingPosition.LATEST,\n  retryAttempts: 3,\n  bisectBatchOnError: true,\n  onFailure: new lambdaDestinations.SqsDestination(dlq),\n});\n```\n\n### Pattern 3: Async Task Processing\n\nBackground job processing:\n\n```typescript\n\u002F\u002F SQS queue for tasks\nconst taskQueue = new sqs.Queue(this, 'TaskQueue', {\n  visibilityTimeout: Duration.minutes(5),\n  receiveMessageWaitTime: Duration.seconds(20), \u002F\u002F Long polling\n  deadLetterQueue: {\n    queue: dlq,\n    maxReceiveCount: 3,\n  },\n});\n\n\u002F\u002F Lambda worker processes tasks\nconst worker = new lambda.Function(this, 'TaskWorker', {\n  \u002F\u002F ... configuration\n  reservedConcurrentExecutions: 10, \u002F\u002F Control concurrency\n});\n\nnew lambda.EventSourceMapping(this, 'TaskConsumer', {\n  target: worker,\n  eventSourceArn: taskQueue.queueArn,\n  batchSize: 10,\n  reportBatchItemFailures: true, \u002F\u002F Partial batch failure handling\n});\n```\n\n### Pattern 4: Scheduled Jobs\n\nPeriodic processing with EventBridge:\n\n```typescript\n\u002F\u002F Daily cleanup job\nnew events.Rule(this, 'DailyCleanup', {\n  schedule: events.Schedule.cron({ hour: '2', minute: '0' }),\n  targets: [new targets.LambdaFunction(cleanupFunction)],\n});\n\n\u002F\u002F Process every 5 minutes\nnew events.Rule(this, 'FrequentProcessing', {\n  schedule: events.Schedule.rate(Duration.minutes(5)),\n  targets: [new targets.LambdaFunction(processFunction)],\n});\n```\n\n### Pattern 5: Webhook Processing\n\nHandle external webhooks:\n\n```typescript\n\u002F\u002F API Gateway endpoint for webhooks\nconst webhookApi = new apigateway.RestApi(this, 'WebhookApi', {\n  restApiName: 'webhooks',\n});\n\nconst webhook = webhookApi.root.addResource('webhook');\nwebhook.addMethod('POST', new apigateway.LambdaIntegration(webhookFunction, {\n  proxy: true,\n  timeout: Duration.seconds(29), \u002F\u002F API Gateway max\n}));\n\n\u002F\u002F Lambda handler validates and queues webhook\nexport const handler = async (event: APIGatewayProxyEvent) => {\n  \u002F\u002F Validate webhook signature\n  const isValid = validateSignature(event.headers, event.body);\n  if (!isValid) {\n    return { statusCode: 401, body: 'Invalid signature' };\n  }\n\n  \u002F\u002F Queue for async processing\n  await sqs.sendMessage({\n    QueueUrl: process.env.QUEUE_URL,\n    MessageBody: event.body,\n  });\n\n  \u002F\u002F Return immediately\n  return { statusCode: 202, body: 'Accepted' };\n};\n```\n\n## Best Practices\n\n### Error Handling\n\n**Implement comprehensive error handling**:\n\n```typescript\nexport const handler = async (event: SQSEvent) => {\n  const failures: SQSBatchItemFailure[] = [];\n\n  for (const record of event.Records) {\n    try {\n      await processRecord(record);\n    } catch (error) {\n      console.error('Failed to process record:', record.messageId, error);\n      failures.push({ itemIdentifier: record.messageId });\n    }\n  }\n\n  \u002F\u002F Return partial batch failures for retry\n  return { batchItemFailures: failures };\n};\n```\n\n### Dead Letter Queues\n\n**Always configure DLQs for error handling**:\n\n```typescript\nconst dlq = new sqs.Queue(this, 'DLQ', {\n  retentionPeriod: Duration.days(14),\n});\n\nconst queue = new sqs.Queue(this, 'Queue', {\n  deadLetterQueue: {\n    queue: dlq,\n    maxReceiveCount: 3,\n  },\n});\n\n\u002F\u002F Monitor DLQ depth\nnew cloudwatch.Alarm(this, 'DLQAlarm', {\n  metric: dlq.metricApproximateNumberOfMessagesVisible(),\n  threshold: 1,\n  evaluationPeriods: 1,\n  alarmDescription: 'Messages in DLQ require attention',\n});\n```\n\n### Observability\n\n**Enable tracing and monitoring**:\n\n```typescript\nnew NodejsFunction(this, 'Function', {\n  entry: 'src\u002Fhandler.ts',\n  tracing: lambda.Tracing.ACTIVE, \u002F\u002F X-Ray tracing\n  environment: {\n    POWERTOOLS_SERVICE_NAME: 'order-service',\n    POWERTOOLS_METRICS_NAMESPACE: 'MyApp',\n    LOG_LEVEL: 'INFO',\n  },\n});\n```\n\n## Using MCP Servers Effectively\n\n### AWS Serverless MCP Usage\n\n**Lifecycle management**:\n- Initialize new serverless projects\n- Generate SAM templates\n- Deploy applications\n- Test locally before deployment\n\n### Lambda Tool MCP Usage\n\n**Function execution**:\n- Test Lambda functions directly\n- Execute automation workflows\n- Access private resources\n- Validate integrations\n\n### Step Functions MCP Usage\n\n**Workflow orchestration**:\n- Create state machines for complex workflows\n- Execute distributed transactions\n- Implement saga patterns\n- Coordinate microservices\n\n### SNS\u002FSQS MCP Usage\n\n**Messaging operations**:\n- Test pub\u002Fsub patterns\n- Send test messages to queues\n- Validate event routing\n- Debug message processing\n\n## Additional Resources\n\nThis skill includes comprehensive reference documentation based on AWS best practices:\n\n- **Serverless Patterns**: `references\u002Fserverless-patterns.md`\n  - Core serverless architectures and API patterns\n  - Data processing and integration patterns\n  - Orchestration with Step Functions\n  - Anti-patterns to avoid\n\n- **Event-Driven Architecture Patterns**: `references\u002Feda-patterns.md`\n  - Event routing and processing patterns\n  - Event sourcing and saga patterns\n  - Idempotency and error handling\n  - Message ordering and deduplication\n\n- **Security Best Practices**: `references\u002Fsecurity-best-practices.md`\n  - Shared responsibility model\n  - IAM least privilege patterns\n  - Data protection and encryption\n  - Network security with VPC\n\n- **Observability Best Practices**: `references\u002Fobservability-best-practices.md`\n  - Three pillars: metrics, logs, traces\n  - Structured logging with Lambda Powertools\n  - X-Ray distributed tracing\n  - CloudWatch alarms and dashboards\n\n- **Performance Optimization**: `references\u002Fperformance-optimization.md`\n  - Cold start optimization techniques\n  - Memory and CPU optimization\n  - Package size reduction\n  - Provisioned concurrency patterns\n\n- **Deployment Best Practices**: `references\u002Fdeployment-best-practices.md`\n  - CI\u002FCD pipeline design\n  - Testing strategies (unit, integration, load)\n  - Deployment strategies (canary, blue\u002Fgreen)\n  - Rollback and safety mechanisms\n\n**External Resources**:\n- **AWS Well-Architected Serverless Lens**: https:\u002F\u002Fdocs.aws.amazon.com\u002Fwellarchitected\u002Flatest\u002Fserverless-applications-lens\u002F\n- **ServerlessLand.com**: Pre-built serverless patterns\n- **AWS Serverless Workshops**: https:\u002F\u002Fserverlessland.com\u002Flearn?type=Workshops\n\nFor detailed implementation patterns, anti-patterns, and code examples, refer to the comprehensive references in the skill directory.\n",{"name":5,"description":7},"main","f2ec4b3b9133d34eeaf9b38e4b0a97e8e5705a7f","benchmarks\u002Ffinal\u002Fskills\u002Fasset1__Microck--aws-skills\u002Fskills\u002Faws-serverless-eda",0,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard","https:\u002F\u002Fgithub.com\u002FJSGforever","2026-08-29 18:27:56",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add JSGforever\u002Fskillguard --skill aws-serverless-eda",{"tool":61,"command":62},"bunx","bunx skills add JSGforever\u002Fskillguard --skill aws-serverless-eda",{"tool":64,"command":65},"pnpm","pnpm dlx skills add JSGforever\u002Fskillguard --skill aws-serverless-eda","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__Microck--aws-skills\u002Fskills\u002Faws-serverless-eda\u002FSKILL.md",true,[69,75,79,83,87,91],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fdeployment-best-practices.md","REFERENCE","参考文档",19664,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__Microck--aws-skills\u002Fskills\u002Faws-serverless-eda\u002Freferences\u002Fdeployment-best-practices.md",{"path":76,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Feda-patterns.md",24678,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__Microck--aws-skills\u002Fskills\u002Faws-serverless-eda\u002Freferences\u002Feda-patterns.md",{"path":80,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fobservability-best-practices.md",19049,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__Microck--aws-skills\u002Fskills\u002Faws-serverless-eda\u002Freferences\u002Fobservability-best-practices.md",{"path":84,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Fperformance-optimization.md",16776,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__Microck--aws-skills\u002Fskills\u002Faws-serverless-eda\u002Freferences\u002Fperformance-optimization.md",{"path":88,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fsecurity-best-practices.md",15257,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__Microck--aws-skills\u002Fskills\u002Faws-serverless-eda\u002Freferences\u002Fsecurity-best-practices.md",{"path":92,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fserverless-patterns.md",20841,"https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__Microck--aws-skills\u002Fskills\u002Faws-serverless-eda\u002Freferences\u002Fserverless-patterns.md",[96,125,141,168,189,209],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":105,"publishedAt":43},"01M71HY2SNXBA9Q00WZDTZQ31Z","skillguard-codex-scanner","Hybrid deterministic+LLM agent-skill security scanner. Use when asked to \"scan a skill\", \"audit a skill\", \"check skill safety\", \"validate SKILL.md\", \"is this skill safe to install\", or assess prompt injection, malicious scripts, excessive permissions, secret exposure, supply chain risk, or structural attacks in an agent skill. Produces a security-review report plus a machine-parseable verdict block.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fsrc\u002Fskillguard\u002Fstatic_scanner\u002Fskillguard-codex-scanner\u002FSKILL.md",[102],{"categoryNo":103,"categoryName":104,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[106,107,108,109,110,111,112,113,114,115,116,117,39,118,119,120,121,122,123,124],"scanner","skillguard codex scanner","skillguard","codex","chain","skill security","security-review","review report","structural","secret","prompt injection","security scanner","review","malicious","permissions","exposure","audit","scripts","safe",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":129,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":137,"publishedAt":43},"01M71HY0SPKTT3S27BC2HPAC5M","data-exfiltrator","Analyzes data files","MIT","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Fsmoke-one-skill\u002Fasset1__cisco-ai-defense--data-exfiltrator\u002FSKILL.md",[132],{"categoryNo":133,"categoryName":134,"taxonomyType":135,"taxonomyTypeDesc":136},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[138,139,140],"data","data exfiltrator","files",{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":145,"categories":146,"keywords":147,"publishedAt":43},"01M71HXVS9EMN44BGDW215FZ72","real-time-collaboration-engine","Build real-time collaborative editing with WebSockets, OT\u002FCRDT conflict resolution, and presence awareness. Implements cursor tracking, optimistic updates, and offline sync. Use for collaborative editors, whiteboards, video editing. Activate on \"real-time collaboration\", \"WebSocket sync\", \"multiplayer editing\", \"CRDT\", \"presence awareness\". NOT for simple chat, request-response APIs, or single-user apps.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--real-time-collaboration-engine\u002FSKILL.md",[],[148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167],"time","real time collaboration engine","real time collaboration","collaboration","engine","real time","Video","reliability","video editing","performance","conflict resolution","presence","access","apps","updates","Bash","activate","optimizer","react","streaming",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":177,"publishedAt":43},"01M71HXP6CTY4KFN0QVMMN0V7J","react-performance-optimizer","Optimize React apps for 60fps performance. Implements memoization, virtualization, code splitting, bundle optimization. Use for slow renders, large lists, bundle bloat. Activate on \"React performance\", \"slow render\", \"useMemo\", \"bundle size\", \"virtualization\". NOT for backend optimization, non-React frameworks, or premature optimization.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--react-performance-optimizer\u002FSKILL.md",[174],{"categoryNo":175,"categoryName":176,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000009","前端开发",[157,178,165,166,179,180,181,182,41,183,148,184,185,161,163,186,164,167,187,188],"react performance optimizer","react performance","performance optimizer","app","nextjs","re","render","2025","code","router","strategies",{"skillNo":190,"name":191,"nameZh":6,"description":192,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":193,"categories":194,"keywords":196,"publishedAt":43},"01M71HXH7QXSQB4QTDZ7SP7YXQ","llm-streaming-response-handler","Build production LLM streaming UIs with Server-Sent Events, real-time token display, cancellation, error recovery. Handles OpenAI\u002FAnthropic\u002FClaude streaming APIs. Use for chatbots, AI assistants, real-time text generation. Activate on \"LLM streaming\", \"SSE\", \"token stream\", \"chat UI\", \"real-time AI\". NOT for batch processing, non-streaming APIs, or WebSocket bidirectional chat.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--llm-streaming-response-handler\u002FSKILL.md",[195],{"categoryNo":175,"categoryName":176,"taxonomyType":20,"taxonomyTypeDesc":21},[197,167,198,199,42,200,157,148,201,202,203,163,164,165,204,166,205,206,207,208],"llm streaming response handler","handler","error","retry","chat ui","error recovery","critical","batch","display","text","server","read",{"skillNo":210,"name":211,"nameZh":6,"description":212,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":213,"categories":214,"keywords":222,"publishedAt":43},"01M71HXCB0E1YRKYW1Y8T0Y106","github-actions-pipeline-builder","Build production CI\u002FCD pipelines with GitHub Actions. Implements matrix builds, caching, deployments, testing, security scanning. Use for automated testing, deployments, release workflows. Activate on \"GitHub Actions\", \"CI\u002FCD\", \"workflow\", \"deployment pipeline\", \"automated testing\". NOT for Jenkins\u002FCircleCI, manual deployments, or non-GitHub repositories.","https:\u002F\u002Fgithub.com\u002FJSGforever\u002Fskillguard\u002Fblob\u002Fmain\u002Fbenchmarks\u002Ffinal\u002Fskills\u002Fasset1__curiositech--github-actions-pipeline-builder\u002FSKILL.md",[215,218,221],{"categoryNo":216,"categoryName":217,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":219,"categoryName":220,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":103,"categoryName":104,"taxonomyType":20,"taxonomyTypeDesc":21},[223,224,225,226,227,228,229,155,41,230,231,40,164,188,232,208,233,234,235,236],"github actions pipeline builder","actions","github actions","pipeline builder","github","builder","pipeline","testing","ci","run","release","write","edit","git"]