Amazon

SOA-C03 Free Practice Questions — Page 8

Question 29

A company runs a non-production application on an Amazon EC2 instance. The application logs all error messages to a log file on the local file system. All entries that are written to the log file start with the word "error." A CloudOps engineer must implement a solution that gives the company the ability to search for all occurrences of the error during the previous year. Which solution will meet this requirement?

A. Install the Amazon CloudWatch agent on the EC2 instance. Configure the agent to send logs to an Amazon CloudWatch Logs log group. Create a metric filter on the log group for all messages that include the word "error."
B. Install the Amazon CloudWatch agent on the EC2 instance. Configure the agent to send an Amazon SNS message to an Amazon CloudWatch Logs log group. Create a metric filter on the log group for all messages that include the word "error."
C. Configure the log file to post all messages to an Amazon SQS queue. Create an AWS Lambda function. Configure the Lambda function to determine whether the messages include the word "error."
D. Configure the log file to send all messages to an Amazon S3 bucket. Create an event notification on the S3 bucket to publish the contents of the messages to an Amazon SQS queue.
Show Answer
Correct Answer: A
Explanation:
The CloudWatch agent can collect the EC2 log file and send it to CloudWatch Logs, where the log data can be retained for a year and searched for entries containing “error.” A metric filter can identify matching entries and produce a metric. The other options do not provide an appropriate way to collect and search the log contents.

Question 30

A company has created a new video-on-demand (VOD) application. The application runs on a fleet of Amazon EC2 instances behind an Application Load Balancer (ALB). The company configured an Amazon CloudFront distribution and set the ALB as the origin. Because of increasing application demand, the company wants to move all video files to a central Amazon S3 bucket. A CloudOps engineer needs to ensure that video files can be cached at edge locations after the company migrates the files to Amazon S3. Which solution will meet this requirement?

A. Configure CloudFront to send the X-Forwarded-For header to the origin and to redirect video requests to Amazon S3 instead of the ALB.
B. Configure a new CloudFront cache behavior to route to Amazon S3 as a new origin, based on matching an URL path pattern.
C. Configure URL signing in the CloudFront distribution by using a custom policy. Ensure that video files are accessed through signed URLs only.
D. Configure a CloudFront origin group. Specify the required HTTP status codes to direct connection attempts to a secondary origin.
Show Answer
Correct Answer: B
Explanation:
Add the S3 bucket as a separate CloudFront origin, then create a cache behavior with a path pattern matching video-file requests and route that behavior to the S3 origin. CloudFront will fetch the files from S3 and cache them at edge locations.

Question 31

A CloudOps engineer is working on cost savings for a company. The CloudOps engineer notices multiple unused Elastic IP addresses. The addresses are spread across different accounts and AWS Regions in an organization in AWS Organizations. The CloudOps engineer must administer and track the addresses based on security domains. The CloudOps engineer must be able to view the history of assigned addresses. Which solution will meet these requirements?

A. Enable AWS Config with an IP address tracking rule.
B. Use Amazon CloudWatch with custom IP metrics to view addresses by account and Region.
C. Enable Amazon VPC IP Address Manager for Organizations integrations.
D. In AWS Systems Manager Inventory, enable a resource data sync to Amazon S3 for IP tracking.
Show Answer
Correct Answer: C
Explanation:
Amazon VPC IP Address Manager (IPAM) with AWS Organizations integration provides centralized management of IP addresses, including public IPv4 addresses such as Elastic IPs, across multiple AWS accounts and Regions. IPAM supports organizing addresses by business or security domains using scopes and pools, identifies unused Elastic IP addresses, and maintains historical IP address assignment information. The other options do not provide centralized cross-account IP address administration with history tracking.

Question 31

A company's ecommerce application is running on Amazon EC2 instances that are behind an Application Load Balancer (ALB). The instances are in an Auto Scaling group. Customers report that the website is occasionally down. When the website is down, the website returns an HTTP 500 (server error) status message to customer browsers. The Auto Scaling group's health check is configured for EC2 status checks, and the instances are healthy. Which solution will resolve the problem?

A. Replace the ALB with a Network Load Balancer.
B. Add Elastic Load Balancing (ELB) health checks to the Auto Scaling group.
C. Update the target group configuration on the ALB. Enable session affinity (sticky sessions).
D. Install the Amazon CloudWatch agent on all the instances. Configure the agent to reboot the instances.
Show Answer
Correct Answer: B
Explanation:
EC2 status checks only confirm that the instances and underlying infrastructure are functioning; they do not detect application-level failures. Configure the Auto Scaling group to use ELB health checks so it can identify instances that the ALB marks unhealthy and replace them.

Question 32

A company recently purchased Savings Plans. The company wants to receive email notification when the company's utilization drops below 90% for a given day. Which solution will meet this requirement?

A. Create an Amazon CloudWatch alarm to monitor the Savings Plan check in AWS Trusted Advisor. Configure an Amazon SQS queue for email notification when the utilization drops below 90% for a given day.
B. Create an Amazon CloudWatch alarm to monitor the SavingsPlansUtilization metric under the AWS/SavingsPlans namespace in CloudWatch. Configure an Amazon SQS queue for email notification when the utilization drops below 90% for a given day.
C. Create a Savings Plans alert to monitor the daily utilization of the Savings Plans. Configure an Amazon SNS topic for email notification when the utilization drops below 90% for a given day.
D. Use AWS Budgets to create a Savings Plans budget to track the daily utilization of the Savings Plans. Configure an Amazon SNS topic for email notification when the utilization drops below 90% for a given day.
Show Answer
Correct Answer: D
Explanation:
AWS Budgets supports Savings Plans utilization budgets with daily tracking and threshold notifications. Configure the budget to alert when utilization falls below 90%, and use an Amazon SNS topic to deliver the email notification.

Question 33

A company is managing a website with a global user base hosted on Amazon EC2 with an Application Load Balancer (ALB). To reduce the load on the web servers, a CloudOps engineer configures an Amazon CloudFront distribution with the ALB as the origin. After a week of monitoring the solution, the CloudOps engineer notices that requests are still being served by the ALB and there is no change in the web server load. What are possible causes for this problem? (Choose two.)

A. CloudFront does not have the ALB configured as the origin access identity.
B. The DNS is still pointing to the ALB instead of the CloudFront distribution.
C. The ALB security group is not permitting inbound traffic from CloudFront.
D. The default, minimum, and maximum Time to Live (TTL) are set to 0 seconds on the CloudFront distribution.
E. The target groups associated with the ALB are configured for sticky sessions.
Show Answer
Correct Answer: B, D
Explanation:
If DNS still points directly to the ALB, client requests bypass CloudFront entirely, so the ALB continues serving all traffic. If the CloudFront cache behavior has default, minimum, and maximum TTLs set to 0 seconds, CloudFront forwards every request to the origin without caching, so origin load does not decrease. Origin Access Identity applies to Amazon S3 origins, not ALBs. ALB security groups blocking CloudFront would cause failures rather than unchanged origin load, and sticky sessions do not prevent CloudFront from caching cacheable content.

Question 33

A company uses an AWS Lambda function to process user uploads to an Amazon S3 bucket. The Lambda function runs in response to Amazon S3 PutObject events. A CloudOps engineer needs to set up monitoring for the Lambda function. The CloudOps engineer wants to receive a notification through an Amazon SNS topic if the function takes more than 10 seconds to process an event. Which solution will meet this requirement?

A. Collect Amazon CloudWatch logs for the Lambda function. Create a metric filter to extract the PostRuntimeExtensionsDuration metric from the logs. Create a CloudWatch alarm to publish a notification to the SNS topic when the function runtime exceeds 10 seconds.
B. Collect Amazon CloudWatch metrics for the Lambda function to extract the function runtime. Create a CloudWatch alarm to publish a notification to the SNS topic when the runtime exceeds 10 seconds.
C. Configure an Amazon CloudWatch metric filter to capture the runtime of the Lambda function. Set the function's timeout setting to 10 seconds. Create an SNS subscription to alert the CloudOps engineer if the function times out.
D. Use Amazon CloudWatch Logs Insights to query Lambda logs for the function runtime. Set up a CloudWatch alarm based on the query result. Configure Amazon SNS to send notifications when function runtime exceeds 10 seconds.
Show Answer
Correct Answer: B
Explanation:
AWS Lambda publishes the built-in Duration metric to Amazon CloudWatch, measured in milliseconds. Create a CloudWatch alarm on this metric with a threshold of 10,000 ms and configure the alarm to send a notification to the SNS topic. The PostRuntimeExtensionsDuration metric in A measures extension execution, not the function’s overall processing duration.

Question 34

A company uses a large number of Linux based Amazon EC2 instances to run business operations such as ordering, fulfillment, and billing. The company uses AWS Systems Manager to manage the EC2 instances. The company wants to ensure that the Systems Manager Agent (SSM Agent) is always up to date with the latest version. Which solution will meet this requirement in the MOST operationally efficient way?

A. Enable the Auto update SSM Agent setting in Systems Manager Fleet Manager.
B. Subscribe to SSM Agent notifications on Github. Configure the subscription events to invoke an Amazon SNS topic. Configure the SNS topic to run a custom AWS Lambda function to update the SSM Agent by using the Systems Manager Run Command API.
C. Enable the Auto update SSM Agent setting in Systems Manager Patch Manager.
D. Subscribe to SSM Agent notifications on Github. Configure the subscription events to invoke an Amazon SNS topic. Configure the topic to run a custom AWS Lambda function to update the SSM Agent by using a Systems Manager Automation document.
Show Answer
Correct Answer: A
Explanation:
Fleet Manager provides a built-in automatic SSM Agent update capability that creates and manages the necessary State Manager association to keep the SSM Agent current with minimal operational effort. The GitHub/SNS/Lambda options add unnecessary custom infrastructure, and Patch Manager is for OS/application patching rather than the native SSM Agent auto-update feature.

Question 34

A company has AWS accounts in an organization in AWS Organizations. The company has built an AWS Lambda function in one account. The Lambda function needs to retrieve a list of Amazon EC2 instances that are running in another account. Which solution will provide this access MOST securely?

A. Create an IAM user in the account where the EC2 instances are running. Collect access keys from the user. Store these credentials in AWS Systems Manager Parameter Store in the account of the Lambda function. Configure the Lambda function to use the access key and the secret key.
B. Configure the Lambda function's execution role to assume a cross-account IAM role in the account where the EC2 instances are running. Modify the trust policy of the cross-account role to allow the Lambda function to assume the role. Add the AWS STS AssumeRole API operation to the Lambda function's code.
C. From the management account in the organization, call the Organizations CreatePolicy API operation to create a new service control policy (SCP). Configure the SCP to grant lambda:InvokeFunction permission. Assign the SCP to the organization root.
D. Create a new resource-based policy for the Lambda function. In the policy, set the Principal to "*" and set the Action to lambda:InvokeFunction. Create a condition on the policy to allow access when the value of the aws:PrincipalOrgID condition key matches the organization's ID.
Show Answer
Correct Answer: B
Explanation:
Configure the Lambda execution role to assume a role in the account that owns the EC2 instances. Grant the target role only the required EC2 read permissions, such as `ec2:DescribeInstances`, and trust the Lambda execution role to assume it. STS provides temporary credentials. The other options use long-term access keys, misuse an SCP, or control who can invoke the Lambda function rather than access EC2.

Question 35

A company runs a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The company needs an AWS Lambda function to perform a custom recovery procedure on the application server when the application returns an HTTP 500 status code. A CloudOps engineer needs to design a solution that detects HTTP 500 status codes and runs the Lambda function reliably when errors are detected. Which solution will meet these requirements?

A. Configure an Amazon CloudWatch alarm on the HTTPCode_Target_5XX_Count ALB target group metric. Set the alarm action to run the Lambda function.
B. Deploy a new Lambda function that continuously scans the ALB access logs in Amazon S3 to detect HTTP 500 status codes and then invokes the existing lambda function.
C. Enable AWS CloudTrail on the application instances. Configure Amazon CloudWatch Logs metric filters to detect HTTP 500 status codes and run the Lambda function.
D. Create an Amazon EventBridge rule for all ALB request events that invokes the Lambda function. Configure the Lambda function to filter for HTTP 500 status codes internally.
Show Answer
Correct Answer: A
Explanation:
The ALB publishes the HTTPCode_Target_5XX_Count metric to Amazon CloudWatch. A CloudWatch alarm can monitor this metric and use a Lambda function as the alarm action, providing a managed and reliable way to trigger custom recovery when target-generated HTTP 500 errors occur. The other options rely on log scanning, CloudTrail (which does not capture HTTP response codes), or EventBridge events that do not exist for individual ALB requests.

$19

Get all 197 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.