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.204.0.tar.gz
.
File metadata
- Download URL: aws-cdk.aws-dynamodb-global-1.204.0.tar.gz
- Upload date:
- Size: 39.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb3544798a3da7a3f2c388b411941d575750f0025cf60f830c26f1841fc83b61 |
|
MD5 | f4ae2b97eff51d968f9b041295cf8d56 |
|
BLAKE2b-256 | 07eb1c639e7c1e9ddbf5a0dfd752d052278d01aa8622e7e787d8193c55874543 |
File details
Details for the file aws_cdk.aws_dynamodb_global-1.204.0-py3-none-any.whl
.
File metadata
- Download URL: aws_cdk.aws_dynamodb_global-1.204.0-py3-none-any.whl
- Upload date:
- Size: 38.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff9f0d115fbbd38bf7dc66fcb6a6206ec6d659b4a699d34620e5fc0fc8b5539f |
|
MD5 | c606b7c9cb7ce119cf53a914b4f14850 |
|
BLAKE2b-256 | b34e30a1539051cca2a83639b6ddc494d1d0ad09d6aeb4897d30e961dee2b045 |