A developer is building an application that uses AWS API Gateway APIs. AWS Lambda
function, and AWS Dynamic DB tables. The developer uses the AWS Serverless
Application Model (AWS SAM) to build and run serverless applications on AWS. Each time
the developer pushes of changes for only to the Lambda functions, all the artifacts in the
application are rebuilt.
The developer wants to implement AWS SAM Accelerate by running a command to only
redeploy the Lambda functions that have changed.
Which command will meet these requirements?
A. sam deploy -force-upload
B. sam deploy -no-execute-changeset
C. sam package
D. sam sync -watch
Explanation: The command that will meet the requirements is sam sync -watch. This command enables AWS SAM Accelerate mode, which allows the developer to only redeploy the Lambda functions that have changed. The -watch flag enables file watching, which automatically detects changes in the source code and triggers a redeployment. The other commands either do not enable AWS SAM Accelerate mode, or do not redeploy the Lambda functions automatically.
A company uses an AWS Lambda function to perform natural language processing (NLP)
tasks. The company has attached a Lambda layer to the function. The Lambda layer
contain scientific libraries that the function uses during processing.
The company added a large, pre-trained text-classification model to the Lambda layer. The
addition increased the size of the Lambda layer to 8.7 GB. After the addition and a recent
deployment, the Lambda function returned a RequestEntityTooLargeException error.
The company needs to update the Lambda function with a high-performing and portable
solution to decrease the initialization time for the function.
Which solution will meet these requirements?
A. Store the large pre-trained model in an Amazon S3 bucket. Use the AWS SDK to access the model.
B. Create an Amazon EFS file system to store the large pre-trained model. Mount the file system to an Amazon EC2 instance. Configure the Lambda function to use the EFS file system.
C. Split the components of the Lambda layer into five new Lambda layers. Zip the new layers, and attach the layers to the Lambda function. Update the function code to use the new layers.
D. Create a Docker container that includes the scientific libraries and the pre-trained model. Update the Lambda function to use the container image.
Explanation: Requirement Summary:
NLP Lambda function with alarge pre-trained model
Lambda layer became8.7 GB Exceeds AWS limits
Function returns RequestEntityTooLargeException
Need:High-performing,portable, lowinitialization time
Important AWS Limits:
Lambda Layers size limit(combined across all layers):250 MB (unzipped)
Deployment package size(unzipped):250 MB
Lambdacontainer image supportallows up to10 GBimage size
Evaluate Options:
A: Store model in S3 and load during execution
Leads tocold start latencyevery time
Model loading from S3 isslowerand not suitable for real-time NLP
Not optimal for performance
B: Use EFS mounted to Lambda
Valid for large models, butadds latencyduring cold start as model loads from EFS
Requires EFS setup, VPC, and has addednetwork I/O overhead
Still slower than bundling in container image
C: Split into five Lambda layers
Still violates thetotal layer size limitof 250 MB (unzipped)
You cannot exceed that even with multiple layers
D: Use Docker container image
Allows bundlingup to 10 GBof dependencies and models
Highportabilityandperformance
Avoids latency of downloading models at runtime
Ideal for scientific/NLP models
A developer created an AWS Lambda function that performs a series of operations that involve multiple AWS services. The function's duration time is higher than normal. To determine the cause of the issue, the developer must investigate traffic between the services without changing the function code Which solution will meet these requirements?
A. Enable AWS X-Ray active tracing in the Lambda function Review the logs in X-Ray
B. Configure AWS CloudTrail View the trail logs that are associated with the Lambda function.
C. Review the AWS Config logs in Amazon Cloud Watch.
D. Review the Amazon CloudWatch logs that are associated with the Lambda function.
Explanation:
A company has a website that displays a daily newsletter. When a user visits the website,
an AWS Lambda function processes the browser's request and queries the company's onpremises
database toobtain the current newsletter. The newsletters are stored in English.
The Lambda function uses the Amazon Translate TranslateText API operation to translate
the newsletters, and the translation is displayed to the user.
Due to an increase in popularity, the website's response time has slowed. The database is
overloaded. The company cannot change the database and needs a solution that improves
the response time of the Lambda function.
Which solution meets these requirements?
A. Change to asynchronous Lambda function invocation.
B. Cache the translated newsletters in the Lambda /tmp directory.
C. Enable TranslateText API caching.
D. Change the Lambda function to use parallel processing.
A company operates a media streaming platform that delivers on-demand video content to
users from around the world. User requests flow through an Amazon CloudFront
distribution, an Amazon API Gateway REST API, AWS Lambda functions, and Amazon
DynamoDB tables.
Some users have reported intermittent buffering issues and delays when users try to start a
video stream. The company needs to investigate the issues to discover the underlying
cause.
Which solution will meet this requirement?
A. Enable AWS X-Ray tracing for the REST API, Lambda functions, and DynamoDB tables. Analyze the service map to identify any performance bottlenecks or errors.
B. Enable logging in API Gateway. Ensure that each Lambda function is configured to send logs to Amazon CloudWatch. Use CloudWatch Logs Insights to query the log data.
C. Use AWS Config to review details of any recent configuration changes to AWS resources in the application that could result in increased latency for users.
D. Use AWS CloudTrail to track AWS resources in all AWS Regions. Stream CloudTrail data to an Amazon CloudWatch Logs log group. Enable CloudTrail Insights. Set up Amazon SN5 notifications if unusual API activity is detected.
Explanation: Requirement Summary:
Users experiencebuffering/delaywhen starting video stream
Architecture:
Need toidentify root causeof performance issues
Evaluate Options:
A: Enable AWS X-Ray tracing
Ideal forend-to-end tracing
Visualizeslatency across services (API Gateway, Lambda, DynamoDB)
Creates aservice mapfor easy identification of bottlenecks or errors
Designed specifically fordistributed tracingand performance monitoring
B: CloudWatch Logs Insights
Helpful for querying logs
But lacks thevisual trace linkageacross services like X-Ray
Does not identifywhere latency accumulates
C: AWS Config
Tracks configuration changes,not runtime performance
D: CloudTrail + CloudWatch Logs
More useful foraudit/logging, not tracing performance or latency issues
A developer must use multi-factor authentication (MFA) to access data in an Amazon S3 bucket that is in another AWS account. Which AWS Security Token Service (AWS STS) API operation should the developer use with the MFA information to meet this requirement?
A. AssumeRoleWithWebidentity
B. GetFederationToken
C. AssumeRoleWithSAML
D. AssumeRole
Explanation:
A developer is building a serverless application by using AWS Serverless Application Model (AWS SAM) on multiple AWS Lambda functions. When the application is deployed, the developer wants to shift 10% of the traffic to the new deployment of the application for the first 10 minutes after deployment. If there are no issues, all traffic must switch over to the new version. Which change to the AWS SAM template will meet these requirements?
A. Set the Deployment Preference Type to Canaryl OPercent10Minutes. Set the AutoPublishAlias property to the Lambda alias.
B. Set the Deployment Preference Type to Linearl OPercentEveryIOMinutes. Set AutoPubIishAIias property to the Lambda alias.
C. Set the Deployment Preference Type to Canaryl OPercentIOMinutes. Set the PreTraffic and PostTraffic properties to the Lambda alias.
D. Set the Deployment Preference Type to Linearl OPercentEvery10Minutes. Set PreTraffic and PostTraffic properties to the Lambda alias.
Explanation:
The Deployment Preference Type property specifies how traffic should be shifted
between versions of a Lambda function1. The Canary10Percent10Minutes option
means that 10% of the traffic is immediately shifted to the new version, and after
10 minutes, the remaining 90% of the traffic is shifted1. This matches the
requirement of shifting 10% of the traffic for the first 10 minutes, and then
switching all traffic to the new version.
The AutoPublishAlias property enables AWS SAM to automatically create and
update a Lambda alias that points to the latest version of the function1. This is
required to use the Deployment Preference Type property1. The alias name can
be specified by the developer, and it can be used to invoke the function with the
latest code.
A company wants to automate part of its deployment process. A developer needs to
automate the process of checking for and deleting unused resources that supported
previously deployed stacks but that are no longer used.
The company has a central application that uses the AWS Cloud Development Kit (AWS
CDK) to manage all deployment stacks. The stacks are spread out across multiple
accounts. The developer’s solution must integrate as seamlessly as possible within the
current deployment process.
Which solution will meet these requirements with the LEAST amount of configuration?
A. In the central AWS CDK application, write a handler function in the code that uses AWS SDK calls to check for and delete unused resources. Create an AWS CloudPormation template from a JSON file. Use the template to attach the function code to an AWS Lambda function and lo invoke the Lambda function when the deployment slack runs.
B. In the central AWS CDK application. write a handler function in the code that uses AWS SDK calls to check for and delete unused resources. Create an AWS CDK custom resource Use the custom resource to attach the function code to an AWS Lambda function and to invoke the Lambda function when the deployment stack runs.
C. In the central AWS CDK, write a handler function m the code that uses AWS SDK calls to check for and delete unused resources. Create an API in AWS Amplify Use the API to attach the function code to an AWS Lambda function and to invoke the Lambda function when the deployment stack runs.
D. In the AWS Lambda console write a handler function in the code that uses AWS SDK calls to check for and delete unused resources. Create an AWS CDK custom resource. Use the custom resource to import the Lambda function into the stack and to Invoke the Lambda function when the deployment stack runs.
Explanation: This solution meets the requirements with the least amount of configuration because it uses a feature of AWS CDK that allows custom logic to be executed during stack deployment or deletion. The AWS Cloud Development Kit (AWS CDK) is a software development framework that allows you to define cloud infrastructure as code and provision it through CloudFormation. An AWS CDK custom resource is a construct that enables you to create resources that are not natively supported by CloudFormation or perform tasks that are not supported by CloudFormation during stack deployment or deletion. The developer can write a handler function in the code that uses AWS SDK calls tocheck for and delete unused resources, and create an AWS CDK custom resource that attaches the function code to a Lambda function and invokes it when the deployment stack runs. This way, the developer can automate the cleanup process without requiring additional configuration or integration. Creating a CloudFormation template from a JSON file will require additional configuration and integration with the central AWS CDK application. Creating an API in AWS Amplify will require additional configuration and integration with the central AWS CDK application and may not provide optimal performance or availability. Writing a handler function in the AWS Lambda console will require additional configuration and integration with the central AWS CDK application.
An ecommerce company is planning to migrate an on-premises Microsoft SQL Server database to the AWS Cloud. The company needs to migrate the database to SQL Server Always On availability groups. The cloud-based solution must be highly available. Which solution will meet these requirements?
A. Deploy three Amazon EC2 instances with SQL Server across three Availability Zones. Attach one Amazon Elastic Block Store (Amazon EBS) volume to the EC2 instances.
B. Migrate the database to Amazon RDS for SQL Server. Configure a Multi-AZ deployment and read replicas.
C. Deploy three Amazon EC2 instances with SQL Server across three Availability Zones. Use Amazon FSx for Windows File Server as the storage tier.
D. Deploy three Amazon EC2 instances with SQL Server across three Availability Zones. Use Amazon S3 as the storage tier.
Explanation: Why Option C is Correct: SQL Server Always On availability groups require a shared storage solution. Amazon FSx for Windows File Server provides the shared storage necessary to implement Always On availability groups in a highly available configuration.
A developer creates a static website for their department The developer deploys the static
assets for the website to an Amazon S3 bucket and serves the assets with Amazon
CloudFront The developer uses origin access control (OAC) on the CloudFront distribution
to access the S3 bucket.
The developer notices users can access the root URL and specific pages but cannot
access directories without specifying a file name. For example, /products/index.html works,
but /products returns an error The developer needs to enable accessing directories without
specifying a file name without exposing the S3 bucket publicly.
Which solution will meet these requirements'?
A. Update the CloudFront distribution's settings to index.html as the default root object is set
B. Update the Amazon S3 bucket settings and enable static website hosting. Specify index html as the Index document Update the S3 bucket policy to enable access. Update the CloudFront distribution's origin to use the S3 website endpoint
C. Create a CloudFront function that examines the request URL and appends index.html when directories are being accessed Add the function as a viewer request CloudFront function to the CloudFront distribution's behavior.
D. Create a custom error response on the CloudFront distribution with the HTTP error code set to the HTTP 404 Not Found response code and the response page path to /index html Set the HTTP response code to the HTTP 200 OK response code
A developer has a legacy application that is hosted on-premises. Other applications hosted on AWS depend on the on-premises application for proper functioning. In case of any application errors, the developer wants to be able to use Amazon CloudWatch to monitor and troubleshoot all applications from one place. How can the developer accomplish this?
A. Install an AWS SDK on the on-premises server to automatically send logs to CloudWatch.
B. Download the CloudWatch agent to the on-premises server. Configure the agent to use IAM user credentials with permissions for CloudWatch.
C. Upload log files from the on-premises server to Amazon S3 and have CloudWatch read the files.
D. Upload log files from the on-premises server to an Amazon EC2 instance and have the instance forward the logs to CloudWatch.
Explanation: Amazon CloudWatch is a service that monitors AWS resources and applications. The developer can use CloudWatch to monitor and troubleshoot all applications from one place. To do so, the developer needs to download the CloudWatch agent to the on-premises server and configure the agent to use IAM user credentials with permissions for CloudWatch. The agent will collect logs and metrics from the on-premises server and send them to CloudWatch.
A company is building a web application on AWS. When a customer sends a request, the application will generate reports and then make the reports available to the customer within one hour. Reports should be accessible to the customer for 8 hours. Some reports are larger than 1 MB. Each report is unique to the customer. The application should delete all reports that are older than 2 days. Which solution will meet these requirements with the LEAST operational overhead?
A. Generate the reports and then store the reports as Amazon DynamoDB items that have a specified TTL. Generate a URL that retrieves the reports from DynamoDB. Provide the URL to customers through the web application.
B. Generate the reports and then store the reports in an Amazon S3 bucket that uses server-side encryption. Attach the reports to an Amazon Simple Notification Service (Amazon SNS) message. Subscribe the customer to email notifications from Amazon SNS.
C. Generate the reports and then store the reports in an Amazon S3 bucket that uses server-side encryption. Generate a presigned URL that contains an expiration date Provide the URL to customers through the web application. Add S3 Lifecycle configuration rules to the S3 bucket to delete old reports.
D. Generate the reports and then store the reports in an Amazon RDS database with a date stamp. Generate an URL that retrieves the reports from the RDS database. Provide the URL to customers through the web application. Schedule an hourly AWS Lambda function to delete database records that have expired date stamps.
Explanation: This solution will meet the requirements with the least operational overhead because it uses Amazon S3 as a scalable, secure, and durable storage service for the reports. The presigned URL will allow customers to access their reports for a limited time (8 hours) without requiring additional authentication. The S3 Lifecycle configuration rules will automatically delete the reports that are older than 2 days, reducing storage costs and complying with the data retention policy. Option A is not optimal because it will incur additional costs and complexity to store the reports as DynamoDB items, which have a size limit of 400 KB. Option B is not optimal because it will not provide customers with access to their reports within one hour, as Amazon SNS email delivery is not guaranteed. Option D is not optimal because it will require more operational overhead to manage an RDS database and a Lambda function for storing and deleting the reports.
Page 12 out of 31 Pages |
Previous |