Build a global dynamodb table
Project description
@aws-cdk/aws-dynamodb-global
---This API may emit warnings. Backward compatibility is not guaranteed.
NOTICE: This module has been deprecated in favor of @aws-cdk/aws-dynamodb.Table.replicationRegions
Global Tables builds upon DynamoDB’s global footprint to provide you with a fully managed, multi-region, and multi-master database that provides fast, local, read and write performance for massively scaled, global applications. Global Tables replicates your Amazon DynamoDB tables automatically across your choice of AWS regions.
Here is a minimal deployable Global DynamoDB tables definition:
from aws_cdk.aws_dynamodb import Attribute
from aws_cdk.aws_dynamodb import AttributeType
from aws_cdk.aws_dynamodb_global import GlobalTable
from aws_cdk.core import App
app = App()
GlobalTable(app, "globdynamodb",
partition_key=Attribute(name="hashKey", type=AttributeType.STRING),
table_name="GlobalTable",
regions=["us-east-1", "us-east-2", "us-west-2"]
)
app.synth()
Implementation Notes
AWS Global DynamoDB Tables is an odd case currently. The way this package works -
- Creates a DynamoDB table in a separate stack in each
DynamoDBGlobalStackProps.region
specified - Deploys a CFN Custom Resource to your stack's specified region that calls a lambda that runs the aws cli which calls
createGlobalTable()
Notes
GlobalTable() will set dynamoProps.stream
to be NEW_AND_OLD_IMAGES
since this is a required attribute for AWS Global DynamoDB tables to work. The package will throw an error if any other stream
specification is set in DynamoDBGlobalStackProps
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aws-cdk.aws-dynamodb-global-1.163.1.tar.gz
.
File metadata
- Download URL: aws-cdk.aws-dynamodb-global-1.163.1.tar.gz
- Upload date:
- Size: 38.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c723f7129f5756eaebd2e992b59379dac931b2359efb4828cce17fd5c36056e2 |
|
MD5 | 2cbd62a2fdcd0b790cd3767df32d912e |
|
BLAKE2b-256 | 5018acf6c7c094b14bac03d937ca2994d9eb411a6638959bc95478f5ba99a2ea |
File details
Details for the file aws_cdk.aws_dynamodb_global-1.163.1-py3-none-any.whl
.
File metadata
- Download URL: aws_cdk.aws_dynamodb_global-1.163.1-py3-none-any.whl
- Upload date:
- Size: 37.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35793a455ee73ff49742ccb1556517bf400ededbc6d74ca9a76db19e3d176767 |
|
MD5 | d283d20d4baa98175ae1c0014b0475b5 |
|
BLAKE2b-256 | b28c6c20a6f0e28a43d744eaa0ca36e7c40da4b5539714661ce51bc817b9b07d |