AttributeType
- class aws_cdk.aws_dynamodb.AttributeType(*values)
Bases:
EnumData types for attributes within a table.
- See:
- ExampleMetadata:
infused
Example:
import aws_cdk as cdk app = cdk.App() # Source table in Account A source_stack = cdk.Stack(app, "SourceStack", env=cdk.Environment(region="us-east-1", account="111111111111") ) # Region us-west-2 source_table = dynamodb.TableV2(source_stack, "SourceTable", table_name="MyMultiAccountTable", partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING), global_table_settings_replication_mode=dynamodb.GlobalTableSettingsReplicationMode.ALL ) # After replica is deployed, update source stack with the ARN source_table.grants.multi_account_replication_to("arn:aws:dynamodb:us-east-1:222222222222:table/MyMultiAccountTable")
Attributes
- BINARY
Up to 400KiB of binary data (which must be encoded as base64 before sending to DynamoDB).
- NUMBER
Numeric values made of up to 38 digits (positive, negative or zero).
- STRING
Up to 400KiB of UTF-8 encoded text.