A company is developing an ecommerce application that uses Amazon API Gateway APIs. The application uses AWS Lambda as a backend. The company needs to test the code in a dedicated, monitored test environment before the company releases the code to the production environment.
Which solution will meet these requirements?
AUse a single stage in API Gateway. Create a Lambda function for each environment. Configure API clients to send a query parameter that indicates the environment and the specific Lambda function.
BUse multiple stages in API Gateway. Create a single Lambda function for all environments. Add different code blocks for different environments in the Lambda function based on Lambda environment variables.
CUse multiple stages in API Gateway. Create a Lambda function for each environment. Configure API Gateway stage variables to route traffic to the Lambda function in different environments.
DUse a single stage in API Gateway. Configure API clients to send a query parameter that indicates the environment. Add different code blocks for different environments in the Lambda function to match the value of the query parameter.
0
Community Discussion
No comments yet. Be the first to start the discussion!
A developer is setting up the deployment of application stacks to new test environments by using the AWS Cloud Development Kit (AWS CDK). The application contains the code for several AWS Lambda functions that will be deployed as assets. Each Lambda function is defined by using the AWS CDK Lambda construct library.
The developer has already successfully deployed the application stacks to the alpha environment in the first account by using the AWS CDK CLI's cdk deploy command. The developer is preparing to deploy to the beta environment in a second account for the first time. The developer makes no significant changes to the CDK code between deployments, but the initial deployment in the second account is unsuccessful and returns a NoSuchBucket error.
Which command should the developer run before redeployment to resolve this error?
Acdk synth
Bcdk bootstrap
Ccdk init
Dcdk destroy
0
Community Discussion
No comments yet. Be the first to start the discussion!
A developer has created a large AWS Lambda function. Deployment of the function is failing because of an InvalidParameterValueException error. The error message indicates that the unzipped size of the function exceeds the maximum supported value.
Which actions can the developer take to resolve this error?
Choose two
ASubmit a quota increase request to AWS Support to increase the function to the required size.
BUse a compression algorithm that is more efficient than ZIP.
CBreak up the function into multiple smaller functions.
DZip the .zip file twice to compress the file more.
EMove common libraries, function dependencies, and custom runtimes into Lambda layers.
0
Community Discussion
No comments yet. Be the first to start the discussion!
A developer is creating an AWS CloudFormation stack. The stack contains IAM resources with custom names. When the developer tries to deploy the stack, they receive an InsufficientCapabilities error.
What should the developer do to resolve this issue?
ASpecify the CAPABILITY_AUTO_EXPAND capability in the CloudFormation stack.
BUse an administrators role to deploy IAM resources with CloudFormation.
CSpecify the CAPABILITY_IAM capability in the CloudFormation stack.
DSpecify the CAPABILITY_NAMED_IAM capability in the CloudFormation stack.
0
Community Discussion
No comments yet. Be the first to start the discussion!
A developer is testing an application that invokes an AWS Lambda function asynchronously. During the testing phase, the Lambda function fails to process after two retries.
How can the developer troubleshoot the failure?
AConfigure AWS CloudTrail logging to investigate the invocation failures.
BConfigure Dead Letter Queues by sending events to Amazon SQS for investigation.
CConfigure Amazon Simple Workflow Service to process any direct unprocessed events.
DConfigure AWS Config to process any direct unprocessed events.
0
Community Discussion
No comments yet. Be the first to start the discussion!
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
A company's developer has deployed an application in AWS by using AWS CloudFormation. The CloudFormation stack includes parameters in AWS Systems Manager Parameter Store that the application uses as configuration settings. The application can modify the parameter values.
When the developer updated the stack to create additional resources with tags, the developer noted that the parameter values were reset and that the values ignored the latest changes made by the application. The developer needs to change the way the company deploys the CloudFormation stack. The developer also needs to avoid resetting the parameter values outside the stack.
Which solution will meet these requirements with the LEAST development effort?
AModify the CloudFormation stack to set the deletion policy to Retain for the Parameter Store parameters.
BCreate an Amazon DynamoDB table as a resource in the CloudFormation stack to hold configuration data for the application. Migrate the parameters that the application is modifying from Parameter Store to the DynamoDB table.
CCreate an Amazon RDS DB instance as a resource in the CloudFormation stack. Create a table in the database for parameter configuration. Migrate the parameters that the application is modifying from Parameter Store to the configuration table.
DModify the CloudFormation stack policy to deny updates on Parameter Store parameters.
A developer uses AWS CloudFormation to deploy an Amazon API Gateway API and an AWS Step Functions state machine. The state machine must reference the API Gateway API after the CloudFormation template is deployed. The developer needs a solution that uses the state machine to reference the API Gateway endpoint.
Which solution will meet these requirements MOST cost-effectively?
AConfigure the CloudFormation template to reference the API endpoint in the DefinitionSubstitutions property for the AWS::StepFunctions::StateMachine resource.
BConfigure the CloudFormation template to store the API endpoint in an environment variable for the AWS::StepFunctions::StateMachine resource. Configure the state machine to reference the environment variable.
CConfigure the CloudFormation template to store the API endpoint in a standard AWS::SecretsManager::Secret resource. Configure the state machine to reference the resource.
DConfigure the CloudFormation template to store the API endpoint in a standard AWS::AppConfig::ConfigurationProfile resource. Configure the state machine to reference the resource.
An Amazon Simple Queue Service (Amazon SQS) queue serves as an event source for an AWS Lambda function. In the SQS queue, each item corresponds to a video file that the Lambda function must convert to a smaller resolution. The Lambda function is timing out on longer video files, but the Lambda function's timeout is already configured to its maximum value.
What should a developer do to avoid the timeouts without additional code changes?
AIncrease the memory configuration of the Lambda function.
BIncrease the visibility timeout on the SQS queue.
CIncrease the instance size of the host that runs the Lambda function.
DUse multi-threading for the conversion.
A company is using Amazon OpenSearch Service to implement an audit monitoring system. A developer needs to create an AWS CloudFormation custom resource that is associated with an AWS Lambda function to configure the OpenSearch Service domain. The Lambda function must access the OpenSearch Service domain by using OpenSearch Service internal master user credentials.
What is the MOST secure way to pass these credentials to the Lambda function?
AUse a CloudFormation parameter to pass the master user credentials at deployment to the OpenSearch Service domain’s MasterUserOptions and the Lambda function’s environment variable. Set the NoEcho attribute to true.
BUse a CloudFormation parameter to pass the master user credentials at deployment to the OpenSearch Service domain’s MasterUserOptions and to create a parameter in AWS Systems Manager Parameter Store. Set the NoEcho attribute to true. Create an IAM role that has the ssm:GetParameter permission. Assign the role to the Lambda function. Store the parameter name as the Lambda function’s environment variable. Resolve the parameter’s value at runtime.
CUse a CloudFormation parameter to pass the master user credentials at deployment to the OpenSearch Service domain’s MasterUserOptions and the Lambda function’s environment variable. Encrypt the parameter’s value by using the AWS Key Management Service (AWS KMS) encrypt command.
DUse CloudFormation to create an AWS Secrets Manager secret. Use a CloudFormation dynamic reference to retrieve the secret’s value for the OpenSearch Service domain’s MasterUserOptions. Create an IAM role that has the secretsmanager:GetSecretValue permission. Assign the role to the Lambda function. Store the secret’s name as the Lambda function’s environment variable. Resolve the secret’s value at runtime.
A company built a new application in the AWS Cloud. The company automated the bootstrapping of new resources with an Auto Scaling group by using AWS CloudFormation templates. The bootstrap scripts contain sensitive data.
The company needs a solution that is integrated with CloudFormation to manage the sensitive data in the bootstrap scripts.
Which solution will meet these requirements in the MOST secure way?
APut the sensitive data into a CloudFormation parameter. Encrypt the CloudFormation templates by using an AWS Key Management Service (AWS KMS) key.
BPut the sensitive data into an Amazon S3 bucket. Update the CloudFormation templates to download the object from Amazon S3 during bootstrap.
CPut the sensitive data into AWS Systems Manager Parameter Store as a secure string parameter. Update the CloudFormation templates to use dynamic references to specify template values.
DPut the sensitive data into Amazon Elastic File System (Amazon EFS). Enforce EFS encryption after file system creation. Update the CloudFormation templates to retrieve data from Amazon EFS.
A company has installed smart meters in all its customer locations. The smart meters measure power usage at 1-minute intervals and send the usage readings to a remote endpoint for collection. The company needs to create an endpoint that will receive the smart meter readings and store the readings in a database. The company wants to store the location ID and timestamp information.
The company wants to give its customers low-latency access to their current usage and historical usage on demand. The company expects demand to increase significantly. The solution must not impact performance or include downtime while scaling.
Which solution will meet these requirements MOST cost-effectively?
AStore the smart meter readings in an Amazon RDS database. Create an index on the location ID and timestamp columns. Use the columns to filter on the customers' data.
BStore the smart meter readings in an Amazon DynamoDB table. Create a composite key by using the location ID and timestamp columns. Use the columns to filter on the customers' data.
CStore the smart meter readings in Amazon ElastiCache for Redis. Create a SortedSet key by using the location ID and timestamp columns. Use the columns to filter on the customers' data.
DStore the smart meter readings in Amazon S3. Partition the data by using the location ID and timestamp columns. Use Amazon Athena to filter on the customers' data.
A developer is building an application that uses Amazon DynamoDB. The developer wants to retrieve multiple specific items from the database with a single API call.
Which DynamoDB API call will meet these requirements with the MINIMUM impact on the database?
ABatchGetItem
BGetItem
CScan
DQuery
A developer is working on a Python application that runs on Amazon EC2 instances. The developer wants to enable tracing of application requests to debug performance issues in the code.
Which combination of actions should the developer take to achieve this goal?
Choose two
AInstall the Amazon CloudWatch agent on the EC2 instances.
BInstall the AWS X-Ray daemon on the EC2 instances.
CConfigure the application to write JSON-formatted logs to /var/log/cloudwatch.
DConfigure the application to write trace data to /var/log/xray.
EInstall and configure the AWS X-Ray SDK for Python in the application.
A company has a three-tier application that is deployed in Amazon Elastic Container Service (Amazon ECS). The application is using an Amazon RDS for MySQL DB instance. The application performs more database reads than writes.
During times of peak usage, the application’s performance degrades. When this performance degradation occurs, the DB instance’s ReadLatency metric in Amazon CloudWatch increases suddenly.
How should a developer modify the application to improve performance?
AUse Amazon ElastiCache to cache query results.
BScale the ECS cluster to contain more ECS instances.
CAdd read capacity units (RCUs) to the DB instance.
DModify the ECS task definition to increase the task memory.
A developer at a company writes an AWS CloudFormation template. The template refers to subnets that were created by a separate AWS CloudFormation template that the company's network team wrote. When the developer attempts to launch the stack for the first time, the launch fails.
Which template coding mistakes could have caused this failure?
Choose two
AThe developer's template does not use the Ref intrinsic function to refer to the subnets.
BThe developer's template does not use the ImportValue intrinsic function to refer to the subnets.
CThe Mappings section of the developer's template does not refer to the subnets.
DThe network team's template does not export the subnets in the Outputs section.
EThe network team's template does not export the subnets in the Mappings section.
An AWS Lambda function is invoked asynchronously to process events. Occasionally, the Lambda function falls to process events. A developer needs to collect and analyze these failed events to fix the issue.
What should the developer do to meet these requirements with the LEAST development effort?
AAdd logging statements for all events in the Lambda function. Filter AWS CloudTrail logs for errors.
BConfigure the Lambda function to start an AWS Step Functions workflow with retries for failed events.
CAdd a dead-letter queue to send messages to an Amazon Simple Queue Service (Amazon SQS) standard queue.
DAdd a dead-letter queue to send messages to an Amazon Simple Notification Service (Amazon SNS) FIFO topic.
A developer is creating an application that uses an Amazon DynamoDB table. The developer needs to develop code that reads all records that were added to the table during the previous day, creates HTML reports, and pushes the reports into third-party storage. The item size varies from 1 KB to 4 KB, and the index structure is defined with the date. The developer needs to minimize the read capacity that the application requires from the DynamoDB table.
Which DynamoDB API operation should the developer use in the code to meet these requirements?
AQuery
BScan
CBatchGetItem
DGetItem
A company has an application that processes audio files for different departments. When audio files are saved to an Amazon S3 bucket, an AWS Lambda function receives an event notification and processes the audio input.
A developer needs to update the solution so that the application can process the audio files for each department independently. The application must publish the audio file location for each department to each department's existing Amazon Simple Queue Service (Amazon SQS) queue.
Which solution will meet these requirements with no changes to the Lambda function code?
AConfigure the S3 bucket to send the event notifications to an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe each department’s SQS queue to the SNS topic. Configure subscription filter policies.
BUpdate the Lambda function to write the file location to a single shared SQS queue. Configure the shared SQS queue to send the file reference to each department’s SQS queue.
CUpdate the Lambda function to send the file location to each department’s SQS queue.
DConfigure the S3 bucket to send the event notifications to each department’s SQS queue.
A developer has an application that uses an Amazon DynamoDB table with a configured local secondary index (LSI). During application testing, the DynamoDB table metrics report a ProvisionedThroughputExceededException error message. The number of requests made by the test suite did not exceed the table's provisioned capacity limits.
What is the cause of this issue?
AThe data in the table's partition key column is not evenly distributed.
BThe LSI's capacity is different from the table's capacity.
CThe application is not implementing exponential backoff retry logic while interacting with the DynamoDB API.
DThe application has the IAM permission to query the DynamoDB table but not to query the LSI.
A developer is using AWS CloudFormation to deploy an AWS Lambda function. The developer needs to set the Lambda function's timeout value based on the environment parameter of the template. The template contains mappings of EnvironmentData for each environment's timeout value. The environment parameter and EnvironmentData mappings are as follows:
A developer is designing a serverless application for a game in which users register and log in through a web browser. The application makes requests on behalf of users to a set of AWS Lambda functions that run behind an Amazon API Gateway HTTP API.
The developer needs to implement a solution to register and log in users on the application's sign-in page. The solution must minimize operational overhead and must minimize ongoing management of user identities.
Which solution will meet these requirements?
ACreate Amazon Cognito user pools for external social identity providers. Configure IAM roles for the identity pools.
BProgram the sign-in page to create users' IAM groups with the IAM roles attached to the groups.
CCreate an Amazon RDS for SQL Server DB instance to store the users and manage the permissions to the backend resources in AWS.
DConfigure the sign-in page to register and store the users and their passwords in an Amazon DynamoDB table with an attached IAM policy.
A company is hosting an Amazon AP! Gateway REST API that calls a single AWS Lambda function. The function is infrequently invoked by multiple clients at the same time.
The code performance is optimal, but the company wants to optimize the startup time of the function
What can a developer do to optimize the initialization of the function?
AEnable API Gateway caching for the REST API.
BConfigure provisioned concurrency for the Lambda function.
CUse Lambda proxy integration for the REST API.
DConfigure AWS Global Accelerator for the Lambda function.
A developer is creating a mobile application that will not require users to log in.
What is the MOST efficient method to grant users access to AWS resources?
AUse an identity provider to securely authenticate with the application.
BCreate an AWS Lambda function to create an IAM user when a user accesses the application.
CCreate credentials using AWS KMS and apply these credentials to users when using the application.
DUse Amazon Cognito to associate unauthenticated users with an IAM role that has limited access to resources.
A developer is creating an application that must transfer expired items from Amazon DynamoDB to Amazon S3. The developer sets up the DynamoDB table to automatically delete items after a specific TTL. The application must process the items in DynamoDB and then must store the expired items in Amazon S3. The entire process, including item processing and storage in Amazon S3, will take 5 minutes.
Which solution will meet these requirements with the LEAST operational overhead?
AConfigure DynamoDB Accelerator (DAX) to query for expired items based on the TTL. Save the results to Amazon S3.
BConfigure DynamoDB Streams to invoke an AWS Lambda function. Program the Lambda function to process the items and to store the expired items in Amazon S3.
CDeploy a custom application on an Amazon Elastic Container Service (Amazon ECS) cluster on Amazon EC2 instances. Program the custom application to process the items and to store the expired items in Amazon S3.
DCreate an Amazon EventBridge rule to invoke an AWS Lambda function. Program the Lambda function to process the items and to store the expired items in Amazon S3.
A developer is storing sensitive data generated by an application in Amazon S3. The developer wants to encrypt the data at rest. A company policy requires an audit trail of when the AWS Key Management Service (AWS KMS) key was used and by whom.
Which encryption option will meet these requirements?
AServer-side encryption with Amazon S3 managed keys (SSE-S3)
BServer-side encryption with AWS KMS managed keys (SSE-KMS)
CServer-side encryption with customer-provided keys (SSE-C)
Community Discussion