[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6NT97FMV2S3F8WXMR64ETEA":3,"skill-same:01M6NT97FMV2S3F8WXMR64ETEA":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":14,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":44,"ownerDescription":45,"updatedAt":46,"install":47,"resources":60},"01M6NT97FMV2S3F8WXMR64ETEA","aws-patterns",null,"Lambda best practices, S3 event patterns, SQS\u002FSNS fanout, and DynamoDB access patterns for serverless AWS architectures.","rubicanjr\u002FFinCognis","rubicanjr","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F234912519?v=4","01M6NT156NND8J474G34SB3923","Rubi","01M6NT15B70RWXE1N3YV0BZY8A",0,"MIT","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Faws-patterns\u002Fskill.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"aws","patterns","aws patterns","best practices","s3","lambda","serverless","access","fanout","dynamodb","architectures","sqs","event","sns","for","2026-11-10 10:12:30",false,"---\nname: aws-patterns\ndescription: Lambda best practices, S3 event patterns, SQS\u002FSNS fanout, and DynamoDB access patterns for serverless AWS architectures.\n---\n\n# AWS Patterns\n\nServerless and managed service patterns for AWS production workloads.\n\n## Lambda Best Practices\n\n```typescript\n\u002F\u002F Cold start optimization: keep handler thin, initialize outside handler\nimport { DynamoDBClient } from '@aws-sdk\u002Fclient-dynamodb'\nimport { DynamoDBDocumentClient, GetCommand } from '@aws-sdk\u002Flib-dynamodb'\n\n\u002F\u002F Initialized ONCE per container (reused across invocations)\nconst client = DynamoDBDocumentClient.from(new DynamoDBClient({}))\n\nexport const handler = async (event: APIGatewayProxyEvent) => {\n  try {\n    const userId = event.pathParameters?.id\n    if (!userId) {\n      return { statusCode: 400, body: JSON.stringify({ error: 'Missing user ID' }) }\n    }\n\n    const result = await client.send(new GetCommand({\n      TableName: process.env.USERS_TABLE!,\n      Key: { pk: `USER#${userId}`, sk: `PROFILE` }\n    }))\n\n    if (!result.Item) {\n      return { statusCode: 404, body: JSON.stringify({ error: 'User not found' }) }\n    }\n\n    return {\n      statusCode: 200,\n      headers: { 'Content-Type': 'application\u002Fjson' },\n      body: JSON.stringify(result.Item)\n    }\n  } catch (err) {\n    console.error('Handler error:', err)\n    return { statusCode: 500, body: JSON.stringify({ error: 'Internal server error' }) }\n  }\n}\n```\n\n## S3 Event Processing\n\n```typescript\n\u002F\u002F S3 → Lambda: process uploaded files\nimport { S3Client, GetObjectCommand } from '@aws-sdk\u002Fclient-s3'\n\nconst s3 = new S3Client({})\n\nexport const handler = async (event: S3Event) => {\n  for (const record of event.Records) {\n    const bucket = record.s3.bucket.name\n    const key = decodeURIComponent(record.s3.object.key.replace(\u002F\\+\u002Fg, ' '))\n    const size = record.s3.object.size\n\n    \u002F\u002F Guard: skip non-image files or oversized uploads\n    if (size > 10_000_000) {\n      console.warn(`Skipping oversized file: ${key} (${size} bytes)`)\n      continue\n    }\n\n    const response = await s3.send(new GetObjectCommand({ Bucket: bucket, Key: key }))\n    const body = await response.Body!.transformToByteArray()\n\n    await processImage(body, key)\n\n    console.log(`Processed ${key} (${size} bytes)`)\n  }\n}\n```\n\n## SQS\u002FSNS Fanout Pattern\n\n```typescript\n\u002F\u002F SNS → multiple SQS queues (fanout to parallel consumers)\n\n\u002F\u002F Publisher: send to SNS topic\nimport { SNSClient, PublishCommand } from '@aws-sdk\u002Fclient-sns'\n\nconst sns = new SNSClient({})\n\nasync function publishOrderEvent(order: Order): Promise\u003Cvoid> {\n  await sns.send(new PublishCommand({\n    TopicArn: process.env.ORDER_EVENTS_TOPIC!,\n    Message: JSON.stringify(order),\n    MessageAttributes: {\n      eventType: { DataType: 'String', StringValue: 'order.created' },\n      region: { DataType: 'String', StringValue: order.region }\n    }\n  }))\n}\n\n\u002F\u002F Consumer: SQS Lambda (one per subscriber: email, analytics, inventory)\nexport const emailHandler = async (event: SQSEvent) => {\n  for (const record of event.Records) {\n    const order = JSON.parse(record.body) as Order\n\n    try {\n      await sendOrderConfirmation(order)\n    } catch (err) {\n      console.error(`Failed to send email for order ${order.id}:`, err)\n      throw err  \u002F\u002F Message returns to queue for retry (DLQ after maxReceiveCount)\n    }\n  }\n}\n```\n\n## DynamoDB Single-Table Design\n\n```typescript\n\u002F\u002F Access patterns drive table design, not entity relationships\n\n\u002F\u002F Table: pk (partition key) + sk (sort key) + GSI1PK + GSI1SK\n\u002F\u002F Entities: User, Order, OrderItem - all in one table\n\nconst AccessPatterns = {\n  \u002F\u002F Get user profile\n  getUserProfile: (userId: string) => ({\n    pk: `USER#${userId}`,\n    sk: `PROFILE`\n  }),\n\n  \u002F\u002F Get user's orders (sorted by date)\n  getUserOrders: (userId: string) => ({\n    pk: `USER#${userId}`,\n    sk: { begins_with: 'ORDER#' }     \u002F\u002F sk: ORDER#2025-01-15#orderId\n  }),\n\n  \u002F\u002F Get order with items\n  getOrderWithItems: (orderId: string) => ({\n    pk: `ORDER#${orderId}`,\n    sk: { begins_with: '' }            \u002F\u002F sk: METADATA, ITEM#productId\n  }),\n\n  \u002F\u002F Get orders by status (GSI1)\n  getOrdersByStatus: (status: string) => ({\n    GSI1PK: `STATUS#${status}`,\n    GSI1SK: { begins_with: '' }        \u002F\u002F GSI1SK: date#orderId\n  })\n}\n\n\u002F\u002F Write: transactional multi-item write\nimport { TransactWriteCommand } from '@aws-sdk\u002Flib-dynamodb'\n\nasync function createOrder(order: Order): Promise\u003Cvoid> {\n  const items = [\n    \u002F\u002F Order metadata\n    {\n      Put: {\n        TableName: process.env.TABLE!,\n        Item: {\n          pk: `ORDER#${order.id}`,\n          sk: 'METADATA',\n          GSI1PK: `STATUS#${order.status}`,\n          GSI1SK: `${order.createdAt}#${order.id}`,\n          ...order\n        }\n      }\n    },\n    \u002F\u002F User's order reference\n    {\n      Put: {\n        TableName: process.env.TABLE!,\n        Item: {\n          pk: `USER#${order.userId}`,\n          sk: `ORDER#${order.createdAt}#${order.id}`,\n          orderId: order.id,\n          total: order.total,\n          status: order.status\n        }\n      }\n    }\n  ]\n\n  await client.send(new TransactWriteCommand({ TransactItems: items }))\n}\n```\n\n## Checklist\n\n- [ ] Lambda: initialize SDK clients outside handler (reuse across invocations)\n- [ ] Lambda: set memory based on profiling (more memory = more CPU = faster)\n- [ ] Lambda: set timeout to 2x expected duration (not max 900s)\n- [ ] SQS: configure Dead Letter Queue with maxReceiveCount: 3\n- [ ] DynamoDB: design table around access patterns, not entities\n- [ ] DynamoDB: use TransactWrite for multi-item atomicity\n- [ ] S3: enable versioning and lifecycle rules for cost optimization\n- [ ] SNS: use message attributes for subscriber filtering\n\n## Anti-Patterns\n\n- Initializing SDK clients inside Lambda handler (cold start penalty every time)\n- Synchronous Lambda chains: A calls B calls C (use Step Functions)\n- DynamoDB scan operations in production (always query with pk\u002Fsk)\n- S3 event without idempotency: Lambda can be invoked multiple times per event\n- Oversized Lambda packages (>50MB): use layers or container images\n- Missing DLQ on SQS: failed messages silently disappear after retention period\n","# AWS Patterns\n\nServerless and managed service patterns for AWS production workloads.\n\n## Lambda Best Practices\n\n```typescript\n\u002F\u002F Cold start optimization: keep handler thin, initialize outside handler\nimport { DynamoDBClient } from '@aws-sdk\u002Fclient-dynamodb'\nimport { DynamoDBDocumentClient, GetCommand } from '@aws-sdk\u002Flib-dynamodb'\n\n\u002F\u002F Initialized ONCE per container (reused across invocations)\nconst client = DynamoDBDocumentClient.from(new DynamoDBClient({}))\n\nexport const handler = async (event: APIGatewayProxyEvent) => {\n  try {\n    const userId = event.pathParameters?.id\n    if (!userId) {\n      return { statusCode: 400, body: JSON.stringify({ error: 'Missing user ID' }) }\n    }\n\n    const result = await client.send(new GetCommand({\n      TableName: process.env.USERS_TABLE!,\n      Key: { pk: `USER#${userId}`, sk: `PROFILE` }\n    }))\n\n    if (!result.Item) {\n      return { statusCode: 404, body: JSON.stringify({ error: 'User not found' }) }\n    }\n\n    return {\n      statusCode: 200,\n      headers: { 'Content-Type': 'application\u002Fjson' },\n      body: JSON.stringify(result.Item)\n    }\n  } catch (err) {\n    console.error('Handler error:', err)\n    return { statusCode: 500, body: JSON.stringify({ error: 'Internal server error' }) }\n  }\n}\n```\n\n## S3 Event Processing\n\n```typescript\n\u002F\u002F S3 → Lambda: process uploaded files\nimport { S3Client, GetObjectCommand } from '@aws-sdk\u002Fclient-s3'\n\nconst s3 = new S3Client({})\n\nexport const handler = async (event: S3Event) => {\n  for (const record of event.Records) {\n    const bucket = record.s3.bucket.name\n    const key = decodeURIComponent(record.s3.object.key.replace(\u002F\\+\u002Fg, ' '))\n    const size = record.s3.object.size\n\n    \u002F\u002F Guard: skip non-image files or oversized uploads\n    if (size > 10_000_000) {\n      console.warn(`Skipping oversized file: ${key} (${size} bytes)`)\n      continue\n    }\n\n    const response = await s3.send(new GetObjectCommand({ Bucket: bucket, Key: key }))\n    const body = await response.Body!.transformToByteArray()\n\n    await processImage(body, key)\n\n    console.log(`Processed ${key} (${size} bytes)`)\n  }\n}\n```\n\n## SQS\u002FSNS Fanout Pattern\n\n```typescript\n\u002F\u002F SNS → multiple SQS queues (fanout to parallel consumers)\n\n\u002F\u002F Publisher: send to SNS topic\nimport { SNSClient, PublishCommand } from '@aws-sdk\u002Fclient-sns'\n\nconst sns = new SNSClient({})\n\nasync function publishOrderEvent(order: Order): Promise\u003Cvoid> {\n  await sns.send(new PublishCommand({\n    TopicArn: process.env.ORDER_EVENTS_TOPIC!,\n    Message: JSON.stringify(order),\n    MessageAttributes: {\n      eventType: { DataType: 'String', StringValue: 'order.created' },\n      region: { DataType: 'String', StringValue: order.region }\n    }\n  }))\n}\n\n\u002F\u002F Consumer: SQS Lambda (one per subscriber: email, analytics, inventory)\nexport const emailHandler = async (event: SQSEvent) => {\n  for (const record of event.Records) {\n    const order = JSON.parse(record.body) as Order\n\n    try {\n      await sendOrderConfirmation(order)\n    } catch (err) {\n      console.error(`Failed to send email for order ${order.id}:`, err)\n      throw err  \u002F\u002F Message returns to queue for retry (DLQ after maxReceiveCount)\n    }\n  }\n}\n```\n\n## DynamoDB Single-Table Design\n\n```typescript\n\u002F\u002F Access patterns drive table design, not entity relationships\n\n\u002F\u002F Table: pk (partition key) + sk (sort key) + GSI1PK + GSI1SK\n\u002F\u002F Entities: User, Order, OrderItem - all in one table\n\nconst AccessPatterns = {\n  \u002F\u002F Get user profile\n  getUserProfile: (userId: string) => ({\n    pk: `USER#${userId}`,\n    sk: `PROFILE`\n  }),\n\n  \u002F\u002F Get user's orders (sorted by date)\n  getUserOrders: (userId: string) => ({\n    pk: `USER#${userId}`,\n    sk: { begins_with: 'ORDER#' }     \u002F\u002F sk: ORDER#2025-01-15#orderId\n  }),\n\n  \u002F\u002F Get order with items\n  getOrderWithItems: (orderId: string) => ({\n    pk: `ORDER#${orderId}`,\n    sk: { begins_with: '' }            \u002F\u002F sk: METADATA, ITEM#productId\n  }),\n\n  \u002F\u002F Get orders by status (GSI1)\n  getOrdersByStatus: (status: string) => ({\n    GSI1PK: `STATUS#${status}`,\n    GSI1SK: { begins_with: '' }        \u002F\u002F GSI1SK: date#orderId\n  })\n}\n\n\u002F\u002F Write: transactional multi-item write\nimport { TransactWriteCommand } from '@aws-sdk\u002Flib-dynamodb'\n\nasync function createOrder(order: Order): Promise\u003Cvoid> {\n  const items = [\n    \u002F\u002F Order metadata\n    {\n      Put: {\n        TableName: process.env.TABLE!,\n        Item: {\n          pk: `ORDER#${order.id}`,\n          sk: 'METADATA',\n          GSI1PK: `STATUS#${order.status}`,\n          GSI1SK: `${order.createdAt}#${order.id}`,\n          ...order\n        }\n      }\n    },\n    \u002F\u002F User's order reference\n    {\n      Put: {\n        TableName: process.env.TABLE!,\n        Item: {\n          pk: `USER#${order.userId}`,\n          sk: `ORDER#${order.createdAt}#${order.id}`,\n          orderId: order.id,\n          total: order.total,\n          status: order.status\n        }\n      }\n    }\n  ]\n\n  await client.send(new TransactWriteCommand({ TransactItems: items }))\n}\n```\n\n## Checklist\n\n- [ ] Lambda: initialize SDK clients outside handler (reuse across invocations)\n- [ ] Lambda: set memory based on profiling (more memory = more CPU = faster)\n- [ ] Lambda: set timeout to 2x expected duration (not max 900s)\n- [ ] SQS: configure Dead Letter Queue with maxReceiveCount: 3\n- [ ] DynamoDB: design table around access patterns, not entities\n- [ ] DynamoDB: use TransactWrite for multi-item atomicity\n- [ ] S3: enable versioning and lifecycle rules for cost optimization\n- [ ] SNS: use message attributes for subscriber filtering\n\n## Anti-Patterns\n\n- Initializing SDK clients inside Lambda handler (cold start penalty every time)\n- Synchronous Lambda chains: A calls B calls C (use Step Functions)\n- DynamoDB scan operations in production (always query with pk\u002Fsk)\n- S3 event without idempotency: Lambda can be invoked multiple times per event\n- Oversized Lambda packages (>50MB): use layers or container images\n- Missing DLQ on SQS: failed messages silently disappear after retention period\n",{"name":5,"description":7},"main","70e1c350500ee750987420bbae48837afa906b7e","skills\u002Faws-patterns","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis","https:\u002F\u002Fgithub.com\u002Frubicanjr","linktr.ee\u002Ffinanskodu","Industrial Engineer & CIO @FinansKodu. Architecting AI-driven financial agents and autonomous workflows. 🏗️ Building systems, not just prompts.","2026-06-09 13:50:15",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add rubicanjr\u002FFinCognis --skill aws-patterns",{"tool":53,"command":54},"bunx","bunx skills add rubicanjr\u002FFinCognis --skill aws-patterns",{"tool":56,"command":57},"pnpm","pnpm dlx skills add rubicanjr\u002FFinCognis --skill aws-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Faws-patterns\u002Fskill.md",true,[],[62,83,92,111,140,159],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":73,"publishedAt":34},"01M6NWS9DAXJTADT4T5MB49X8W","workflow-router","Goal-based workflow orchestration - routes tasks to specialist agents based on user goals","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-router\u002FSKILL.md",[68],{"categoryNo":69,"categoryName":70,"taxonomyType":71,"taxonomyTypeDesc":72},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[74,75,76,77,78,79,80,81,82],"workflow router","workflow","router","orchestration","goals","goal","user","workflow orchestration","tasks",{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":34},"01M6NWS3RETSC0SHP16HP66E14","wiring","Wiring Verification","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fwiring\u002FSKILL.md",[],[85,90,91],"verification","false",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":101,"publishedAt":34},"01M6NWS0XW9CVQZBDA1EGW0TWC","websocket-patterns","Connection management, room patterns, reconnection strategies, message buffering, and binary protocol design.","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fwebsocket-patterns\u002Fskill.md",[98],{"categoryNo":99,"categoryName":100,"taxonomyType":71,"taxonomyTypeDesc":72},"01JBSEEDCAT000000000000015","视觉设计",[102,20,103,104,105,106,107,108,109,110],"websocket","websocket patterns","design","protocol","management","message","strategies","binary","connection",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":121,"publishedAt":34},"01M6NWRDQDX9ZNETAWRRMQWV52","visual-verdict","Screenshot comparison QA for frontend development. Takes a screenshot of the current implementation, scores it across multiple visual dimensions, and returns a structured PASS\u002FREVISE\u002FFAIL verdict with concrete fixes. Use when implementing UI from a design reference or verifying visual correctness.","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fvisual-verdict\u002FSKILL.md",[117,120],{"categoryNo":118,"categoryName":119,"taxonomyType":71,"taxonomyTypeDesc":72},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":69,"categoryName":70,"taxonomyType":71,"taxonomyTypeDesc":72},[122,123,124,125,126,127,128,129,130,33,131,132,133,104,134,135,136,137,138,139],"visual","verdict","visual verdict","ui","across","revise","comparison","correctness","implementing","fixes","dimensions","frontend","development","qa","screenshot","returns","use","frontend development",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":34},"01M6NWR8HSNRS7MNDK2J02QYMN","verification-loop","Comprehensive verification system covering build, types, lint, tests, security, and diff review before a PR.","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fverification-loop\u002FSKILL.md",[],[147,148,90,149,150,151,152,153,154,155,156,157,158],"verification loop","loop","lint","review","security","pr","system","diff","build","tests","diff review","types",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":34},"01M6NWR4HHSFR0VR5EXFRWA747","vector-db-patterns","Embedding strategies, ANN algorithms, hybrid search, RAG chunking strategies, and reranking for semantic search and retrieval.","https:\u002F\u002Fgithub.com\u002Frubicanjr\u002FFinCognis\u002Fblob\u002Fmain\u002Fskills\u002Fvector-db-patterns\u002Fskill.md",[],[166,167,168,169,20,170,171,172,173,108,174,175,176,177,178,33,179,180],"vector db patterns","vector db","db","vector","semantic search","search","embedding strategies","algorithms","chunking","semantic","retrieval","embedding","Hybrid Search","hybrid","rag"]