[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EEDSEE6032CMEXNA7BYWXY":3,"skill-same:01M6EEDSEE6032CMEXNA7BYWXY":54},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":21,"linkOnly":22,"markdownContent":23,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M6EEDSEE6032CMEXNA7BYWXY","aws-dynamodb",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",66,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Faws-dynamodb\u002FSKILL.md",[],[18,19,20],"aws","aws dynamodb","dynamodb","2026-11-10 10:12:30",false,"# AWS DynamoDB\n\nAmazon DynamoDB is a fully managed NoSQL key-value and document database. It delivers single-digit millisecond latency at any scale with automatic scaling, built-in security, and zero operational overhead.\n\n## Core Concepts\n\n- **Table** — a collection of items (rows)\n- **Partition Key (PK)** — required primary key for distributing data\n- **Sort Key (SK)** — optional, enables range queries within a partition\n- **GSI** — Global Secondary Index, alternate PK\u002FSK for different access patterns\n- **LSI** — Local Secondary Index, same PK but different SK (must be created at table creation)\n- **Streams** — ordered log of item changes for event-driven processing\n- **TTL** — automatic item expiration\n\n## Creating Tables\n\n```bash\n# Create a table with partition key and sort key\naws dynamodb create-table \\\n  --table-name Orders \\\n  --attribute-definitions \\\n    AttributeName=PK,AttributeType=S \\\n    AttributeName=SK,AttributeType=S \\\n  --key-schema \\\n    AttributeName=PK,KeyType=HASH \\\n    AttributeName=SK,KeyType=RANGE \\\n  --billing-mode PAY_PER_REQUEST \\\n  --tags Key=Env,Value=prod\n```\n\n```bash\n# Create table with provisioned capacity and GSI\naws dynamodb create-table \\\n  --table-name Orders \\\n  --attribute-definitions \\\n    AttributeName=PK,AttributeType=S \\\n    AttributeName=SK,AttributeType=S \\\n    AttributeName=GSI1PK,AttributeType=S \\\n    AttributeName=GSI1SK,AttributeType=S \\\n  --key-schema \\\n    AttributeName=PK,KeyType=HASH \\\n    AttributeName=SK,KeyType=RANGE \\\n  --global-secondary-indexes '[{\n    \"IndexName\": \"GSI1\",\n    \"KeySchema\": [\n      {\"AttributeName\":\"GSI1PK\",\"KeyType\":\"HASH\"},\n      {\"AttributeName\":\"GSI1SK\",\"KeyType\":\"RANGE\"}\n    ],\n    \"Projection\": {\"ProjectionType\":\"ALL\"},\n    \"ProvisionedThroughput\": {\"ReadCapacityUnits\":5,\"WriteCapacityUnits\":5}\n  }]' \\\n  --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5\n```\n\n## Single-Table Design\n\n```python\n# Single-table design — store multiple entity types in one table\nimport boto3\nfrom datetime import datetime\n\ndynamodb = boto3.resource('dynamodb')\ntable = dynamodb.Table('AppData')\n\n# Store a customer\ntable.put_item(Item={\n    'PK': 'CUSTOMER#C001',\n    'SK': 'PROFILE',\n    'name': 'Alice Johnson',\n    'email': 'alice@example.com',\n    'GSI1PK': 'CUSTOMERS',\n    'GSI1SK': 'Alice Johnson',\n    'entity_type': 'Customer'\n})\n\n# Store an order for that customer\ntable.put_item(Item={\n    'PK': 'CUSTOMER#C001',\n    'SK': 'ORDER#2024-01-15#O001',\n    'total': 149.99,\n    'status': 'shipped',\n    'GSI1PK': 'ORDER#O001',\n    'GSI1SK': 'CUSTOMER#C001',\n    'entity_type': 'Order'\n})\n\n# Query all orders for a customer (sorted by date)\nresponse = table.query(\n    KeyConditionExpression='PK = :pk AND begins_with(SK, :sk)',\n    ExpressionAttributeValues={':pk': 'CUSTOMER#C001', ':sk': 'ORDER#'}\n)\n```\n\n## CRUD Operations\n\n```bash\n# Put an item\naws dynamodb put-item \\\n  --table-name Orders \\\n  --item '{\n    \"PK\": {\"S\": \"CUSTOMER#C001\"},\n    \"SK\": {\"S\": \"ORDER#2024-01-15#O001\"},\n    \"total\": {\"N\": \"149.99\"},\n    \"status\": {\"S\": \"pending\"}\n  }'\n```\n\n```bash\n# Get an item by key\naws dynamodb get-item \\\n  --table-name Orders \\\n  --key '{\"PK\":{\"S\":\"CUSTOMER#C001\"},\"SK\":{\"S\":\"ORDER#2024-01-15#O001\"}}'\n```\n\n```bash\n# Update an item with conditional expression\naws dynamodb update-item \\\n  --table-name Orders \\\n  --key '{\"PK\":{\"S\":\"CUSTOMER#C001\"},\"SK\":{\"S\":\"ORDER#2024-01-15#O001\"}}' \\\n  --update-expression \"SET #s = :new_status, updated_at = :ts\" \\\n  --condition-expression \"#s = :old_status\" \\\n  --expression-attribute-names '{\"#s\":\"status\"}' \\\n  --expression-attribute-values '{\":new_status\":{\"S\":\"shipped\"},\":old_status\":{\"S\":\"pending\"},\":ts\":{\"S\":\"2024-01-16T10:00:00Z\"}}'\n```\n\n```bash\n# Delete an item\naws dynamodb delete-item \\\n  --table-name Orders \\\n  --key '{\"PK\":{\"S\":\"CUSTOMER#C001\"},\"SK\":{\"S\":\"ORDER#2024-01-15#O001\"}}'\n```\n\n## Queries and Scans\n\n```bash\n# Query with sort key condition\naws dynamodb query \\\n  --table-name Orders \\\n  --key-condition-expression \"PK = :pk AND begins_with(SK, :prefix)\" \\\n  --expression-attribute-values '{\":pk\":{\"S\":\"CUSTOMER#C001\"},\":prefix\":{\"S\":\"ORDER#2024\"}}' \\\n  --scan-index-forward false \\\n  --limit 10\n```\n\n```bash\n# Query a GSI\naws dynamodb query \\\n  --table-name Orders \\\n  --index-name GSI1 \\\n  --key-condition-expression \"GSI1PK = :pk\" \\\n  --expression-attribute-values '{\":pk\":{\"S\":\"ORDER#O001\"}}'\n```\n\n## Batch Operations\n\n```python\n# Batch write (up to 25 items)\nimport boto3\n\ndynamodb = boto3.resource('dynamodb')\ntable = dynamodb.Table('AppData')\n\nwith table.batch_writer() as batch:\n    for i in range(100):\n        batch.put_item(Item={\n            'PK': f'PRODUCT#P{i:04d}',\n            'SK': 'DETAILS',\n            'name': f'Product {i}',\n            'price': round(9.99 + i * 0.5, 2)\n        })\n```\n\n## DynamoDB Streams\n\n```bash\n# Enable streams on a table\naws dynamodb update-table \\\n  --table-name Orders \\\n  --stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES\n```\n\n```python\n# Lambda handler for DynamoDB stream events\nimport json\n\ndef handler(event, context):\n    for record in event['Records']:\n        event_name = record['eventName']  # INSERT, MODIFY, REMOVE\n        new_image = record['dynamodb'].get('NewImage', {})\n        old_image = record['dynamodb'].get('OldImage', {})\n\n        if event_name == 'MODIFY':\n            old_status = old_image.get('status', {}).get('S')\n            new_status = new_image.get('status', {}).get('S')\n            if old_status != new_status:\n                print(f\"Status changed: {old_status} -> {new_status}\")\n                # Trigger downstream processing\n```\n\n## TTL (Time to Live)\n\n```bash\n# Enable TTL on an attribute\naws dynamodb update-time-to-live \\\n  --table-name Sessions \\\n  --time-to-live-specification Enabled=true,AttributeName=expires_at\n```\n\n```python\n# Set TTL when writing items (epoch timestamp)\nimport time\n\ntable.put_item(Item={\n    'PK': 'SESSION#abc123',\n    'SK': 'DATA',\n    'user_id': 'U001',\n    'expires_at': int(time.time()) + 86400  # 24 hours from now\n})\n```\n\n## Best Practices\n\n- Design for access patterns first, not entity relationships\n- Use single-table design to minimize the number of requests\n- Use `begins_with` on sort keys for hierarchical data queries\n- Enable on-demand (PAY_PER_REQUEST) for unpredictable workloads\n- Use GSIs sparingly — each one duplicates data and costs extra\n- Enable DynamoDB Streams + Lambda for event-driven reactions\n- Use TTL to auto-expire temporary data (sessions, caches)\n- Use condition expressions to prevent write conflicts\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Faws-dynamodb",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill aws-dynamodb",{"tool":40,"command":41},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill aws-dynamodb",{"tool":43,"command":44},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill aws-dynamodb","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Faws-dynamodb\u002FSKILL.md",true,[48],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"customize.toml","OTHER","其他",1738,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fbmad-cis-agent-creative-problem-solver\u002Fcustomize.toml",[55,69,79,88,94,101],{"skillNo":56,"name":57,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":65,"publishedAt":21},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[60],{"categoryNo":61,"categoryName":62,"taxonomyType":63,"taxonomyTypeDesc":64},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[66,67,68],"model","model hierarchy","model hierarchy skill",{"skillNo":70,"name":71,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":75,"publishedAt":21},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[74],{"categoryNo":61,"categoryName":62,"taxonomyType":63,"taxonomyTypeDesc":64},[76,77,78],"MCP","zoom","zoom mcp",{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":21},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[85,86,87,77],"sdk","zoom apps sdk","apps",{"skillNo":89,"name":90,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":21},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[90],{"skillNo":95,"name":96,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":100,"publishedAt":21},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[99],{"categoryNo":61,"categoryName":62,"taxonomyType":63,"taxonomyTypeDesc":64},[96],{"skillNo":102,"name":103,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":21},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[103]]