ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 292 - SOA-C02 discussion

Report
Export

A company decides to stop non-production Amazon EC2 instances during the EC2 instances. The company's IT manager must receive notification in near real time whenever an EC2 instance that has an environment type tag value of non-production is started during the night.

Which solution will meet this requirement with the MOST operational efficiency?

A.
Configure an AWS Lambda function with an SMTP client library. Subscribe the Lambda function to the AWS Health Dashboard to receive notification whenever an EC2 instance is in the running state. Configure the Lambda function to use Amazon Pinpoint to send email notifications to the IT manager. Deploy a second Lambda function to throttle calls from the first Lambda function during the daytime.
Answers
A.
Configure an AWS Lambda function with an SMTP client library. Subscribe the Lambda function to the AWS Health Dashboard to receive notification whenever an EC2 instance is in the running state. Configure the Lambda function to use Amazon Pinpoint to send email notifications to the IT manager. Deploy a second Lambda function to throttle calls from the first Lambda function during the daytime.
B.
Deploy an AWS Lambda function that queries the Amazon EC2 API to determine the state of each EC2 instance. Use the EC2 instance scheduler to configure the Lambda function to run every minute during the night and to send an email notification to the IT manager for each non-production EC2 instance that is in the running state.
Answers
B.
Deploy an AWS Lambda function that queries the Amazon EC2 API to determine the state of each EC2 instance. Use the EC2 instance scheduler to configure the Lambda function to run every minute during the night and to send an email notification to the IT manager for each non-production EC2 instance that is in the running state.
C.
Create an Amazon EventBridge rule that includes the EC2 Instance State-change Notification event type. Filter the event to capture only the running state. Create an AWS Lambda function as a target of the rule. Configure the Lambda function to check the current time and the EC2 instances' tags to determine the environment type. Create an Amazon Simple Notification Service (Amazon SNS) topic as a target of the Lambda function for notifications. Subscribe the IT manager's email address to the SNS topic.
Answers
C.
Create an Amazon EventBridge rule that includes the EC2 Instance State-change Notification event type. Filter the event to capture only the running state. Create an AWS Lambda function as a target of the rule. Configure the Lambda function to check the current time and the EC2 instances' tags to determine the environment type. Create an Amazon Simple Notification Service (Amazon SNS) topic as a target of the Lambda function for notifications. Subscribe the IT manager's email address to the SNS topic.
D.
Store the EC2 instance metadata, including the environment type, in an Amazon DynamoDB table. Deploy a custom application to an EC2 instance. Configure the custom application to poll the DynamoDB data every minute during the night and to query the Amazon EC2 API to determine the state of each instance. Additionally, configure the custom application to send an email notification to the IT manager for each non-production EC2 instance that is in the running state.
Answers
D.
Store the EC2 instance metadata, including the environment type, in an Amazon DynamoDB table. Deploy a custom application to an EC2 instance. Configure the custom application to poll the DynamoDB data every minute during the night and to query the Amazon EC2 API to determine the state of each instance. Additionally, configure the custom application to send an email notification to the IT manager for each non-production EC2 instance that is in the running state.
Suggested answer: C

Explanation:

The requirement is to monitor and notify whenever a non-production EC2 instance is started during the night. Amazon EventBridge offers a robust solution by triggering workflows in response to events.

Setting up Amazon EventBridge: Create an EventBridge rule that listens for the 'EC2 Instance State-change Notification' event. Configure the rule to trigger only when instances transition to the 'running' state.

Lambda Function: Attach a Lambda function as the target of the EventBridge rule. This function will execute when an EC2 instance starts. Inside the Lambda function, implement logic to check the current time and confirm it is during the night hours. Additionally, the function will check the instance's tags to verify if it's labeled as 'non-production'.

Notification via Amazon SNS: If the conditions are met (non-production and nighttime), the Lambda function publishes a message to an Amazon SNS topic specifically set up for this alert. The IT manager is subscribed to this topic, enabling them to receive an email notification almost instantaneously when the event occurs.

This solution is operationally efficient as it leverages serverless components that are inherently scalable and cost-effective, providing real-time monitoring and notifications without the need for continuous polling or complex infrastructure.

asked 16/09/2024
Aejaz Rab
28 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first