📘 Free DVA-C02 Sample Questions
A gaming website gives users the ability to trade game items with each other on the platform. The platform requires both users' records to be updated and persisted in one transaction. If any update fails, the transaction must roll back.
Which AWS solution can provide the transactional capability that is required for this feature?
A
Amazon DynamoDB with operations made with the Consistent Read parameter set to true
B
Amazon ElastiCache for Memcached with operations made within a transaction block
C
Amazon DynamoDB with reads and writes made by using Transact* operations
D
Amazon Aurora MySQL with operations made within a transaction block
E
Amazon Athena with operations made within a transaction block
Correct Answer:
C. Amazon DynamoDB with reads and writes made by using Transact* operations
Explanation:
Because of the Context, most people know gaming industry deals with very high reads and write that require a db that should scale easily hence DynamoDB.
A developer has created a Java application that makes HTTP requests directly to AWS services. Application logging shows 5xx HTTP response codes that occur at irregular intervals. The errors are affecting users.
How should the developer update the application to improve the application's resiliency?
A
Revise the request content in the application code.
B
Use the AWS SDK for Java to interact with AWS APIs.
C
Scale out the application so that more instances of the application are running.
D
Add additional logging to the application code.
Correct Answer:
B. Use the AWS SDK for Java to interact with AWS APIs.
Explanation:
All AWS SDKs have a built-in retry mechanism with an algorithm that uses exponential backoff. This algorithm implements increasingly longer wait times between retries for consecutive error responses. Most exponential backoff algorithms use jitter (randomized delay) to prevent successive collisions.
Reference:
https://aws.amazon.com/premiumsupport/knowledge-center/http-5xx-errors-s3/
A global company has a mobile app with static data stored in an Amazon S3 bucket in the us-east-1 Region. The company serves the content through an Amazon
CloudFront distribution. The company is launching the mobile app in South Africa. The data must reside in the af- south-1 Region. The company does not want to deploy a specific mobile client for South Africa.
What should the company do to meet these requirements?
A
Use the CloudFront geographic restriction feature to block access to users in South Africa.
B
Create a [email protected] function. Associate the [email protected] function as an origin request trigger with the CloudFront distribution to change the S3 origin Region.
C
Create a [email protected] function. Associate the [email protected] function as a viewer response trigger with the CloudFront distribution to change the S3 origin Region.
D
Include af-south-1 in the alternate domain name (CNAME) of the CloudFront distribution.
Correct Answer:
B. Create a [email protected] function. Associate the [email protected] function as an origin request trigger with the CloudFront distribution to change the S3 origin Region.
Explanation:
Lambda@Ege with a Origin Request Trigger.
Reference:
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-examples.html
A developer is testing an AWS Lambda function by using the AWS Serverless Application Model (AWS SAM) local CLI. The application that is implemented by the
Lambda function makes several AWS API calls by using the AWS software development kit (SDK). The developer wants to allow the function to make AWS API calls in a test AWS account from the developer's laptop.
What should the developer do to meet these requirements?
A
Edit the template.yml file. Add the AWS_ACCESS_KEY_ID property and the AWS_SECRET_ACCESS_KEY property in the Globals section.
B
Add a test profile by using the aws configure command with the --profile option. Run AWS SAM by using the sam local invoke command with the -profile option.
C
Edit the template.yml tile. For the AWS::Serverless::Function resource, set the role to an IAM role in the AWS account.
D
Run the function by using the sam local invoke command. Override the AWS_ACCESS_KEY_ID parameter and the AWS_SECRET_ACCESS_KEY parameter by specifying the --parameter-overrides option.
Correct Answer:
B. Add a test profile by using the aws configure command with the --profile option. Run AWS SAM by using the sam local invoke command with the -profile option.
Explanation:
You use the configure command. Alternatively, set up credentials in the credentials file.
Reference:
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-getting- started-set-up-credentials.html
A developer designed an application on an Amazon EC2 instance. The application makes API requests to objects in an Amazon S3 bucket.
Which combination of steps will ensure that the application makes the API requests in the MOST secure manner?
A
Create an IAM user that has permissions to the S3 bucket. Add the user to an IAM group.
B
Create an IAM role that has permissions to the S3 bucket.
C
Add the IAM role to an instance profile. Attach the instance profile to the EC2 instance.
D
Create an IAM role that has permissions to the S3 bucket. Assign the role to an 1AM group.
E
Store the credentials of the IAM user in the environment variables on the EC2 instance.
Correct Answer:
B. Create an IAM role that has permissions to the S3 bucket.
Explanation:
You choice is either User or Role. Creating a role and assigning it to something is preffered over creating a user.
An IAM role is an IAM identity that you can create in your account that has specific permissions. An IAM role is similar to an IAM user, in that it is an AWS identity with permission policies that determine what the identity can and cannot do in AWS. However, instead of being uniquely associated with one person, a role is intended to be assumable by anyone who needs it. Also, a role does not have standard long-term credentials such as a password or access keys associated with it. Instead, when you assume a role, it provides you with temporary security credentials for your role session.
A - Create User (Role is better) B - Create Role
C - Add role to Resource
D - Create role and add to IAM group (Users live in groups) E - Add User to EC2
A developer is configuring an Amazon CloudFront distribution for a new application to provide encryption in transit. The application is running in the eu-west-1
Region. The developer creates a new certificate in AWS Certificate Manager (ACM) in eu-west-1, but the certificate is not visible in the CloudFront distribution settings.
What should the developer do to fix this problem?
A
Create the certificate for the domain in the same Region as the application. Ensure that the alternate domain name (CNAME) in the distribution settings matches the domain name in the certificate.
B
Create the certificate in the eu-west-1 Region. Ensure that the alternate domain name (CNAME) in the distribution settings matches the domain name in the certificate.
C
Recreate the CloudFront distribution in the same Region as the certificate.
D
Specify the ACM certificate name as the default root object of the CloudFront distribution.
Correct Answer:
B. Create the certificate in the eu-west-1 Region. Ensure that the alternate domain name (CNAME) in the distribution settings matches the domain name in the certificate.
Explanation:
Agreed with PVR that it's a typo. Option B changed to "us-east-1"
A developer is building an application that runs behind an Application Load Balancer (ALB). The ALB is configured as the origin for an Amazon CloudFront distribution. Users will log in to the application by using their social media accounts.
How can the developer authenticate users?
A
Validate the users by inspecting the tokens in an AWS Lambda authorizer on the ALB.
B
Configure the ALB to use Amazon Cognito as one of the authentication providers.
C
Configure CloudFront to use Amazon Cognito as one of the authentication providers.
D
Validate the users by calling the Amazon Cognito API in an AWS Lambda authorizer on the ALB.
Correct Answer:
B. Configure the ALB to use Amazon Cognito as one of the authentication providers.
Explanation:
ALBβs new authentication action provides authentication through social Identity Providers (IdP) like Google, Facebook, and Amazon through Amazon Cognito. It also natively integrates with any OpenID Connect protocol compliant IdP, providing secure authentication and a single sign-on experience across your applications.
https://aws.amazon.com/blogs/aws/built-in-authentication-in-alb/
A company has an application that analyzes photographs. A developer is preparing the application for deployment to Amazon EC2 instances. The application's image analysis functions require a mix of GPU instances and CPU instances that run on Amazon Linux. The developer needs to add code to the application so that the functions can determine whether they are running on a GPU instance.
What should the functions do to obtain this information?
A
Call the DescribeInstances API operation and filter on the current instance ID. Examine the ElasticGpuAssociations property.
B
Evaluate the GPU AVAILABLE environment variable.
C
Call the DescribeElasticGpus API operation.
D
Retrieve the instance type from the instance metadata.
Correct Answer:
D. Retrieve the instance type from the instance metadata.
Explanation:
The only way to tell is getting the instance metadata. Don't be confused by the other options provided because they are there to confuse you because they are related to Elastic Elastic Graphics accelerators. Those are different from GPU instances. Elastic Graphics accelerators are a low-cost alternative to using GPU graphics instance types (such as G2 and G3).
A company has an application that uses Amazon Cognito user pools as an identity provider. The company must secure access to user records. The company has set up multi-factor authentication (MFA). The company also wants to send a login activity notification by email every time a user logs in.
What is the MOST operationally efficient solution that meets this requirement?
A
A company has an application that uses Amazon Cognito user pools as an identity provider. The company must secure access to user records. The company has set up multi-factor authentication (MFA). The company also wants to send a login activity notification by email every time a user logs in.
What is the MOST operationally efficient solution that meets this requirement?
B
Create an AWS Lambda function that uses Amazon Simple Email Service (Amazon SES) to send the email notification. Add an Amazon Cognito post authentication Lambda trigger for the function.
C
Create an AWS Lambda function that uses Amazon Simple Email Service (Amazon SES) to send the email notification. Create an Amazon CloudWatch Logs log subscription filter to invoke the function based on the login status.
D
Configure Amazon Cognito to stream all logs to Amazon Kinesis Data Firehose. Create an AWS Lambda function to process the streamed logs and to send the email notification based on the login status of each user.
Correct Answer:
B. Create an AWS Lambda function that uses Amazon Simple Email Service (Amazon SES) to send the email notification. Add an Amazon Cognito post authentication Lambda trigger for the function.
Explanation:
Create an AWS Lambda function that uses Amazon Simple Email Service (Amazon SES) to send the email notification. Add an Amazon Cognito post authentication Lambda trigger for the function.
A company hosts a three-tier web application on AWS behind an Amazon CloudFront distribution. A developer wants a dashboard to monitor error rates and anomalies of the CloudFront distribution with the shortest possible refresh interval.
Which combination of slops should the developer take to meet these requirements?
A
Activate real-time logs on the CloudFront distribution. Create a stream in Amazon Kinesis Data Streams.
B
Export the CloudFront logs to an Amazon S3 bucket. Detect anomalies and error rates with Amazon QuickSight.
C
Configure Amazon Kinesis Data Streams to deliver logs to Amazon OpenSearch Service (Amazon Elasticsearch Service). Create a dashboard in OpenSearch Dashboards (Kibana).
D
Create Amazon CloudWatch alarms based on expected values of selected CloudWatch metrics to detect anomalies and errors.
E
Design an Amazon CloudWatch dashboard of the selected CloudFront distribution metrics.
Correct Answer:
A. Activate real-time logs on the CloudFront distribution. Create a stream in Amazon Kinesis Data Streams.
Explanation:
https://aws.amazon.com/blogs/networking-and-content-delivery/cloudfront-realtime-logs/
With real-time logs, you can customize the information collected and where it gets delivered. The real-time logs are integrated with Amazon Kinesis Data Streams to enable delivery of these logs to a generic HTTP endpoint using Amazon Kinesis Data Firehose. Amazon Kinesis Data Firehose can deliver logs to Amazon S3, Amazon Redshift, Amazon Elasticsearch Service (Amazon ES), and service providers like Datadog, Datazoom, New Relic, and Splunk. Using these logs, you can create real-time dashboards, set up alerts, and investigate anomalies or respond to operational events quickly.
Questions: 1-10 out of 557
Continue Full Practice..
GET ALL 557 QUESTIONS