Tüm alıştırma soruları
1542 soru
An organization runs a critical web application on a fleet of Amazon EC2 instances managed by an Auto Scaling group. The developer needs to configure a deployment strategy for application updates that guarantees the application maintains 100% of its capacity throughout the deployment process. Additionally, if the new version fails health checks, the system must support the fastest possible rollback to the previous version with minimal operational overhead. The organization accepts the temporary additional cost of provisioning duplicate resources during the deployment.
Which two deployment strategies meet these requirements?
Geçerli olan tümünü seçin
A developer is configuring a blue/green deployment for an Amazon ECS service using AWS CodeDeploy. The deployment must execute a validation AWS Lambda function to verify the health of the new task set before shifting production traffic. The validation function requires access to a database password that must be automatically rotated every 30 days. Additionally, the CodeDeploy service itself requires permissions to manage the ECS deployment. Which combination of configurations should the developer use to meet these requirements?
A developer has deployed a Java application on an Amazon EC2 instance. The application logs details, including multi-line stack traces, to a local file at `/var/log/app/output.log`. The developer has configured the unified Amazon CloudWatch agent on the instance to stream these logs to a CloudWatch Logs log group. However, when viewing the logs in the CloudWatch console, each line of a single Java stack trace appears as a separate log event, making troubleshooting difficult. Which action should the developer take to group each multi-line stack trace into a single log event?
A developer is configuring a microservices application running on Amazon Elastic Kubernetes Service (Amazon EKS). The application needs to retrieve database credentials to connect to an Amazon RDS for Microsoft SQL Server database. The company's security policy requires that these credentials be encrypted at rest and automatically rotated every 30 days without manual intervention or application redeployment. Which TWO steps should the developer perform to meet these requirements securely? (Select TWO.)
Geçerli olan tümünü seçin
A developer is deploying a serverless application using the AWS Serverless Application Model (SAM). The template defines an AWS::Serverless::Function resource that needs to read and write items in an Amazon DynamoDB table defined in the same template. During initial testing, the function fails to access the table due to missing permissions. The developer wants to resolve this issue by applying the principle of least privilege using the most operationally efficient method that native AWS SAM features support. Which configuration should the developer add to the template to resolve the permission issue?
A development team needs to deploy an update to an Amazon ECS service running on an EC2-backed cluster. The service currently runs 4 tasks. Due to strict budget limits, the cluster has no additional EC2 instance capacity to run extra tasks during the deployment. However, the service must maintain at least 50% of its capacity at all times to handle the baseline request volume. Which ECS service deployment configuration should the developer specify to meet these requirements?
A developer is implementing an AWS Lambda function in Account A (111122223333) that needs to retrieve sensitive configuration data from an Amazon S3 bucket located in Account B (444455556666). The developer wants to use the AWS Security Token Service (STS) to assume an IAM role named CrossAccountS3Reader in Account B to access the bucket. The Lambda function runs under an execution role named LambdaExecutionRole in Account A.
Which of the following actions must the developer perform to establish this cross-account access? (Select TWO.)
Geçerli olan tümünü seçin
A developer is building a mobile gaming application that requires authenticated users to save their game progress files directly to an Amazon S3 bucket. The game progress files must be stored in a folder path specific to each user. Additionally, the application needs to call a secure REST API hosted on Amazon API Gateway to post high scores. The developer wants to use Amazon Cognito for authentication and authorization with the least operational overhead.
Which TWO configurations must the developer implement to meet these requirements?
Geçerli olan tümünü seçin
A developer is setting up an automated canary deployment for an AWS Lambda function using AWS CodeDeploy. The deployment is defined by the following `appspec.yml` template fragment:
yaml
version: 0.0
Resources:
- MyLambdaFunction:
Type: AWS::Lambda::Function
Properties:
Name: "MyLambdaFunction"
Alias: "live"
CurrentVersion: "1"
TargetVersion: "2"
The developer needs to modify this configuration to execute a validation Lambda function before traffic shifting begins, and must configure the CodeDeploy service role with the correct trust relationship and permissions.
Which two actions should the developer take to meet these requirements? (Select TWO.)
Geçerli olan tümünü seçin
A developer is building a serverless web application that utilizes Amazon Cognito User Pools for user authentication and Amazon API Gateway REST APIs for backend services. The developer needs to secure the API Gateway endpoints so that only authenticated users can access them. The solution must validate the JSON Web Tokens (JWTs) provided by the client with the least amount of custom code and lowest operational overhead. Which solution should the developer implement to meet these requirements?
A developer is deploying a containerized application to Amazon ECS on AWS Fargate. The application code is designed to use the AWS SDK to retrieve database credentials from AWS Secrets Manager at startup.
The ECS task definition is configured with the following parameters:
- taskRoleArn set to ecs-app-task-role
- executionRoleArn set to ecs-app-execution-role
The developer attached an IAM policy allowing secretsmanager:GetSecretValue to the ecs-app-execution-role. However, when the container starts, the application throws an AccessDeniedException when executing the GetSecretValue SDK call.
What should the developer do to resolve this authorization failure?
A developer is updating a critical serverless application and needs to configure traffic shifting for a new version of an AWS Lambda function using AWS CodeDeploy. The deployment must meet the following requirements:
* Route exactly of traffic to the new version in the first increment.
* Allow at least minutes of monitoring for errors before shifting any additional traffic or completing the deployment.
Which two AWS CodeDeploy deployment configurations should the developer select to meet these requirements?
Geçerli olan tümünü seçin
A React Single Page Application (SPA) hosted on `https://portal.dev-ops-metrics.net` attempts to retrieve project status reports by sending an HTTP `GET` request to an Amazon API Gateway REST API. The API uses a Lambda proxy integration. Although the Lambda function executes successfully and returns a payload, the client application receives an HTTP `502 Bad Gateway` error with a response body of `{"message": "Internal server error"}`. The API Gateway CloudWatch execution logs display: `Execution failed due to configuration error: Malformed Lambda proxy response`. Which modification to the Lambda function's return payload will resolve this error?
A developer is configuring a blue/green deployment for an Amazon ECS service using AWS CodeDeploy. The deployment must execute an AWS Lambda function to run validation tests on the replacement task set after test traffic is routed, but before production traffic is shifted. The validation tests require a database password that must be rotated automatically every 30 days. Additionally, CodeDeploy requires an IAM service role to perform the deployment. Which configuration should the developer implement?
A developer is using AWS SAM to build and deploy a serverless application. The application consists of an Amazon API Gateway HTTP API that triggers an AWS Lambda function. During the initial deployment of the template using the AWS SAM CLI, the deployment fails with an error stating that the resource type 'AWS::Serverless::Function' is unrecognized. After addressing the deployment failure, the developer tests the API endpoint but receives a 502 Bad Gateway error, even though Amazon CloudWatch Logs show that the Lambda function executed successfully and returned the correct data. Which two actions must the developer take to resolve these issues?
Geçerli olan tümünü seçin
A developer is troubleshooting an application where an Amazon API Gateway REST API is secured using a custom Lambda authorizer. The authorizer validates a JSON Web Token (JWT) in the request header and returns an IAM policy. The Lambda authorizer has caching enabled with a Time to Live (TTL) of seconds, using the client's `Authorization` header as the cache key.
A client application makes a request to `GET /orders/1` with a valid token and successfully retrieves the resource. Immediately afterward, the same client sends a request to `POST /orders` using the same token. The client receives a HTTP 403 Forbidden response with the message `{"message":"User is not authorized to access this resource"}`. The CloudWatch logs show that the Lambda authorizer was not invoked for the second request.
Which of the following actions should the developer take to resolve this authorization failure? (Select TWO.)
Geçerli olan tümünü seçin
A company is developing a mobile application that allows users to sign in using their enterprise SAML identity provider. After successful authentication, the mobile application needs to upload user-specific profile images directly to an Amazon S3 bucket, and make secure API calls to a backend REST API hosted on Amazon API Gateway. Which TWO configurations must the developer implement to meet these requirements?
Geçerli olan tümünü seçin
A development team is deploying an updated AWS Lambda function using AWS CodeDeploy with a linear traffic-shifting configuration. Before any production traffic is routed to the new function version, the deployment process must run a separate validation Lambda function to perform smoke tests.
Which lifecycle hook must be specified in the `Hooks` section of the `appspec.yml` file to execute the validation function?
A software team is designing a serverless microservice using the AWS Serverless Application Model (SAM). The architecture requires an API Gateway HTTP API that triggers a backend AWS Lambda function. The function must securely fetch database credentials at runtime and also publish messages to an Amazon SQS queue.
Which two configuration steps must be implemented to ensure the deployment succeeds and the function operates correctly?
Geçerli olan tümünü seçin
An application running on Amazon EC2 writes log events to a local file in a space-delimited text format. The CloudWatch agent is configured to send these logs to an Amazon CloudWatch Logs log group. A typical log event looks like this:
`2026-07-14 WARN req-8812 450 502`
The positions of the values represent `[timestamp, log_level, request_id, latency_ms, status_code]`.
A developer wants to create a metric filter to capture the latency of requests that result in either a `WARN` or `ERROR` log level. The metric filter must extract the `latency_ms` value to publish a custom metric. The developer's initial attempt at configuring the metric filter pattern is `{ .log_level == "ERROR" }` with a metric value of `$.latency_ms`. This configuration does not match any log events and fails to publish the metric.
Which of the following changes must the developer make to the metric filter configuration to correctly parse the logs and extract the latency metric? (Select TWO.)
Geçerli olan tümünü seçin