Bird
0
0

Which of the following is the correct JSON snippet to configure an S3 bucket event trigger for Lambda?

easy📝 Configuration Q3 of 15
AWS - Lambda
Which of the following is the correct JSON snippet to configure an S3 bucket event trigger for Lambda?
A{"EventSourceArn": "arn:aws:dynamodb:region:account-id:table/table-name", "StartingPosition": "LATEST"}
B{"Events": ["s3:ObjectCreated:*"], "Filter": {"Key": {"FilterRules": [{"Name": "suffix", "Value": ".jpg"}]}}, "LambdaFunctionArn": "arn:aws:lambda:region:account-id:function:function-name"}
C{"ScheduleExpression": "rate(5 minutes)", "TargetArn": "arn:aws:lambda:region:account-id:function:function-name"}
D{"EventSourceArn": "arn:aws:sqs:region:account-id:queue-name", "FunctionName": "function-name"}
Step-by-Step Solution
Solution:
  1. Step 1: Identify S3 event trigger format

    S3 event triggers use the Events key with values like ['s3:ObjectCreated:*'] and can include filters for object suffixes.
  2. Step 2: Verify the snippet matches S3 event trigger structure

    {"Events": ["s3:ObjectCreated:*"], "Filter": {"Key": {"FilterRules": [{"Name": "suffix", "Value": ".jpg"}]}}, "LambdaFunctionArn": "arn:aws:lambda:region:account-id:function:function-name"} matches the S3 event trigger JSON format with event type, filter, and Lambda ARN.
  3. Final Answer:

    Correct S3 event trigger JSON snippet -> Option B
  4. Quick Check:

    S3 event trigger JSON = {"Events": ["s3:ObjectCreated:*"], "Filter": {"Key": {"FilterRules": [{"Name": "suffix", "Value": ".jpg"}]}}, "LambdaFunctionArn": "arn:aws:lambda:region:account-id:function:function-name"} [OK]
Quick Trick: S3 triggers use 's3:ObjectCreated:*' event with optional filters [OK]
Common Mistakes:
  • Using SQS or DynamoDB event formats for S3 triggers
  • Missing event type or Lambda ARN in JSON
  • Confusing schedule expressions with event triggers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes