Scroll down to see your responses and detailed results
Prepare for the AWS Certified Developer Associate DVA-C02 exam with this free practice test. Randomly generated and customizable, this test allows you to choose the number of questions.
A company is storing sensitive documents in an Amazon S3 bucket and wants to implement a solution where the development team can upload encrypted files without managing the encryption keys directly. The encryption should allow the use of different keys for each S3 object and enable the automatic rotation of those keys. Which of the following should the development team implement to meet these requirements?
Apply an S3 Bucket Policy that requires uploads to be encrypted with a specific AWS KMS Customer Master Key (CMK) without enabling key rotation.
Implement Server-Side Encryption with Customer Provided Keys (SSE-C) and manage key rotation using a cron job on an EC2 instance.
Store and manage encryption keys in AWS CloudHSM and manually rotate the keys by creating new HSM-backed keys when required.
Use Server-Side Encryption with AWS KMS-Managed Keys (SSE-KMS) and enable automatic key rotation.
Utilize AWS Secrets Manager to generate data keys for S3 object encryption and configure automatic rotation.
Enable Server-Side Encryption with Amazon S3-Managed Keys (SSE-S3) and schedule an AWS Lambda function to rotate the keys regularly.
AWS Key Management Service (KMS) is designed for secure key management and allows for automatic key rotation. When choosing the SSE-KMS option, each S3 object is encrypted with a unique data key, and these data keys are themselves encrypted with a master key from KMS, which can be configured for key rotation. SSE-C is incorrect because it requires the client to manage its own encryption keys. AWS CloudHSM is a key storage and management service, but it does not provide the simplicity of automatic key rotation that KMS does. Using AWS Lambda for key rotation is unnecessary with KMS, as KMS already provides this functionality.
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
A developer is implementing a logging solution for an AWS Lambda-based service, which processes a series of online retail operations. Each operation must be traceable back to the specific session, item involved, and the shopper involved in the interaction. What kind of logging technique should the developer utilize to ensure that the log data can be indexed effectively, facilitating the extraction of relevant information for any investigation or analysis?
Generate distinct log streams categorized by type of operation and involved entities for better segregation.
Embed CloudWatch Logs insights within the log entries to enhance the searchability of operations.
Use JSON formatting for logs, which allows indexing and querying based on specific keys like session, item, and shopper details.
Format logs as delimited text with special characters to separate different pieces of information such as session, item, and shopper details.
When logs are formatted as JSON, they provide the capability to include key-value pairs to delineate different pieces of information, such as session, item, and shopper details. This structure allows for effective indexing and querying specific attributes, making it highly suitable for troubleshooting purposes. Delimited text logs are less ideal because while they are parseable, they do not inherently provide the structured approach that JSON offers for ease of querying. Embedding CloudWatch Logs insights is a metric embedding feature and not pertinent to log structuring for effective data retrieval. Creating separate log streams for different criteria may help with log segregation but does not address the need for structured data within the logs.
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
A developer is integrating a serverless function with a third-party web service. The developer needs to confirm that the function reacts appropriately under different response conditions, including successful data retrieval, errors, and timeouts, without interacting with the actual service. What is the most effective method to mimic the third-party service and assess the function's various operational responses?
Embed static response conditions within the serverless function code to facilitate response scenario assessment.
Establish an Amazon API Gateway and configure mock integrations for reproducing varied operational scenarios.
Activate the serverless function in a live setting with enhanced logging to track its handling of different operational conditions.
Implement an auxiliary serverless function to reproduce the behavior of the third-party service for testing purposes.
Setting up an Amazon API Gateway with mock integrations is the most effective method to mimic third-party web service responses. It enables the developer to configure the expected responses, such as those indicating a successful operation, an error, or a timeout, without needing to rely on the real web service. This provides a controlled environment for thorough assessment of the serverless function's response to diverse scenarios. Other methods, such as hardcoding responses or utilizing additional serverless functions for emulation, do not offer the same level of flexibility or convenience as API Gateway's mock integrations for simulating a wide spectrum of behaviors.
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
An application developer is tasked with enabling authentication through social media logins for a new mobile app and subsequently permitting access to specific cloud storage and database services on behalf of the authenticated user. Which Amazon Cognito feature should the developer leverage to achieve these requirements?
IAM roles with trust relationships
Amazon Cognito Identity Pools
Directory services with custom application-level federation logic
Synchronization service for user data and preferences
Amazon Cognito User Pools
External identity provider integration with a token broker service
The developer should leverage Amazon Cognito Identity Pools to meet the requirements. Identity Pools provide federated authentication, enabling users to authenticate with social identity providers, and then obtain temporary permissions to access cloud services directly. This is different from User Pools, which offer user directory functionality and authentication without direct federation into service-level access.
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
When granting an EC2 instance the necessary permissions to access S3 buckets, which AWS feature should you primarily use?
Using Amazon Cognito user pools
Attaching an IAM role to the instance
Generating access keys for the root account
Creating a new IAM user for the instance
AWS Identity and Access Management (IAM) roles are used to grant permissions to AWS resources without the need to manage static credentials. When attaching an IAM role to an EC2 instance, the instance can perform actions on AWS services that the role's policies allow. This is the recommended method for granting EC2 instances access to other AWS services. IAM users are not attached directly to resources, access keys are not a feature for granting permissions but are used for programmatic access for IAM users, and Amazon Cognito is primarily used for managing user identities in apps, not for EC2 instances to access AWS resources.
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
A developer needs to deploy a web application in the cloud. What is an effective approach to ensure the allocated resources meet the application's performance requirements without incurring unnecessary costs?
Analyze resource usage patterns from similar projects and perform load tests to determine the application's specific requirements.
Automatically use the largest instance types available to guarantee the best performance, disregarding cost considerations.
Choose a one-size-fits-all allocation based on the provider's default or recommended settings.
The correct approach for resource allocation involves an assessment of resource usage patterns, which can be achieved by analyzing historical data from similar workloads and by performing load testing on the application. This helps to establish a baseline and adjust resources to match the demand, avoiding under-provisioning that can lead to poor performance, as well as over-provisioning that would incur unnecessary costs.
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Which approach should be used to retrieve an item from an Amazon DynamoDB table based on a unique hash key to ensure the MOST efficient read performance?
Search using a secondary index that contains the unique hash key.
Enable continuous backup and restore to retrieve the item quickly.
Perform a query operation using the table's primary key.
Perform a scan operation and then filter the results to find the specific item.
A query operation is the correct choice for efficiently retrieving an item using a unique hash key from an Amazon DynamoDB table because a query allows you to specify the hash key and, optionally, a range key to quickly locate the data. Scan operations, in contrast, read every item in a table and filter out results afterwards, which consumes more read capacity and increases latency. Secondary index searches are only necessary when querying on non-primary key attributes, and continuous backup is a durability feature, not related to data retrieval performance.
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Which service offers automated code reviews and actionable recommendations for improving code quality, along with identifying sections of code that might expose security vulnerabilities?
Config
CodeGuru
CloudFormation
CloudTrail
The correct service is designed to automate code reviews and provide recommendations for enhancing code quality, including identifying security vulnerabilities. The other options listed are services that serve different purposes: orchestration of resource creation, tracking resource configurations and changes, and logging API activity across an account respectively.
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Your company is developing a serverless application with an AWS Lambda function that requires multiple development and testing environments. Which AWS feature allows you to point to different versions of a Lambda function for different integration testing environments without modifying the function's ARN?
Lambda Versions
Stage Variables in API Gateway
Lambda Aliases
Environment Variables in Lambda
AWS Lambda Aliases enable you to route traffic to different versions of a Lambda function. Aliases are like pointers and can be changed to point to different function versions as needed. This is useful for integration testing as you can maintain separate testing environments without changing the function's ARN, thus ensuring the stability and consistency of your application during the testing phase. Using different function versions or Stage variables are incorrect choices because while they can point to different configuration settings or Lambda versions, they do not offer the same aliasing capability for routing across different environments without altering the ARN.
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
An enterprise has mandated that their cloud-hosted applications authenticate users from the on-premises directory service without duplicating sensitive credentials. Which approach should be employed to meet this requirement while leveraging the organization's existing user directory?
Integrate the application through federation using SAML 2.0 with the organization's existing identity management system.
Generate temporary access credentials for users via a token service to authenticate against the on-premises directory service.
Migrate the on-premises directory service users to a cloud directory service with User Pools.
Implement application-side user authentication controls using the Access Control List (ACL) feature of a cloud directory service.
The correct approach is to integrate the cloud application with the on-premises directory service using a federation protocol such as SAML 2.0. IAM supports federation with SAML, which allows users to authenticate using their existing corporate credentials without storing those credentials in the cloud. While Cognito is also a service that supports federation, IAM with SAML is specifically designed to work seamlessly with corporate directories like Active Directory and is hence the better-suited choice for this particular use case. The other options mentioned do not directly address the requirement of federating with an existing on-premises directory service.
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Which service should be employed for aggregating, manipulating, and evaluating streaming content instantaneously?
Amazon Relational Database Service
AWS Lambda
Amazon Kinesis
Amazon Simple Storage Service
The correct service for these requirements is Amazon Kinesis, as it offers a platform specifically tailored to accommodate large-scale, real-time processing of streaming content. It is capable of handling vast amounts of data with low latency, allowing developers to collect, analyze, and process information as it arrives.
Amazon Simple Storage Service, while effective for storing and retrieval of data, is not optimized for instantaneous stream processing. Likewise, AWS Lambda, although capable of executing code in response to events, functions as a compute service rather than a data ingestion and processing service. Similarly, Amazon Relational Database Service provides management of relational databases but does not cater to the real-time processing of streaming data.
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
A development team is implementing a strategy to gradually introduce a feature update in their serverless function. They wish to monitor the feature's impact by initially exposing it to a small fraction of their user base. Which approach should they employ to control the traffic between the current and new function code?
Update the serverless function's execution role to include permissions for accessing the new feature code.
Adjust the serverless function's environment variables to point to the new version for a subset of the user base.
Assign an alias to the new function code and specify the percentage of traffic to distribute to this alias.
Using an alias for the serverless function that points to the new function version, and configuring traffic shifting to direct a set percentage of user requests to that version, will manage the gradual rollout of the feature. Doing so allows the team to gradually increase the traffic percentage as confidence in the feature grows, while monitoring for unforeseen issues. Directly modifying environment variables or updating the function code without traffic control would result in all traffic immediately using the new feature, which can be risky for a production environment. Modifying the execution role does not relate to traffic routing and would not achieve the desired outcome.
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Your company has an application that generates user analytics data that is frequently accessed for the first 30 days and then less frequently accessed for up to 90 days. After 90 days, the data is accessed only occasionally for historical analysis. Your task is to optimize the storage costs by implementing lifecycle rules on the S3 bucket containing this data. Which lifecycle configuration would you recommend to meet these access patterns and cost optimization goals?
Transition to S3 Standard-Infrequent Access after 30 days and then to S3 Glacier after 90 days.
Retain data in S3 Standard for 30 days and permanently delete it after 90 days.
Transition to S3 One Zone-Infrequent Access after 30 days, and retain without further transitions.
Keep the data in S3 Standard for 90 days, then move to S3 Glacier.
Choosing to transition the objects to S3 Standard-Infrequent Access (S3 Standard-IA) after 30 days leverages the lower storage cost for less frequently accessed data while providing millisecond access. After 90 days, transitioning the data to S3 Glacier provides a cost-effective storage solution suitable for infrequent access with retrieval times that can fit historical analysis requirements. Moving data directly from S3 Standard to S3 One Zone-Infrequent Access after 30 days is less optimal because it isn't leveraging the access frequency pattern correctly. Permanently deleting the data after 90 days would not fulfill the requirement of occasional access for historical analysis.
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Which design pattern allows components of a system to interact with each other with minimal interdependencies, thereby enhancing flexibility and maintenance?
Tightly coupled design
Choreography pattern
Monolithic design
Loosely coupled design
Loosely coupled components communicate with each other in a way that reduces the dependencies between them, which makes it easier to maintain and update one component without affecting the others. This is opposed to tightly coupled components, where components depend heavily on each other, making changes more difficult without affecting the entire system.
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Your company has an application that uploads processed data to an S3 bucket. You need to design a system where an AWS Lambda function is invoked for each new object created in the bucket to perform additional processing. What combination of steps should be taken to ensure the proper integration between S3 and the Lambda function?
Enable Cross-Origin Resource Sharing (CORS) on the S3 bucket to trigger the Lambda function.
Create an S3 lifecycle policy that invokes the Lambda function upon new object upload.
Apply a bucket policy to the S3 bucket to allow the Lambda function to be invoked when a new object is created.
Configure an event notification on the S3 bucket to invoke the Lambda function when an object is created.
To trigger an AWS Lambda function on S3 object creation, an event notification should be configured on the specific S3 bucket. Each event notification can specify an event type (such as 's3:ObjectCreated:*') and the destination for the event, which would be the Lambda function's ARN (Amazon Resource Name). Thus, the correct answer is 'Configure an event notification on the S3 bucket to invoke the Lambda function when an object is created'. Bucket policies and CORS configurations on the S3 bucket do not relate to the invocation of Lambda functions based on object creation events. An S3 lifecycle policy is used for object management (such as expiration or transition) and not for event invocation of Lambda functions
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Looks like that's it! You can go back and review your answers or click the button below to grade your test.
Join premium for unlimited access and more features