DynamoDb
Configure an Amazon DynamoDB table as a data source for your GraphQL API resolver.
Syntax
To declare this entity in your AWS Serverless Application Model (AWS 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
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
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
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
CloudFormation compatibility: This property is passed directly to the
Nameproperty of anAWS::AppSync::DataSourceresource. Permissions-
Provision permissions to your data source using AWS 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.
AWS SAM uses an
AWS::Serverless::Connectorresource which is transformed at deployment to provision your permissions. To learn about generated resources, see CloudFormation resources generated when you specify AWS::Serverless::Connector.Note
You can specify
PermissionsorServiceRoleArn, but not both. If neither are specified, AWS SAM will generate default values ofReadandWrite. To revoke access to your data source, remove the DynamoDB object from your AWS SAM template.Type: List
Required: No
CloudFormation compatibility: This property is unique to AWS SAM and doesn’t have an CloudFormation equivalent. It is similar to the
Permissionsproperty of anAWS::Serverless::Connectorresource. -
Region-
The AWS Region of your DynamoDB table. If you don’t specify it, AWS SAM uses
AWS::Region.Type: String
Required: No
CloudFormation compatibility: This property is passed directly to the
AwsRegionproperty of anAWS::AppSync::DataSource DynamoDBConfigobject. ServiceRoleArn-
The AWS 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, AWS SAM applies the default value for
Permissions.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.CloudFormation compatibility: This property is unique to AWS SAM and doesn’t have an CloudFormation equivalent.
TableName-
The table name.
Type: String
Required: Yes
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
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
CloudFormation compatibility: This property is passed directly to the
Versionedproperty of anAWS::AppSync::DataSource DynamoDBConfigobject.