A company uses AWS Glue ETL pipelines to process data. The company uses Amazon Athena to analyze data in an Amazon S3 bucket.
To better understand shipping timelines, the company decides to collect and store shipping and delivery dates in addition to order data. The company adds a data quality check to ensure that shipping date is greater than order date and that delivery date is greater than shipping date. Orders that fail the quality check must be stored in a second S3 bucket.
Which solution will meet these requirements MOST cost-effectively?
A. Use the AWS Glue DataBrew DATEDIFF function to create two additional columns. Check the new columns.
B. Use Athena to query all three date columns, and compare the columns.
C. Use AWS Glue Data Quality to create a custom rule that uses the three date columns.
D. Use an AWS Glue crawler to populate an AWS Glue Data Catalog. Use the three date columns to create a filter.
Show Answer
Correct Answer: C
Explanation: AWS Glue Data Quality is designed to enforce data quality rules within Glue ETL jobs. A custom rule can validate that shipping_date > order_date and delivery_date > shipping_date, and failed records can be handled within the ETL flow and written to a separate S3 bucket. This is more cost-effective and purpose-built than querying with Athena, using DataBrew for simple derived columns, or relying on a crawler/catalog filter, which does not perform row-level quality validation.
Question 42
A retail company wants to implement real-time analytics for an ecommerce platform. The company needs to collect clickstream data from the company's website and mobile apps. The company needs to store the data for analytics.
Which solution will meet these requirements with the LEAST ongoing maintenance?
A. Use Amazon Data Firehose to ingest the streaming data. Deliver the processed data directly to a provisioned Amazon Redshift cluster.
B. Deploy agents on Amazon EC2 instances to collect the streaming data. Use the AWS CLI to periodically batch upload the data to an Amazon S3 bucket.
C. Use Amazon Kinesis Data Streams to collect the streaming data. Use Amazon Data Firehose to deliver the data to an Amazon S3 bucket.
D. Use an Amazon Managed Streaming for Apache Kafka (Amazon MSK) broker to collect the data. Store the data in an Amazon RDS DB instance.
Show Answer
Correct Answer: C
Explanation: Amazon Kinesis Data Streams can ingest real-time clickstream data at scale, and Amazon Data Firehose can reliably deliver the stream to Amazon S3 for durable, low-maintenance storage used by downstream analytics. This serverless managed approach minimizes operational overhead compared with managing EC2, MSK, or a provisioned Redshift cluster.
Question 43
A company generates yearly financial statements for customers and stores the statements in an Amazon S3 bucket. Customers rarely access the documents after 1 week. The company must retain the statements for 7 years. The statements must remain readily accessible for customers.
Which solution will meet these requirements in the MOST cost-effective way?
A. Create an S3 Lifecycle rule to transition objects to S3 Glacier Deep Archive after 7 days. Expire the objects after 7 years.
B. Set the S3 bucket to use S3 Intelligent-Tiering when new objects are uploaded. Set objects to expire after 7 years.
C. Create an S3 Lifecycle rule to transition objects to S3 Glacier Instant Retrieval after 7 days. Expire the objects after 7 years.
D. Set the S3 bucket to use S3 Glacier Instant Retrieval when new objects are uploaded. Create an AWS Lambda function that runs daily to delete any objects that are older than 7 years.
Show Answer
Correct Answer: C
Explanation: S3 Glacier Deep Archive is not readily accessible because retrieval takes hours, so it does not meet the requirement. S3 Intelligent-Tiering is intended for unpredictable access patterns and is less cost-effective when the access pattern is known. S3 Glacier Instant Retrieval is designed for long-lived, rarely accessed data that still requires millisecond access, making it appropriate after 7 days. Using an S3 Lifecycle rule to transition after 7 days and expire after 7 years satisfies both the retention and deletion requirements without additional Lambda automation.
Question 44
A company creates a new non-production application that runs on an Amazon EC2 instance. The application needs to communicate with an Amazon RDS database instance using Java Database Connectivity (JDBC). The EC2 instances and the RDS database instance are in the same subnet.
Which solution will meet this requirement?
A. Modify the IAM role that is assigned to the database instance to allow connections from the EC2 instances.
B. Modify the ec2_authorized_hosts parameter in the RDS parameter group to include the EC2 instances. Restart the database instance.
C. Update the database security group to allow connections from the EC2 instances.
D. Enable the Amazon RDS Data API and specify the Amazon Resource Name (ARN) of the database instance in the JDBC connection string.
Show Answer
Correct Answer: C
Explanation: Amazon RDS database access is controlled by VPC security groups. To allow a JDBC connection from an EC2 instance, configure the RDS database's security group to allow the required database port from the EC2 instance (or its security group). IAM roles assigned to RDS do not control network connectivity, there is no valid RDS parameter named ec2_authorized_hosts, and the RDS Data API is an HTTPS API rather than a JDBC endpoint.
Question 45
A company needs to build a data pipeline to process a 1-TB file from an Amazon S3 bucket. The pipeline needs to create three DataFrames based on business logic. The pipeline must save all three DataFrames to a second S3 bucket in parallel. The company needs to set the pipeline to be the target of an Amazon EventBridge rule that matches file uploads to the source S3 bucket.
Which solution will meet these requirements with the LEAST maintenance overhead?
A. Configure an Apache Spark Streaming application on Amazon EMR to process data from the S3 source bucket in batches, create DataFrames, and save the output to the destination S3 bucket.
B. Configure three AWS Lambda functions to process the business logic and to save the DataFrames to the destination S3 bucket in parallel.
C. Configure an AWS Glue workflow to run three AWS Glue jobs in parallel to process the file.
D. Configure an AWS Step Functions state machine to initiate an AWS Glue workflow to run three AWS Glue jobs in parallel to process the file.
Show Answer
Correct Answer: C
Explanation: AWS Glue is a fully managed Spark-based ETL service well suited for processing a 1 TB file from Amazon S3. A Glue workflow can orchestrate three Glue jobs to run in parallel, each producing one DataFrame and writing to the destination S3 bucket. Glue workflows can be triggered by Amazon EventBridge, avoiding additional orchestration. EMR requires cluster management, Lambda is not appropriate for processing a 1 TB file due to runtime and resource limits, and adding Step Functions introduces unnecessary orchestration overhead because Glue workflows already provide the required parallel execution.
Question 46
A manufacturing company uses AWS Glue jobs to process IoT sensor data to generate predictive maintenance models. A data engineer needs to implement automated data quality checks to identify temperature readings that are outside the expected range of -50°C to 150°C. The data quality checks must also identify records that are missing timestamp values.
The data engineer needs a solution that requires minimal coding and can automatically flag the specified issues.
Which solution will meet these requirements?
A. Create an AWS Glue DataBrew project to profile the sensor data Define completeness rules for timestamps. Set up numeric range validation for temperature values.
B. Use AWS Glue’s Data Quality rules and machine learning (ML)-based anomaly detection to identify missing timestamps and to detect temperature anomalies.
C. Create an AWS Lambda function to scan the sensor data files to validate temperature ranges. Use AWS Glue Data Catalog tables to check timestamp completeness.
D. Create an AWS Glue DynamicFrame that uses a custom data quality operator to profile the sensor data. Use Amazon SageMaker Data Wrangler transforms to validate timestamps and temperature ranges.
Show Answer
Correct Answer: A
Explanation: AWS Glue DataBrew provides built-in data profiling and data quality validation with minimal coding. It supports completeness checks to identify missing timestamp values and numeric range validation to ensure temperature values stay within the expected -50°C to 150°C range. The other options either require custom code (Lambda, DynamicFrame), add unnecessary services (SageMaker), or rely on ML anomaly detection when simple deterministic validation rules are sufficient.
Question 47
An ecommerce company collects daily customer transaction logs in CSV format and stores the logs in Amazon S3. The company uses Amazon Athena to scan a subset of attributes from the logs on the same day the company receives each log.
Query times are increasing because of increasing transaction volume. The company wants to improve query performance.
Which solution will meet these requirements with the SHORTEST query times?
A. Convert the CSV logs into multiple ORC files for better parallelism in Athena. Partition by date in Amazon S3. Use columnar pushdown filters.
B. Convert the CSV logs to JSON. Partition by date in Amazon S3. Use Athena with dynamic filtering to reduce data scans.
C. Convert the CSV logs to Avro. Partition by date in Amazon S3. Use Athena with projection-based partitioning.
D. Convert the CSV logs to a single Apache Parquet file for each day Partition the data by date in Amazon S3. Use Athena with predicate pushdown filters.
Show Answer
Correct Answer: A
Explanation: Athena performs best with columnar formats and parallel reads. Converting CSV to ORC and storing multiple files enables parallelism, while partitioning by date reduces scanned data. Columnar pushdown reads only required columns. Option D's use of a single Parquet file per day limits parallelism despite Parquet also being an efficient columnar format.
Question 48
A company must retain specific data for 1 year. A data engineer observes that one of the company’s Amazon S3 buckets contains millions of objects that are older than 3 years. Versioning is enabled on the bucket.
To reduce costs, the data engineer implements an S3 Lifecycle rule to expire objects after 365 days. The new S3 Lifecycle rule causes the object count to double instead of decrease.
Which additional step must the data engineer take to permanently delete the old objects?
A. Disable versioning on the S3 bucket.
B. Use an AWS Lambda function to run a Python job to identify and delete objects that are older than 365 days.
C. Suspend versioning on the S3 bucket.
D. Add an additional S3 Lifecycle rule to delete the current and expired versions of objects that are older than 365 days.
Show Answer
Correct Answer: D
Explanation: With S3 Versioning enabled, an expiration lifecycle rule on current objects adds a delete marker instead of permanently removing the object versions. The noncurrent versions remain and can increase the object count. To permanently remove old data, configure an additional lifecycle rule to expire/delete noncurrent (previous) object versions after the required retention period.
Question 49
Two data engineering teams use separate AWS accounts. Both teams request access to the same datashare in an Amazon Redshift cluster that is in a third AWS account. The datashare is named salesshare.
A data engineer must use the Amazon Redshift SQL interface to grant both data engineering teams' access to the datashare.
Which command or commands will meet this requirement?
A. GRANT USAGE ON DATASHARE salesshare TO ACCOUNTS ‘ ’ AND ‘ ’;
B. GRANT USAGE ON DATASHARE salesshare TO NAMESPACES ‘ ’ AND ‘ ’;
C. GRANT USAGE ON DATASHARE salesshare TO ACCOUNT ‘ ’; GRANT USAGE ON DATASHARE salesshare TO ACCOUNT ‘ ’;
D. GRANT USAGE ON DATASHARE salesshare TO NAMESPACE ‘ ’; GRANT USAGE ON DATASHARE salesshare TO NAMESPACE ‘ ’;
Show Answer
Correct Answer: C
Explanation: For cross-account Amazon Redshift datashares, usage is granted to AWS accounts individually using the ACCOUNT keyword. There is no SQL syntax to grant to multiple accounts in a single GRANT statement. NAMESPACE is used to target specific Redshift namespaces rather than granting to AWS accounts. Therefore, two separate GRANT statements are required, one for each consumer AWS account.
Sources:
https://docs.aws.amazon.com/redshift/latest/dg/writes-associating.html
https://aws.amazon.com/blogs/aws/cross-account-data-sharing-for-amazon-redshift
Question 50
A company needs a solution to store and query product data that has variable attributes. The solution must support unpredictable and high-volume queries with single-digit millisecond latency, even during sudden traffic spikes. The solution must retrieve items by a primary identifier named Product ID. The solution must allow flexible queries by secondary attributes named Category and Brand.
Which solution will meet these requirements?
A. Use an Amazon DynamoDB table with on-demand capacity to store product data. Store products by primary key. Use global secondary indexes (GSIs) to store secondary attributes.
B. Use Amazon Aurora with a Multi-AZ deployment to store product data. Use read replicas. Create indexes for primary and secondary attributes.
C. Use an Amazon OpenSearch Serverless cluster with dynamic scaling to store product data. Index product data by primary and secondary attributes.
D. Use Amazon ElastiCache (Redis OSS) and Amazon S3 to store product data. Use Amazon Athena to run flexible secondary attribute queries.
Show Answer
Correct Answer: A
Explanation: Amazon DynamoDB with on-demand capacity is designed for unpredictable workloads and can automatically handle traffic spikes while delivering single-digit millisecond latency. Using Product ID as the primary key enables efficient direct retrievals, and global secondary indexes (GSIs) on Category and Brand provide flexible queries on those attributes. Aurora is a relational database and does not provide the same scaling/latency characteristics for this use case, OpenSearch is optimized for search rather than primary key access as the system of record, and Athena over S3 cannot provide millisecond query latency.
$19
Get all 310 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.