Skip to main content

global_tables

Creates, updates, deletes or gets a global_table resource or lists global_tables in a region

Overview

Nameglobal_tables
TypeResource
DescriptionVersion: None. Resource Type definition for AWS::DynamoDB::GlobalTable
Idaws.dynamodb.global_tables

Fields

NameDatatypeDescription
arnstring
stream_arnstring
attribute_definitionsarray
billing_modestring
global_secondary_indexesarray
key_schemaarray
local_secondary_indexesarray
write_provisioned_throughput_settingsobject
write_on_demand_throughput_settingsobject
replicasarray
sse_specificationobjectRepresents the settings used to enable server-side encryption.
stream_specificationobjectRepresents the DynamoDB Streams configuration for a table in DynamoDB.
table_namestring
table_idstring
time_to_live_specificationobjectRepresents the settings used to enable or disable Time to Live (TTL) for the specified table.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTKeySchema, AttributeDefinitions, Replicas, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all global_tables in a region.

SELECT
region,
arn,
stream_arn,
attribute_definitions,
billing_mode,
global_secondary_indexes,
key_schema,
local_secondary_indexes,
write_provisioned_throughput_settings,
write_on_demand_throughput_settings,
replicas,
sse_specification,
stream_specification,
table_name,
table_id,
time_to_live_specification
FROM aws.dynamodb.global_tables
WHERE region = 'us-east-1';

Gets all properties from an individual global_table.

SELECT
region,
arn,
stream_arn,
attribute_definitions,
billing_mode,
global_secondary_indexes,
key_schema,
local_secondary_indexes,
write_provisioned_throughput_settings,
write_on_demand_throughput_settings,
replicas,
sse_specification,
stream_specification,
table_name,
table_id,
time_to_live_specification
FROM aws.dynamodb.global_tables
WHERE region = 'us-east-1' AND data__Identifier = '<TableName>';

INSERT example

Use the following StackQL query and manifest file to create a new global_table resource, using stack-deploy.

/*+ create */
INSERT INTO aws.dynamodb.global_tables (
AttributeDefinitions,
KeySchema,
Replicas,
region
)
SELECT
'{{ AttributeDefinitions }}',
'{{ KeySchema }}',
'{{ Replicas }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.dynamodb.global_tables
WHERE data__Identifier = '<TableName>'
AND region = 'us-east-1';

Permissions

To operate on the global_tables resource, the following permissions are required:

Create

dynamodb:CreateTable,
dynamodb:CreateTableReplica,
dynamodb:Describe*,
dynamodb:UpdateTimeToLive,
dynamodb:UpdateContributorInsights,
dynamodb:UpdateContinuousBackups,
dynamodb:ListTagsOfResource,
dynamodb:Query,
dynamodb:Scan,
dynamodb:UpdateItem,
dynamodb:PutItem,
dynamodb:GetItem,
dynamodb:DeleteItem,
dynamodb:BatchWriteItem,
dynamodb:TagResource,
dynamodb:EnableKinesisStreamingDestination,
dynamodb:DisableKinesisStreamingDestination,
dynamodb:UpdateTableReplicaAutoScaling,
dynamodb:TagResource,
dynamodb:GetResourcePolicy,
dynamodb:PutResourcePolicy,
application-autoscaling:DeleteScalingPolicy,
application-autoscaling:DeleteScheduledAction,
application-autoscaling:DeregisterScalableTarget,
application-autoscaling:Describe*,
application-autoscaling:PutScalingPolicy,
application-autoscaling:PutScheduledAction,
application-autoscaling:RegisterScalableTarget,
kinesis:ListStreams,
kinesis:DescribeStream,
kinesis:PutRecords,
kms:CreateGrant,
kms:DescribeKey,
kms:ListAliases,
kms:Decrypt,
kms:RevokeGrant,
cloudwatch:PutMetricData,
iam:CreateServiceLinkedRole

Read

dynamodb:Describe*,
dynamodb:GetResourcePolicy,
application-autoscaling:Describe*,
cloudwatch:PutMetricData,
dynamodb:ListTagsOfResource,
kms:DescribeKey

Update

dynamodb:Describe*,
dynamodb:CreateTableReplica,
dynamodb:UpdateTable,
dynamodb:UpdateTimeToLive,
dynamodb:UpdateContinuousBackups,
dynamodb:UpdateContributorInsights,
dynamodb:ListTagsOfResource,
dynamodb:Query,
dynamodb:Scan,
dynamodb:UpdateItem,
dynamodb:PutItem,
dynamodb:GetItem,
dynamodb:DeleteItem,
dynamodb:BatchWriteItem,
dynamodb:DeleteTable,
dynamodb:DeleteTableReplica,
dynamodb:UpdateItem,
dynamodb:TagResource,
dynamodb:UntagResource,
dynamodb:EnableKinesisStreamingDestination,
dynamodb:DisableKinesisStreamingDestination,
dynamodb:UpdateTableReplicaAutoScaling,
dynamodb:UpdateKinesisStreamingDestination,
dynamodb:GetResourcePolicy,
dynamodb:PutResourcePolicy,
dynamodb:DeleteResourcePolicy,
application-autoscaling:DeleteScalingPolicy,
application-autoscaling:DeleteScheduledAction,
application-autoscaling:DeregisterScalableTarget,
application-autoscaling:Describe*,
application-autoscaling:PutScalingPolicy,
application-autoscaling:PutScheduledAction,
application-autoscaling:RegisterScalableTarget,
kinesis:ListStreams,
kinesis:DescribeStream,
kinesis:PutRecords,
kms:CreateGrant,
kms:DescribeKey,
kms:ListAliases,
kms:RevokeGrant,
cloudwatch:PutMetricData

Delete

dynamodb:Describe*,
dynamodb:DeleteTable,
application-autoscaling:DeleteScalingPolicy,
application-autoscaling:DeleteScheduledAction,
application-autoscaling:DeregisterScalableTarget,
application-autoscaling:Describe*,
application-autoscaling:PutScalingPolicy,
application-autoscaling:PutScheduledAction,
application-autoscaling:RegisterScalableTarget

List

dynamodb:ListTables,
cloudwatch:PutMetricData