Question 2:
A Lambda function reads metadata from an S3 object and stores the metadata in a DynamoDB table. The function is triggered whenever an object is stored within the S3 bucket. How should the Lambda function be given access to the DynamoDB table?
Answer options:
A.Create a VPC endpoint for DynamoDB within a VPC. Configure the Lambda function to access resources in the VPC.B.Create a resource policy that grants the Lambda function permissions to write to the DynamoDB table. Attach the policy to the DynamoDB table. C.Create an IAM user with permissions to write to the DynamoDB table. Store an access key for that user in the Lambda environment variables. D.Create an IAM service role with permissions to write to the DynamoDB table. Associate that role with the Lambda function.