DynamoDb
Configure an Amazon DynamoDB table as a data source for your GraphQL API resolver.
Syntax
To declare this entity in your Amazon Serverless Application Model (Amazon SAM) template, use the following syntax.
YAML
LogicalId: DeltaSync:DeltaSyncConfigDescription:StringName:StringPermissions:ListRegion:StringServiceRoleArn:StringTableArn:StringTableName:StringUseCallerCredentials:BooleanVersioned:Boolean
Properties
DeltaSync-
Describes a Delta Sync configuration.
Type: DeltaSyncConfig
Required: No
Amazon CloudFormation compatibility: This property is passed directly to the
DeltaSyncConfigproperty of anAWS::AppSync::DataSource DynamoDBConfigobject. Description-
The description of your data source.
Type: String
Required: No
Amazon CloudFormation compatibility: This property is passed directly to the
Descriptionproperty of anAWS::AppSync::DataSourceresource. LogicalId-
The unique name of your data source.
Type: String
Required: Yes
Amazon CloudFormation compatibility: This property is passed directly to the
Nameproperty of anAWS::AppSync::DataSourceresource. Name-
The name of your data source. Specify this property to override the
LogicalIdvalue.Type: String
Required: No
Amazon CloudFormation compatibility: This property is passed directly to the
Nameproperty of anAWS::AppSync::DataSourceresource. Permissions-
Provision permissions to your data source using Amazon SAM connectors. You can provide any of the following values in a list:
-
Read– Allow your resolver to read your data source. -
Write– Allow your resolver to write to your data source.
Amazon SAM uses an
AWS::Serverless::Connectorresource which is transformed at deployment to provision your permissions. To learn about generated resources, see Amazon CloudFormation resources generated when you specify AWS::Serverless::Connector.Note
You can specify
PermissionsorServiceRoleArn, but not both. If neither are specified, Amazon SAM will generate default values ofReadandWrite. To revoke access to your data source, remove the DynamoDB object from your Amazon SAM template.Type: List
Required: No
Amazon CloudFormation compatibility: This property is unique to Amazon SAM and doesn’t have an Amazon CloudFormation equivalent. It is similar to the
Permissionsproperty of anAWS::Serverless::Connectorresource. -
Region-
The Amazon Web Services Region of your DynamoDB table. If you don’t specify it, Amazon SAM uses
AWS::Region.Type: String
Required: No
Amazon CloudFormation compatibility: This property is passed directly to the
AwsRegionproperty of anAWS::AppSync::DataSource DynamoDBConfigobject. ServiceRoleArn-
The Amazon Identity and Access Management (IAM) service role ARN for the data source. The system assumes this role when accessing the data source.
You can specify
PermissionsorServiceRoleArn, but not both.Type: String
Required: No. If not specified, Amazon SAM applies the default value for
Permissions.Amazon CloudFormation compatibility: This property is passed directly to the
ServiceRoleArnproperty of anAWS::AppSync::DataSourceresource. TableArn-
The ARN for the DynamoDB table.
Type: String
Required: Conditional. If you don’t specify
ServiceRoleArn,TableArnis required.Amazon CloudFormation compatibility: This property is unique to Amazon SAM and doesn’t have an Amazon CloudFormation equivalent.
TableName-
The table name.
Type: String
Required: Yes
Amazon CloudFormation compatibility: This property is passed directly to the
TableNameproperty of anAWS::AppSync::DataSource DynamoDBConfigobject. UseCallerCredentials-
Set to
trueto use IAM with this data source.Type: Boolean
Required: No
Amazon CloudFormation compatibility: This property is passed directly to the
UseCallerCredentialsproperty of anAWS::AppSync::DataSource DynamoDBConfigobject. Versioned-
Set to
trueto use Conflict Detection, Conflict Resolution, and Sync with this data source.Type: Boolean
Required: No
Amazon CloudFormation compatibility: This property is passed directly to the
Versionedproperty of anAWS::AppSync::DataSource DynamoDBConfigobject.