Overview
Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. Key benefits include:
- Fully managed: No servers to provision, patch, or manage
- Highly scalable: Automatically scales tables to adjust for capacity and maintain performance
- High availability: Built-in replication across multiple Availability Zones
- Flexible data model: Supports key-value and document data structures
- Pay-per-use pricing: On-demand capacity mode charges only for reads and writes
DynamoDB is ideal for applications requiring consistent, single-digit millisecond latency at any scale, such as mobile backends, gaming, IoT, and real-time analytics.
Connecting
To connect DynamoDB in DBCode:
- Open the DBCode extension in Visual Studio Code and select
Add Connection. - Choose Amazon DynamoDB from the database type list.
- Configure authentication using one of the following methods:
- AWS IAM Auth Profile: Use DBCode’s centralized authentication profiles for AWS SSO, IAM Identity Center, or temporary credentials
- Access Keys: Provide an IAM access key ID and secret access key
- Default Credentials: Use the AWS SDK default credential chain (environment variables, shared credentials file, etc.)
- Local: Connect to DynamoDB Local for development and testing
- Select the AWS region where your DynamoDB tables are located.
- Save the connection to browse your tables and start working with your data.
DBCode Features for DynamoDB
With a DynamoDB connection, DBCode provides:
- Table Browser: Explore all tables with partition keys, sort keys, and global/local secondary indexes
- Column Discovery: Automatically samples table data to discover all attributes beyond just key columns
- Data Grid: View and edit table items with full support for DynamoDB’s flexible schema
- CRUD Operations: Insert, update, and delete items directly from the data grid
- Complex Types: View and edit maps, lists, sets, and nested structures as JSON
Key Concepts
DynamoDB uses a different data model than traditional SQL databases:
- Partition Key: The primary key attribute that DynamoDB uses to distribute data across partitions
- Sort Key: An optional secondary key that allows range queries within a partition
- Attributes: Each item can have different attributes (schema-less design)
DBCode displays partition and sort keys separately in the schema tree, similar to how Redshift shows distribution and sort keys.
Authentication Options
AWS IAM Auth Profile (Recommended)
Use DBCode’s authentication profiles for seamless integration with AWS SSO, IAM Identity Center, or any credential provider that supports temporary credentials. This is the most secure option as credentials are automatically refreshed.
Access Keys
For development or when using IAM users, provide static access key credentials. Ensure the IAM user has appropriate DynamoDB permissions.
DynamoDB Local
For local development, connect to DynamoDB Local running in Docker or as a JAR file.
Learn more about DynamoDB at aws.amazon.com/dynamodb.