0
0
DynamoDBquery~10 mins

VPC endpoints for private access in DynamoDB - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the VPC endpoint type for private DynamoDB access.

DynamoDB
aws ec2 create-vpc-endpoint --vpc-id vpc-123abc --service-name com.amazonaws.us-east-1.dynamodb --vpc-endpoint-type [1]
Drag options to blanks, or click blank then click option'
AInterface
BGateway
CPrivateLink
DGatewayLoadBalancer
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing Interface endpoint which is used for other AWS services like EC2.
Using PrivateLink which is a different technology.
2fill in blank
medium

Complete the code to add a route to the route table for the DynamoDB VPC endpoint.

DynamoDB
aws ec2 create-route --route-table-id rtb-456def --destination-prefix-list-id [1] --vpc-endpoint-id vpce-789ghi
Drag options to blanks, or click blank then click option'
Apl-12345678
Bpl-87654321
Cpl-abcdef12
Dpl-fedcba98
Attempts:
3 left
💡 Hint
Common Mistakes
Using a prefix list ID for another service.
Confusing the VPC endpoint ID with the prefix list ID.
3fill in blank
hard

Fix the error in the command to describe the VPC endpoints filtering by service name.

DynamoDB
aws ec2 describe-vpc-endpoints --filters Name=service-name,Values=[1]
Drag options to blanks, or click blank then click option'
Adynamodb.us-east-1
Bdynamodb
Ccom.amazonaws.us-east-1.dynamodb
Daws.dynamodb
Attempts:
3 left
💡 Hint
Common Mistakes
Using only the service name without region.
Using incorrect service name formats.
4fill in blank
hard

Fill both blanks to create a policy that allows access to DynamoDB via the VPC endpoint.

DynamoDB
{
  "Statement": [{
    "Effect": "Allow",
    "Principal": "*",
    "Action": "[1]",
    "Resource": "*",
    "Condition": {
      "StringEquals": {
        "aws:SourceVpce": "[2]"
      }
    }
  }]
}
Drag options to blanks, or click blank then click option'
Adynamodb:*
Bvpce-789ghi
Cs3:*
Dlambda:InvokeFunction
Attempts:
3 left
💡 Hint
Common Mistakes
Using unrelated service actions like S3 or Lambda.
Not specifying the VPC endpoint ID in the condition.
5fill in blank
hard

Fill the blanks to create a DynamoDB client in Python that connects through the VPC endpoint.

DynamoDB
import boto3

client = boto3.client('[1]', region_name='us-east-1')

response = client.[2]()
Drag options to blanks, or click blank then click option'
Adynamodb
Bvpce-123abc
Cdescribe_table
Dlist_tables
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong service names like 's3'.
Using incorrect method names like 'describe_table'.
Thinking a custom endpoint_url is needed for Gateway endpoints.