0
0
AWScloud~10 mins

CloudWatch Events (EventBridge) 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 create a CloudWatch Event rule that triggers every 5 minutes.

AWS
{
  "Name": "MyScheduledRule",
  "ScheduleExpression": "rate([1])",
  "State": "ENABLED"
}
Drag options to blanks, or click blank then click option'
A5 minutes
B5 minutess
C5 min
Devery 5 minutes
Attempts:
3 left
💡 Hint
Common Mistakes
Misspelling 'minutes' or using singular 'minute'.
Using unsupported time units or formats.
2fill in blank
medium

Complete the code to specify the event pattern that matches EC2 instance state changes.

AWS
{
  "EventPattern": {
    "source": ["aws.ec2"],
    "detail-type": [[1]]
  }
}
Drag options to blanks, or click blank then click option'
A"Instance State Change"
B"EC2 Instance State-change Notification"
C"EC2 State Change"
D"EC2 Instance Change"
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect or incomplete event detail-type strings.
Missing quotes around the string.
3fill in blank
hard

Fix the error in the target configuration to send events to a Lambda function.

AWS
{
  "Targets": [
    {
      "Id": "MyLambdaTarget",
      "Arn": [1]
    }
  ]
}
Drag options to blanks, or click blank then click option'
A"arn:aws:s3:::mybucket"
Barn:aws:lambda:us-east-1:123456789012:function:MyFunction
C"lambda:MyFunction"
D"arn:aws:lambda:us-east-1:123456789012:function:MyFunction"
Attempts:
3 left
💡 Hint
Common Mistakes
Missing quotes around the ARN string.
Using incorrect ARN format or wrong service ARN.
4fill in blank
hard

Fill both blanks to create an event pattern that matches S3 object creation events in a specific bucket.

AWS
{
  "EventPattern": {
    "source": [[1]],
    "detail": {
      "bucket": {
        "name": [[2]]
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
A"aws.s3"
B"aws.s3.object"
C"my-bucket-name"
D"example-bucket"
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect source strings like 'aws.s3.object'.
Using wrong or placeholder bucket names.
5fill in blank
hard

Fill all three blanks to define a CloudWatch Event rule that triggers on EC2 instance start and sends to an SNS topic.

AWS
{
  "Name": "EC2StartRule",
  "EventPattern": {
    "source": [[1]],
    "detail-type": [[2]]
  },
  "Targets": [
    {
      "Id": "SendToSNS",
      "Arn": [3]
    }
  ]
}
Drag options to blanks, or click blank then click option'
A"aws.ec2"
B"EC2 Instance State-change Notification"
C"arn:aws:sns:us-east-1:123456789012:MyTopic"
D"aws.sns"
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong source or detail-type strings.
Incorrect ARN format or service for target.