aws-cdk-lib.aws_dynamodb.AttributeType

enum AttributeType

LanguageType name
.NETAmazon.CDK.AWS.DynamoDB.AttributeType
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsdynamodb#AttributeType
Javasoftware.amazon.awscdk.services.dynamodb.AttributeType
Pythonaws_cdk.aws_dynamodb.AttributeType
TypeScript (source)aws-cdk-lib » aws_dynamodb » AttributeType

Data types for attributes within a table.

See also: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes

Example

import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch';

const table = new dynamodb.Table(this, 'Table', {
  partitionKey: { name: 'id', type: dynamodb.AttributeType.STRING },
});

const metric = table.metricThrottledRequestsForOperations({
  operations: [dynamodb.Operation.PUT_ITEM],
  period: Duration.minutes(1),
});

new cloudwatch.Alarm(this, 'Alarm', {
  metric: metric,
  evaluationPeriods: 1,
  threshold: 1,
});

Members

NameDescription
BINARYUp to 400KiB of binary data (which must be encoded as base64 before sending to DynamoDB).
NUMBERNumeric values made of up to 38 digits (positive, negative or zero).
STRINGUp to 400KiB of UTF-8 encoded text.

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.