A DevOps engineer is building an application that uses an AWS Lambda function to query
an Amazon Aurora MySQL DB cluster. The Lambda function performs only read queries.
Amazon EventBridge events invoke the Lambda function.
As more events invoke the Lambda function each second, the database's latency
increases and the database's throughput decreases. The DevOps engineer needs to
improve the performance of the application.
Which combination of steps will meet these requirements? (Select THREE.)
A. Use Amazon RDS Proxy to create a proxy. Connect the proxy to the Aurora cluster reader endpoint. Set a maximum connections percentage on the proxy.
B. Implement database connection pooling inside the Lambda code. Set a maximum number of connections on the database connection pool.
C. Implement the database connection opening outside the Lambda event handler code.
D. Implement the database connection opening and closing inside the Lambda event handler code.
E. Connect to the proxy endpoint from the Lambda function.
F. Connect to the Aurora cluster endpoint from the Lambda function.
A company has an organization in AWS Organizations. The organization includes workload
accounts that contain enterprise applications. The company centrally manages users from
an operations account. No users can be created in the work load accounts. The company
recently added an operations team and must provide the operations team members with
administrator access to each workload account.
Which combination of actions will provide this access? (Choose three.)
A. Create a SysAdmin role in the operations account. Attach the AdministratorAccess policy to the role. Modify the trust relationship to allow the sts:AssumeRole action from the workload accounts.
B. Create a SysAdmin role in each workload account. Attach the AdministratorAccess policy to the role. Modify the trust relationship to allow the sts:AssumeRole action from the operations account.
C. Create an Amazon Cognito identity pool in the operations account. Attach the SysAdmin role as an authenticated role.
D. In the operations account, create an IAM user for each operations team member.
E. In the operations account, create an IAM user group that is named SysAdmins. Add an IAM policy that allows the sts:AssumeRole action for the SysAdmin role in each workload account. Add all operations team members to the group.
F. Create an Amazon Cognito user pool in the operations account. Create an Amazon Cognito user for each operations team member.
A production account has a requirement that any Amazon EC2 instance that has been
logged in to manually must be terminated within 24 hours. All applications in the production
account are using Auto Scaling groups with the Amazon CloudWatch Logs agent
configured.
How can this process be automated?
A. Create a CloudWatch Logs subscription to an AWS Step Functions application. Configure an AWS Lambda function to add a tag to the EC2 instance that produced the login event and mark the instance to be decommissioned. Create an Amazon EventBridge rule to invoke a second Lambda function once a day that will terminate all instances with this tag.
B. Create an Amazon CloudWatch alarm that will be invoked by the login event. Send the notification to an Amazon Simple Notification Service (Amazon SNS) topic that the operations team is subscribed to, and have them terminate the EC2 instance within 24 hours.
C. Create an Amazon Cloud Watch alarm that will be invoked by the login event. Configure the alarm to send to an Amazon Simple Queue Service (Amazon SQS) queue. Use a group of worker instances to process messages from the queue, which then schedules an Amazon Event Bridge rule to be invoked.
D. Create a CloudWatch Logs subscription to an AWS Lambda function. Configure the function to add a tag to the EC2 instance that produced the login event and mark the instance to be decommissioned. Create an Amazon EventBridge rule to invoke a daily Lambda function that terminates all instances with this tag.
Explanation: "You can use subscriptions to get access to a real-time feed of log events from CloudWatch Logs and have it delivered to other services such as an Amazon Kinesis stream, an Amazon Kinesis Data Firehose stream, or AWS Lambda for custom processing, analysis, or loading to other systems. When log events are sent to the receiving service, they are Base64 encoded and compressed with the gzip format."
A DevOps team uses AWS CodePipeline, AWS CodeBuild, and AWS CodeDeploy to
deploy an application. The application is a REST API that uses AWS Lambda functions and
Amazon API Gateway Recent deployments have introduced errors that have affected many
customers.
The DevOps team needs a solution that reverts to the most recent stable version of the
application when an error is detected. The solution must affect the fewest customers
possible.
Which solution Will meet these requirements With the MOST operational efficiency?
A. Set the deployment configuration in CodeDepIoy to LambdaAlIAtOnce Configure automatic rollbacks on the deployment group Create an Amazon CloudWatch alarm that detects HTTP Bad Gateway errors on API Gateway Configure the deployment group to roll back when the number of alarms meets the alarm threshold
B. Set the deployment configuration in CodeDeploy to LambdaCanary10Percent10Minutes. Configure automatic rollbacks on the deployment group Create an Amazon CloudWatch alarm that detects HTTP Bad Gateway errors on API Gateway Configure the deployment group toroll back when the number of alarms meets the alarm threshold
C. Set the deployment configuration in CodeDeploy to LambdaAllAtOnce Configure manual rollbacks on the deployment group. Create an Amazon Simple Notification Service (Amazon SNS) topc to send notifications every time a deployrnent fads. Configure the SNS topc to Invoke a new Lambda function that stops the current deployment and starts the most recent successful deployment
D. Set the deployment configuration in CodeDeploy to LambdaCanaryIOPercentIOMinutes Configure manual rollbacks on the deployment group Create a metric filter on an Amazon CloudWatch log group for API Gateway to monitor HTTP Bad Gateway errors. Configure the metric filter to Invoke a new Lambda function that stops the current eployment and starts the most recent successful deployment
A software team is using AWS CodePipeline to automate its Java application release
pipeline The pipeline consists of a source stage, then a build stage, and then a deploy
stage. Each stage contains a single action that has a runOrder value of 1.
The team wants to integrate unit tests into the existing release pipeline. The team needs a
solution that deploys only the code changes that pass all unit tests.
Which solution will meet these requirements?
A. Modify the build stage. Add a test action that has a runOrder value of 1. Use AWS CodeDeploy as the action provider to run unit tests.
B. Modify the build stage Add a test action that has a runOrder value of 2 Use AWS CodeBuild as the action provider to run unit tests
C. Modify the deploy stage Add a test action that has a runOrder value of 1 Use AWS CodeDeploy as the action provider to run unit tests
D. Modify the deploy stage Add a test action that has a runOrder value of 2 Use AWS CodeBuild as the action provider to run unit tests
Explanation:
Modify the Build Stage to Add a Test Action with a RunOrder Value of 2:
The build stage in AWS CodePipeline can have multiple actions. By adding a test
action with a runOrder value of 2, the test action will execute after the initial build
action completes.
Use AWS CodeBuild as the Action Provider to Run Unit Tests:
AWS CodeBuild is a fully managed build service that compiles source code, runs
tests, and produces software packages.
Using CodeBuild to run unit tests ensures that the tests are executed in a
controlled environment and that only the code changes that pass the unit tests
proceed to the deploy stage.
Example configuration in CodePipeline:
{
"name": "BuildStage",
"actions": [
{
"name": "Build",
"actionTypeId": {
"category": "Build",
"owner": "AWS",
"provider": "CodeBuild",
"version": "1"
},
"runOrder": 1
},
{
"name": "Test",
"actionTypeId": {
"category": "Test",
"owner": "AWS",
"provider": "CodeBuild",
"version": "1"
},
"runOrder": 2
}
]
}
By integrating the unit tests into the build stage and ensuring they run after the build
process, the pipeline guarantees that only code changes passing all unit tests are
deployed.
Page 8 out of 50 Pages |
Previous |