# Schema to create a resource of DynamoDB table using SAM

```yaml
  YourDynamoDBTable:
    Type: AWS::DynamoDB::Table
    Properties: 
      TableName: 'your-table-name'
      AttributeDefinitions: 
        - AttributeName: yourAttribute1
          AttributeType: S
        - AttributeName: yourAttribute2
          AttributeType: S
      KeySchema: 
        - AttributeName: yourAttribute1
          KeyType: HASH
        - AttributeName: yourAttribute2
          KeyType: RANGE
      ProvisionedThroughput: 
        ReadCapacityUnits: 1
        WriteCapacityUnits: 1
```

More info on the available properties is in the next resource. I use CDK documentation, as I have not found related to SAM resources.

{% embed url="<https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-dynamodb.Table.html>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tricks.bodik.tech/infrastructure/aws/sam/schema-to-create-a-resource-of-dynamodb-table-using-sam.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
