title: 'DynamoDB Data Connector' sidebar_label: 'DynamoDB Data Connector' description: 'DynamoDB Data Connector Documentation' tags:
Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. This connector enables using DynamoDB tables as data sources for federated SQL queries in Spice.
fromThe from field should specify the DynamoDB table name:
from | Description |
|---|---|
dynamodb:table | Read data from a DynamoDB table named table |
:::note
If an expected table is not found, verify the dynamodb_aws_region parameter. DynamoDB tables are region-specific.
:::
nameThe dataset name. This will be used as the table name within Spice.
Example:
The dataset name cannot be a reserved keyword.
paramsThe DynamoDB data connector supports the following configuration parameters:
| Parameter Name | Description |
|---|---|
dynamodb_aws_region | Required. The AWS region containing the DynamoDB table |
dynamodb_aws_access_key_id | Optional. AWS access key ID for authentication. If not provided, credentials will be loaded from environment variables or IAM roles |
dynamodb_aws_secret_access_key | Optional. AWS secret access key for authentication. If not provided, credentials will be loaded from environment variables or IAM roles |
dynamodb_aws_session_token | Optional. AWS session token for authentication |
If AWS credentials are not explicitly provided in the configuration, the connector will automatically load credentials from the following sources in order:
Environment Variables:
AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEYAWS_SESSION_TOKEN (if using temporary credentials)Shared AWS Config/Credentials Files:
Config file: ~/.aws/config (Linux/Mac) or %UserProfile%\.aws\config (Windows)
Credentials file: ~/.aws/credentials (Linux/Mac) or %UserProfile%\.aws\credentials (Windows)
The AWS_PROFILE environment variable can be used to specify a named profile.
Supports both static credentials and SSO sessions
Example credentials file:
:::tip To set up SSO authentication:
aws configure sso to configure a new SSO profileAWS_PROFILE=sso-profileaws sso login to start a new SSO session
:::Web Identity Token Credentials:
ECS Container Credentials:
The connector will try each source in order until valid credentials are found. If no valid credentials are found, an authentication error will be returned.
:::note[IAM Permissions]
Regardless of the credential source, the IAM role or user must have appropriate DynamoDB permissions (e.g., dynamodb:Scan, dynamodb:DescribeTable) to access the table.
:::
The IAM role or user needs the following permissions to access DynamoDB tables:
| Permission | Purpose |
|---|---|
dynamodb:Scan | Required. Allows reading all items from the table |
dynamodb:DescribeTable | Required. Allows fetching table metadata and schema information |
:::warning[Security Considerations]
dynamodb:* permissions as it grants more access than necessary.:::
DynamoDB supports complex nested JSON structures. These fields can be queried using SQL:
:::warning[Limitations]
:::
The DynamoDB connector supports the following data types and mappings:
Example schema from a users table:
EC2 Instance Metadata Service (IMDSv2):