AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

DynamoDbDataSource

An AppSync datasource backed by a DynamoDB table.

Import

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

Or use the module namespace:

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

Properties

Configuration passed to the constructor as DynamoDbDataSourceProps.

tableRequired
ITable

The DynamoDB table backing this data source.

readOnlyAccessOptional
boolean

Specify whether this DS 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 BackedDataSourceProps
serviceRoleOptionalinherited from BackedDataSourceProps
IRole

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

Default: - Create a new role

4 properties inherited from BaseDataSourceProps
apiRequiredinherited from BaseDataSourceProps
IGraphQLApiRef

The API to attach this data source to.

descriptionOptionalinherited from BaseDataSourceProps
string

the description of the data source.

Default: - None

metricsConfigOptionalinherited from BaseDataSourceProps
DataSourceMetricsConfig

Whether to enable enhanced metrics of the data source Value will be ignored, if `enhancedMetricsConfig.dataSourceLevelMetricsBehavior` on AppSync GraphqlApi construct is set to `FULL_REQUEST_DATA_SOURCE_METRICS`.

Default: - no metrics configuration

nameOptionalinherited from BaseDataSourceProps
string

The name of the data source.

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