Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Misspelling 'minutes' or using singular 'minute'.
Using unsupported time units or formats.
✗ Incorrect
The ScheduleExpression for a 5-minute rate must be exactly 'rate(5 minutes)'.
2fill in blank
mediumComplete 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect or incomplete event detail-type strings.
Missing quotes around the string.
✗ Incorrect
The correct detail-type for EC2 instance state changes is 'EC2 Instance State-change Notification'.
3fill in blank
hardFix 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Missing quotes around the ARN string.
Using incorrect ARN format or wrong service ARN.
✗ Incorrect
The ARN must be a string with quotes and the correct Lambda function ARN format.
4fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect source strings like 'aws.s3.object'.
Using wrong or placeholder bucket names.
✗ Incorrect
The source for S3 events is 'aws.s3' and the bucket name must be the exact bucket string.
5fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong source or detail-type strings.
Incorrect ARN format or service for target.
✗ Incorrect
The source is 'aws.ec2', detail-type matches EC2 state changes, and the target ARN is the SNS topic ARN.