Practice Test

True or False: The EventBridge rules are created in Event Source.

  • Answer: False

Explanation: EventBridge rules are not created in Event Source, instead, they are designed in Event Bus to match incoming events and route them to the target to process the events.

In AWS EventBridge, you can invoke an action using which of the following?

  • a) Lambda functions
  • b) AWS Step Functions state machines
  • c) AWS Batch jobs
  • d) Amazon ECS tasks

Answer: a, b, c, d

Explanation: EventBridge can be configured to invoke multiple actions including Lambda functions, Step Functions state machines, Batch jobs and ECS tasks.

True or False: Amazon EventBridge supports cron and rate expressions.

  • Answer: True

Explanation: Amazon EventBridge supports both cron expressions, for scheduling based on calendar dates and times, and rate expressions, for durations in minutes, hours, or days.

Which of the following isn’t an action that can be invoked by an EventBridge rule?

  • a) Start an AWS Batch job
  • b) Generate an ATM transaction
  • c) Invoke an AWS Lambda function
  • d) Power on an EC2 instance

Answer: b) Generate an ATM transaction

Explanation: EventBridge rules cannot directly generate an ATM transaction. They can however, trigger AWS services like Lambda, Batch, EC2 instances, and more.

EventBridge is used to automate software product workflows. Which of these is NOT a correct pair of source and event in EventBridge?

  • a) AWS Services – Changes to your AWS resources
  • b) SaaS Applications – Login attempts
  • c) Custom apps – Sensor data
  • d) IoT devices – Downloading a file

Answer: d) IoT devices – Downloading a file

Explanation: IoT devices aren’t typically a source of “Downloading a file” event. Standard sources are AWS Services, SaaS Applications, and Custom apps.

True or False: You can only use built-in AWS events in EventBridge rules.

  • Answer: False

Explanation: In AWS EventBridge, you can create your own events in addition to built-in AWS events.

What is used to route events to the correct Lambda function in AWS EventBridge?

  • a) Event Bucket
  • b) Event Router
  • c) Event Bridge
  • d) Event Bus

Answer: d) Event Bus

Explanation: Event Bus is used in AWS EventBridge to route events to the correct lambda function.

Which of the following AWS services cannot be a target in the EventBridge rule?

  • a) AWS Fargate
  • b) AWS Glue
  • c) AWS Batch
  • d) Amazon Polly

Answer: d) Amazon Polly

Explanation: Services like AWS Fargate, AWS Glue and AWS Batch can be targeted in EventBridge rule. However, Amazon Polly cannot be a target in EventBridge rule.

True or False: EventBridge rules can contain multiple actions.

  • Answer: True

Explanation: A single EventBridge rule can trigger multiple actions. For example, multiple Lambda functions can be invoked from a single rule.

True or False: A put events API call to EventBridge will trigger an event immediately.

  • Answer: True

Explanation: A put events API call to EventBridge will cause the events to be immediately made available on the Event Bridge to match and route to targets.

What languages can you use to write AWS Lambda functions invoked by EventBridge rules?

  • a) Python only
  • b) Node.js only
  • c) Python and Node.js only
  • d) Any programming language supported by AWS Lambda

Answer: d) Any programming language supported by AWS Lambda

Explanation: Any programming language supported by AWS Lambda, such as Python, Node.js, Java, Go, .NET, etc., can be used to write the functions that are invoked by EventBridge rules.

Interview Questions

What is Amazon EventBridge used for in the AWS ecosystem?

Amazon EventBridge is used in the AWS ecosystem as a serverless event bus that makes it easier to build scalable, secure, and resilient applications. It allows for the routing of custom application data, Software-as-a-Service (SaaS) applications data, as well as AWS service data from built-in data producers to targeted endpoints.

Does Amazon EventBridge support AWS Lambda as an action to a rule?

Yes, Amazon EventBridge can target AWS Lambda functions as an action for a triggered rule, hence allowing you to automate AWS service requests and custom workflows easily.

Are there any restrictions on the number of rules you can create in EventBridge?

Yes, by default, you can have a maximum of 300 custom rules per account, per region for EventBridge.

Can Amazon EventBridge trigger actions directly to other AWS services?

Yes, Amazon EventBridge can initiate actions directly to a multitude of AWS services such as AWS Step Functions, AWS Lambda functions, and many more.

How do you secure the communications between AWS EventBridge and the target endpoints?

The communications between AWS EventBridge and the target endpoints are secured using AWS Identity and Access Management, ensuring robust access controls and permissions.

What is the correct way to filter events in Amazon EventBridge?

Event filtering in Amazon EventBridge can be achieved by using event patterns, SQS queues, or by filtering the events based on attributes such as source and detail type.

What happens if an AWS EventBridge rule matches an event but the action fails?

If an action fails, EventBridge will retry the execution according to the policy defined for the particular rule. After exhausting all retry attempts, the event will be discarded if the action still fails.

How can you easily troubleshoot when an AWS EventBridge rule is not triggering the expected action?

You can utilize CloudWatch Logs for troubleshooting this issue. EventBridge writes logs for all invocations of targets and also logs the errors when an invocation fails.

Is it possible to edit the AWS EventBridge rules after you create them?

Yes, you are allowed to make changes to your EventBridge rules after you create them. You can do this through the AWS Management Console, AWS CLI, or AWS SDKs.

What does the EventBridge rule state determine?

The rule state determines whether the rule is enabled or disabled. If the rule state is enabled, it triggers the targets when it matches an event. If it’s disabled, the triggering doesn’t happen.

Can Amazon EventBridge trigger actions in response to changes to AWS resources?

Yes, Amazon EventBridge can trigger actions in response to changes to AWS resources. It integrates with AWS CloudTrail to provide a detailed event history of API activity.

How can Amazon EventBridge help in scheduling automations?

Amazon EventBridge provides a built-in cron job-like scheduler. This allows you to schedule activities which can invoke actions, like Lambda function or an EC2 instance stop or start and many more at predetermined times/dates.

What is the function of the “Default event bus” in Amazon EventBridge?

The Default event bus receives events from AWS services and forwards them to the rules, which match the events and takes corresponding actions.

What is an event pattern in the context of AWS EventBridge?

An event pattern in EventBridge is a JSON object which uses certain attributes to filter through the events passing through the default bus. This pattern is compared with the incoming events to take a suitable action.

Can Amazon EventBridge handle cross-account events?

Yes, Amazon EventBridge can handle cross-account events. Using a resource policy on the event bus in the receiving account, you can write rules that match those events in the receiving account.

Leave a Reply

Your email address will not be published. Required fields are marked *