Bird
0
0

Which of the following is the correct syntax to define a DynamoDB data source in AWS AppSync's CloudFormation template?

easy📝 Syntax Q3 of 15
DynamoDB - with Serverless
Which of the following is the correct syntax to define a DynamoDB data source in AWS AppSync's CloudFormation template?
A"Type": "AWS::DynamoDB::Table", "Properties": {"TableName": "MyTableDS"}
B"Type": "AWS::Lambda::Function", "Properties": {"FunctionName": "MyTableDS"}
C"Type": "AWS::AppSync::Resolver", "Properties": {"DataSourceName": "MyTableDS"}
D"Type": "AWS::AppSync::DataSource", "Properties": {"Name": "MyTableDS", "Type": "AMAZON_DYNAMODB", "DynamoDBConfig": {"TableName": "MyTable"}}
Step-by-Step Solution
Solution:
  1. Step 1: Identify the resource type for AppSync data source

    AppSync data sources use "AWS::AppSync::DataSource" in CloudFormation.
  2. Step 2: Check the properties for DynamoDB data source

    Properties include Name, Type as AMAZON_DYNAMODB, and DynamoDBConfig with TableName.
  3. Final Answer:

    Correct syntax uses AWS::AppSync::DataSource with DynamoDBConfig -> Option D
  4. Quick Check:

    DataSource syntax = "Type": "AWS::AppSync::DataSource", "Properties": {"Name": "MyTableDS", "Type": "AMAZON_DYNAMODB", "DynamoDBConfig": {"TableName": "MyTable"}} [OK]
Quick Trick: Data source type is AWS::AppSync::DataSource [OK]
Common Mistakes:
MISTAKES
  • Using DynamoDB table resource instead of data source
  • Confusing resolver with data source
  • Using Lambda function resource for data source

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More DynamoDB Quizzes