AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

AppSyncDynamoDbDataSource

An AppSync datasource backed by a DynamoDB table.

Import

import { AppSyncDynamoDbDataSource } from 'aws-cdk-lib/aws-appsync';

Or use the module namespace:

import * as appsync from 'aws-cdk-lib/aws-appsync';
// appsync.AppSyncDynamoDbDataSource

Properties

Configuration passed to the constructor as AppSyncDynamoDbDataSourceProps.

tableRequired
ITable

The DynamoDB table backing this data source.

readOnlyAccessOptional
boolean

Specify whether this Data Source is read only or has read and write permissions to the DynamoDB table.

Default: false

useCallerCredentialsOptional
boolean

Use credentials of caller to access DynamoDB.

Default: false

1 property inherited from AppSyncBackedDataSourceProps
serviceRoleOptionalinherited from AppSyncBackedDataSourceProps
IRole

The IAM service role to be assumed by AppSync to interact with the data source.

Default: - Create a new role

3 properties inherited from AppSyncBaseDataSourceProps
apiRequiredinherited from AppSyncBaseDataSourceProps
IApiRef

The API to attach this data source to.

descriptionOptionalinherited from AppSyncBaseDataSourceProps
string

The description of the data source.

Default: - None

nameOptionalinherited from AppSyncBaseDataSourceProps
string

The name of the data source. The only allowed pattern is: {[_A-Za-z][_0-9A-Za-z]*}. Any invalid characters will be automatically removed.

Default: - id of data source

Get the AWS AppSync Cheat Sheet

Everything you need to know about AWS AppSync on one page. HD quality, print-friendly.

Download Free Infographic