0
0
AWScloud~10 mins

Event triggers for Lambda in AWS - 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 AWS service that triggers the Lambda function.

AWS
Event source for Lambda is [1].
Drag options to blanks, or click blank then click option'
ARDS
BEC2
CVPC
DS3
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing EC2 which is a compute service, not an event source for Lambda.
2fill in blank
medium

Complete the code to specify the event type that triggers Lambda on S3.

AWS
Lambda triggers on S3 event type: [1].
Drag options to blanks, or click blank then click option'
ADBUpdate
BInstanceStart
CObjectCreated
DNetworkChange
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting unrelated event types like 'InstanceStart' which is for EC2.
3fill in blank
hard

Fix the error in the event source mapping code for Lambda trigger.

AWS
Event source mapping: {
  "EventSourceArn": "arn:aws:sqs:us-east-1:123456789012:MyQueue",
  "FunctionName": "MyLambdaFunction",
  "[1]": true
}
Drag options to blanks, or click blank then click option'
AEnable
BEnabled
CActive
DStatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Enable' which is incorrect property name.
4fill in blank
hard

Fill both blanks to configure a CloudWatch event rule to trigger Lambda every 5 minutes.

AWS
Rule = {
  "ScheduleExpression": "[1]",
  "Targets": [{"Arn": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction", "Id": "[2]"}]
}
Drag options to blanks, or click blank then click option'
Arate(5 minutes)
Bcron(0/5 * * * ? *)
CMyLambdaTarget
DLambdaTrigger
Attempts:
3 left
💡 Hint
Common Mistakes
Using cron expression incorrectly or confusing target Id with ARN.
5fill in blank
hard

Fill all three blanks to create an S3 event notification that triggers Lambda on object deletion.

AWS
{
  "LambdaFunctionConfigurations": [
    {
      "LambdaFunctionArn": "arn:aws:lambda:us-east-1:123456789012:function:MyFunction",
      "Events": ["[1]"],
      "Filter": {
        "Key": {
          "FilterRules": [
            {"Name": "[2]", "Value": "[3]"}
          ]
        }
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
As3:ObjectRemoved:*
Bs3:ObjectCreated:*
Cprefix
Dsuffix
Attempts:
3 left
💡 Hint
Common Mistakes
Using 's3:ObjectCreated:*' instead of removal event.