Bird
0
0

Given this SAM template snippet, which event source triggers the Lambda function?

medium📝 Predict Output Q5 of 15
AWS - Serverless Architecture
Given this SAM template snippet, which event source triggers the Lambda function?
Resources:
  MyFunction:
    Type: AWS::Serverless::Function
    Properties:
      Events:
        S3Upload:
          Type: S3
          Properties:
            Bucket: my-upload-bucket
            Events: s3:ObjectCreated:*
AAn HTTP GET request to the API Gateway
BAn object upload event to the S3 bucket 'my-upload-bucket'
CA scheduled CloudWatch event
DA DynamoDB table update
Step-by-Step Solution
Solution:
  1. Step 1: Identify event type

    The event type is S3 with Properties specifying Bucket and Events.
  2. Step 2: Understand event trigger

    The event 's3:ObjectCreated:*' triggers on any object creation in the specified bucket.
  3. Final Answer:

    An object upload event to the S3 bucket 'my-upload-bucket' -> Option B
  4. Quick Check:

    Is this an API or CloudWatch event? No. [OK]
Quick Trick: S3 event triggers on bucket object creation [OK]
Common Mistakes:
  • Confusing S3 event with API Gateway event
  • Assuming scheduled or DynamoDB triggers
  • Ignoring the bucket name and event type

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes