Courseiva

CCNA Db Security Questions

75 of 310 questions · Page 3/5 · Db Security topic · Answers revealed

151
MCQmedium

An IAM policy is attached to an IAM user. The user wants to connect to an RDS MySQL database using IAM database authentication. What does this policy allow?

A.Allows the user to connect to any database on the RDS instance as any user.
B.Allows the user to manage the RDS instance.
C.Allows the user to connect to the RDS instance with the database user name 'db_user1'.
D.Allows the user to connect to the RDS instance with any database user name.
AnswerC

The resource specifies the database user.

Why this answer

IAM database authentication allows an IAM user to authenticate to an RDS MySQL database using an IAM user or role. The IAM policy must include the rds-db:connect action with a resource ARN specifying the RDS instance and the database user name. When the resource ARN includes 'db_user1', the policy only permits connection as that specific database user, not as any user.

Option A is incorrect because the policy does not grant permissions to any database or any user; it is scoped to 'db_user1'. Option B is incorrect because the rds-db:connect action does not grant management of the RDS instance. Option D is incorrect because the resource ARN restricts to 'db_user1', so connecting with any other database user name would be denied.

152
Multi-Selecthard

A company uses Amazon RDS for SQL Server with Multi-AZ deployment. The security team wants to ensure that all database connections use SSL/TLS encryption. Which TWO actions should the database specialist take to enforce SSL connections? (Choose two.)

Select 2 answers
A.Use the RDS Console to enable 'Force SSL' on the DB instance.
B.Modify the DB parameter group to set 'require_secure_transport' to ON.
C.Create a server-level trigger that requires SSL for all logins.
D.Add an inbound rule to the security group that only allows traffic on port 1433 from IP addresses that use SSL.
E.Set the 'rds.force_ssl' parameter to 1 in the DB parameter group.
AnswersC, E

A trigger can enforce SSL by checking the session's protocol and denying non-SSL connections.

Why this answer

SQL Server allows you to create a server-level DDL trigger that checks the login event and enforces SSL by examining the `@@OPTIONS` or `encrypt_option` in `sys.dm_exec_connections`. This is a supported method to force SSL for all connections to an RDS for SQL Server instance. Option E is correct because setting the `rds.force_ssl` parameter to 1 in the DB parameter group is the native RDS mechanism to enforce SSL/TLS for all connections to the DB instance.

Exam trap

The trap here is that candidates confuse MySQL-specific parameters (like `require_secure_transport`) with SQL Server parameters, or assume that security group rules can enforce encryption at the transport layer, when in fact they only control network access, not the encryption state of the connection.

153
MCQhard

A company is using Amazon DynamoDB with encryption at rest using an AWS managed key. The security team now requires that the encryption key be rotated every 90 days. What should they do?

A.Enable automatic key rotation in AWS KMS for the default DynamoDB key.
B.Create a new customer managed key and enable automatic rotation every 90 days.
C.Disable encryption at rest and implement client-side encryption.
D.Use a customer managed key and manually rotate it every 90 days by creating a new key and updating the DynamoDB table.
AnswerD

Manual rotation is required to achieve a 90-day rotation schedule.

Why this answer

DynamoDB encryption at rest using an AWS managed key does not support customer-controlled rotation. Option D is correct because using a customer managed key allows you to manually rotate the key every 90 days by creating a new key and updating the DynamoDB table. Option A is incorrect because AWS managed keys rotate automatically every year, not on a 90-day schedule.

Option B is incorrect because KMS automatic rotation for customer managed keys is also yearly and cannot be set to 90 days. Option C is incorrect because disabling encryption at rest is not a valid solution and adds security risk.

154
MCQmedium

A company uses Amazon ElastiCache for Redis to cache session data. The security team requires that all data in transit be encrypted. The Redis cluster currently does not have encryption in transit enabled. The database specialist needs to enable encryption in transit with minimal downtime. Which action should the specialist take?

A.Create a new Redis cluster with encryption in transit enabled, and migrate the data from the existing cluster.
B.Update the Redis parameter group to enable the 'encryption-in-transit' parameter and reboot the cluster.
C.Use a security group to enforce encrypted connections by allowing only TLS traffic.
D.Modify the existing Redis cluster to enable encryption in transit using the AWS CLI.
E.Enable encryption in transit on the existing cluster by using the AWS Management Console.
AnswerA

Encryption in transit can only be enabled at cluster creation time.

Why this answer

Encryption in transit for ElastiCache for Redis can only be enabled at cluster creation time; it cannot be added to an existing cluster. Therefore, the correct approach is to create a new Redis cluster with encryption in transit enabled, migrate the session data from the existing cluster (e.g., using replication or a manual export/import), and then redirect application traffic to the new cluster. This ensures minimal downtime if the migration is performed during a maintenance window or using a blue/green deployment strategy.

Exam trap

The trap here is that candidates assume encryption in transit can be toggled on an existing cluster, similar to enabling encryption at rest, but AWS enforces it as a creation-time-only setting for ElastiCache for Redis.

How to eliminate wrong answers

Option B is wrong because there is no 'encryption-in-transit' parameter in a Redis parameter group; encryption in transit is a cluster-level setting that cannot be changed via parameter groups. Option C is wrong because security groups control network access at the IP/port level but cannot enforce TLS encryption; they do not enable encryption in transit on the Redis cluster itself. Option D is wrong because the AWS CLI cannot modify an existing cluster to enable encryption in transit; this setting is immutable after creation.

Option E is wrong because the AWS Management Console does not allow enabling encryption in transit on an existing cluster; it must be set at launch time.

155
MCQmedium

A company is migrating its on-premises Oracle database to Amazon RDS for Oracle. The security team requires that all data at rest be encrypted using a customer-managed key stored in AWS KMS, and that the key be rotated automatically every year. The company also needs to ensure that only specific IAM roles can access the key. Which combination of steps should the database administrator take to meet these requirements?

A.Create the RDS instance without encryption, then use the AWS Console to enable encryption after creation using a customer-managed key.
B.Create the RDS instance with encryption using the default AWS managed service key, and set up automatic key rotation in KMS.
C.Use AWS CloudHSM to generate and store the encryption key, and configure RDS to use the CloudHSM key for encryption.
D.Create the RDS instance with encryption enabled using a customer-managed KMS key, and configure the key policy to restrict access to the required IAM roles.
AnswerD

This meets encryption, key rotation, and access control requirements.

Why this answer

It enables encryption on the RDS instance with a customer-managed KMS key, which allows automatic yearly key rotation (configurable in KMS) and access control via KMS key policies to restrict usage to specific IAM roles. Option A is wrong because RDS does not support enabling encryption after creation; it must be enabled at launch. Option B is wrong because the default AWS managed service key does not allow customer-managed rotation or custom key policies.

Option C is wrong because CloudHSM is not required; KMS customer-managed keys satisfy the requirements without CloudHSM.

156
MCQeasy

A snapshot of an Amazon RDS DB instance is shown in the exhibit. What does the output indicate?

A.The snapshot creation is still in progress.
B.The snapshot is encrypted and the encryption process is complete.
C.The snapshot is not encrypted.
D.The snapshot is in the process of being encrypted.
AnswerB

The status 'encrypted' means the snapshot is encrypted.

Why this answer

The snapshot is encrypted (Encrypted: true) and the status is 'encrypted', indicating that the encryption process is complete. Option A is incorrect because the snapshot exists and is not in progress. Option C is incorrect because the snapshot is indeed encrypted.

Option D is incorrect because the status shows 'encrypted', not 'encrypting'.

157
Multi-Selecteasy

A company is migrating an on-premises Oracle database to Amazon RDS for Oracle. The security team requires that all data be encrypted at rest using a customer-managed KMS key. Additionally, the database should be accessible only from a specific VPC. Which THREE steps should the database specialist take to meet these requirements? (Choose three.)

Select 3 answers
A.Configure the security group for the RDS instance to allow inbound traffic only from the application security group.
B.Launch the RDS instance in a private subnet of the VPC.
C.Create a VPC endpoint for RDS and associate it with the DB instance.
D.Store the encryption key in Amazon S3 and configure RDS to use it.
E.Enable encryption at rest using a customer-managed KMS key when creating the RDS instance.
AnswersA, B, E

This restricts access to the application's security group.

Why this answer

Security groups act as a virtual firewall for RDS instances. By configuring the security group to allow inbound traffic only from the application security group, you restrict database access to specific application servers, meeting the requirement that the database be accessible only from a specific VPC.

Exam trap

The trap here is that candidates often confuse VPC endpoints with network access control, thinking a VPC endpoint restricts access to the database, when in fact it only provides a private connection path without limiting which resources can connect.

158
MCQhard

A company uses Amazon DynamoDB to store session data. The security team has enabled DynamoDB Accelerator (DAX) for performance. However, they are concerned about data encryption at rest. DAX encrypts data at rest by default. The security team wants to use a customer managed key (CMK) in AWS KMS. How can this be configured?

A.Use an asymmetric customer managed key because it provides better security.
B.DAX does not support encryption at rest with a customer managed key; only AWS managed keys are supported.
C.Enable encryption at rest on the DAX cluster after creation by modifying the cluster settings.
D.Create a DAX cluster and specify the KMS key ID of a symmetric customer managed key during creation.
AnswerD

DAX allows specifying a symmetric CMK during cluster creation.

Why this answer

DAX supports encryption at rest using a KMS key. You must specify a symmetric customer managed key (CMK) at cluster creation time; encryption configuration cannot be modified after creation. Option A is wrong because DAX does support encryption with a CMK, and asymmetric keys are not supported for DAX; only symmetric keys are allowed.

Option B is wrong because DAX does allow the use of customer managed keys; it is not limited to AWS managed keys. Option C is wrong because encryption cannot be enabled after cluster creation; it must be configured during creation.

159
MCQhard

A company uses Amazon DynamoDB with a table that stores sensitive customer data. The security team requires that all data at rest be encrypted using a customer-managed AWS KMS key (CMK). Additionally, the company needs to ensure that only specific IAM roles can access the table. Which solution meets these requirements with the least operational overhead?

A.Enable encryption at rest using AWS KMS with a CMK and use column-level encryption with AWS KMS to restrict access.
B.Attach a resource-based policy to the DynamoDB table that grants access only to the specific IAM roles.
C.Use a DynamoDB Accelerator (DAX) cluster with encryption at rest using a CMK, and attach a resource-based policy to the table.
D.Configure the DynamoDB table to use AWS KMS encryption with a CMK. Create an IAM role with a policy that grants access to the table and includes a condition that the encryption context matches the CMK.
E.Configure the DynamoDB table to use AWS KMS encryption with a CMK, and attach a key policy to the CMK that allows only the specific IAM roles.
AnswerD

This ensures encryption with a CMK and restricts access using IAM conditions on the encryption context.

Why this answer

It combines DynamoDB encryption at rest with a customer-managed KMS CMK and uses an IAM role policy with an encryption context condition. This ensures that only specific IAM roles can access the table, and the encryption context condition ties the KMS key usage to the table, providing fine-grained access control with minimal operational overhead. The encryption context is automatically set by DynamoDB to the table ARN, so the condition key `kms:EncryptionContext:aws:dynamodb:tableName` can be used to restrict decryption to that specific table.

Exam trap

The trap here is that candidates often confuse key policies with IAM policies, thinking that a key policy alone can restrict table access, or they incorrectly assume DynamoDB supports resource-based policies like S3 bucket policies.

How to eliminate wrong answers

Option A is wrong because column-level encryption is not a feature of DynamoDB; it would require application-level encryption, adding operational overhead and not directly restricting IAM role access to the table. Option B is wrong because DynamoDB does not support resource-based policies; it uses IAM policies for access control, and attaching a resource-based policy is not possible. Option C is wrong because DAX is a caching layer, not a security mechanism; it does not enforce table-level access control, and attaching a resource-based policy to the table is still not supported.

Option E is wrong because a key policy on the CMK controls who can use the key for encryption/decryption, but it does not directly control access to the DynamoDB table itself; IAM policies are needed for table access.

160
Multi-Selecteasy

A company uses an Amazon RDS for MySQL DB instance that needs to be accessed by a Lambda function. Which TWO steps should be taken to ensure secure access?

Select 2 answers
A.Create an IAM role for the Lambda function with permissions to use RDS IAM database authentication.
B.Place the Lambda function in the same VPC as the RDS instance to avoid traversing the internet.
C.Store the database credentials in the Lambda environment variables.
D.Use the database master user account for the Lambda function.
E.Attach a NAT gateway to the Lambda function's VPC for outbound internet access.
AnswersA, B

IAM database authentication allows passwordless access using IAM roles.

Why this answer

Options A and B are correct. Creating an IAM role for the Lambda function with permissions to use RDS IAM database authentication (A) avoids hardcoding credentials and enables secure, temporary authentication. Placing the Lambda function in the same VPC as the RDS instance (B) ensures traffic stays within the AWS network without traversing the internet.

Option C is wrong because storing credentials in Lambda environment variables is insecure and exposes them. Option D is wrong because using the database master user account violates least privilege and is insecure. Option E is wrong because a NAT gateway is not needed for RDS access within the same VPC.

161
MCQeasy

A company wants to encrypt data at rest for an existing Amazon RDS for MySQL DB instance. The database is currently unencrypted. What is the most efficient way to enable encryption?

A.Enable encryption on the existing DB instance by modifying the parameter group.
B.Create a snapshot of the DB instance, copy the snapshot with encryption enabled, and restore the DB instance from the encrypted snapshot.
C.Use AWS KMS to automatically encrypt the DB instance.
D.Modify the DB instance and enable encryption from the RDS console.
AnswerB

This is the standard procedure to encrypt an unencrypted RDS instance.

Why this answer

RDS does not support enabling encryption on an existing unencrypted DB instance directly. You must create a snapshot, copy it with encryption enabled, and restore from that encrypted snapshot. Option A is incorrect because you cannot modify the DB instance to enable encryption.

Option C is incorrect because AWS KMS does not automatically encrypt the DB instance. Option D is incorrect because you cannot directly configure encryption on the existing instance.

162
Matchingmedium

Match each AWS database migration tool/service to its function.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Migrates databases to AWS with minimal downtime

Converts database schema and code to target engine

Physical device for large-scale data transfer

Continuous replication for ongoing changes

ETL service for preparing and transforming data

Why these pairings

AWS DMS is for minimal-downtime database migration, AWS SCT for schema conversion, and AWS Snowball for physical data transfer. Common confusions involve swapping these functions.

163
MCQmedium

An RDS DB instance has two security groups attached. Security group sg-12345678 allows inbound traffic on port 3306 from 0.0.0.0/0. Security group sg-87654321 allows inbound traffic on port 3306 from 10.0.0.0/16. What is the effective inbound access to the DB instance?

A.No IP addresses are allowed because the rules conflict.
B.Only the 0.0.0.0/0 range is allowed because sg-12345678 is more permissive.
C.Only the 10.0.0.0/16 range is allowed because sg-87654321 is more restrictive.
D.All IP addresses (0.0.0.0/0) are allowed to connect.
AnswerD

Since sg-12345678 allows all traffic, any IP can connect.

Why this answer

When multiple security groups are attached to an RDS instance, the rules are combined, and the most permissive inbound rule applies. Security group sg-12345678 allows all IP addresses (0.0.0.0/0), so the effective inbound access is from all IPs. Option A is wrong because the rules do not conflict; they are additive.

Option B is wrong because the more restrictive rule does not override the more permissive one. Option C is wrong because the less restrictive rule (0.0.0.0/0) applies, not just the 10.0.0.0/16 range.

Exam trap

Candidates often mistakenly think that security groups apply only the most restrictive rule, or that rules conflict. In reality, rules are additive and the most permissive rule takes effect.

164
MCQeasy

A security auditor reviews the output of a DynamoDB table description command as shown in the exhibit. Which statement accurately describes the encryption configuration of the Users table?

A.The table is encrypted using an AWS managed KMS key.
B.The table uses server-side encryption with an S3 managed key.
C.The table is not encrypted at rest.
D.The table is encrypted using a customer managed KMS key.
AnswerD

The output shows a specific KMS key ARN, indicating a customer managed key.

Why this answer

The output shows SSEDescription with Status ENABLED, SSEType KMS, and a KMSMasterKeyArn, which indicates that the table is encrypted using a customer-managed KMS key. Option A is incorrect because AWS managed KMS keys do not have an ARN like the one shown; they would have an alias like 'aws/dynamodb'. Option B is incorrect because DynamoDB does not use S3 managed keys; the SSEType is KMS.

Option C is incorrect because the status is ENABLED, indicating encryption at rest is enabled.

165
MCQeasy

A company is designing a multi-tier application that uses Amazon RDS for PostgreSQL. The application must encrypt data at rest and in transit. Which combination of steps should be taken to meet these requirements? (Choose the single best answer.)

A.Use client-side encryption for data before sending to RDS, and enable encryption at rest after the instance is created.
B.Enable encryption at rest when launching the RDS instance, and configure the DB parameter group to require SSL connections.
C.Launch the RDS instance without encryption, then enable encryption at rest using the AWS Console.
D.Use AWS KMS to encrypt the connection between the application and RDS.
AnswerB

Encryption at rest is enabled at creation; SSL enforcement ensures encryption in transit.

Why this answer

Amazon RDS for PostgreSQL supports encryption at rest only when enabled at instance launch, and SSL/TLS encryption in transit is enforced by configuring the DB parameter group to require SSL connections (e.g., setting `rds.force_ssl=1`). Encryption at rest cannot be added after creation, and SSL ensures data is encrypted between the application and the database.

Exam trap

The trap here is that candidates assume encryption at rest can be enabled after launch (like modifying an EBS volume) or that KMS alone handles in-transit encryption, but RDS requires upfront planning for at-rest encryption and explicit SSL configuration for transit.

How to eliminate wrong answers

Option A is wrong because client-side encryption does not protect data in transit between the application and RDS, and encryption at rest cannot be enabled after the instance is created—it must be specified at launch. Option C is wrong because encryption at rest cannot be enabled on an existing unencrypted RDS instance; you must migrate to a new encrypted instance. Option D is wrong because AWS KMS is used for managing encryption keys, not for encrypting network connections; SSL/TLS is the correct mechanism for encryption in transit.

166
MCQeasy

A developer needs to grant an IAM user the ability to perform all operations on an Amazon RDS DB instance except the ability to delete it. Which IAM policy action should be explicitly denied?

A.rds:RebootDBInstance
B.rds:StopDBInstance
C.rds:ModifyDBInstance
D.rds:DeleteDBInstance
AnswerD

Explicitly denying this action prevents deletion.

Why this answer

To prevent deletion, you must explicitly deny the rds:DeleteDBInstance action. Option A (rds:RebootDBInstance) is incorrect because it only reboots the instance. Option B (rds:StopDBInstance) is incorrect because it only stops the instance.

Option C (rds:ModifyDBInstance) is incorrect because it only modifies the instance. Option D (rds:DeleteDBInstance) is the correct action to deny to prevent deletion.

167
MCQmedium

A company is using Amazon DynamoDB with a global table. The security team requires that all data be encrypted at rest using a customer-managed KMS key. The table was originally created with AWS managed key encryption. The company wants to switch to a customer-managed key without downtime. What should they do?

A.Use the UpdateTable API to change the KMS key to the customer-managed key.
B.Enable DynamoDB Streams on the old table and use a Lambda function to copy data to a new table with the customer-managed key.
C.Create a new replica in the global table with the customer-managed key and then delete the old replica.
D.Create a new table with the customer-managed key, export the data from the old table using AWS Data Pipeline, and import into the new table.
AnswerD

This avoids downtime if done carefully, but there is no direct migration tool; however, it is the only way.

Why this answer

You cannot modify the encryption key of an existing DynamoDB table. To switch to a customer-managed KMS key without downtime, you must create a new table with the desired key, export data from the old table using AWS Data Pipeline, and import into the new table. Option A is incorrect because the UpdateTable API does not support changing the KMS key after table creation.

Option B is incorrect because DynamoDB Streams and Lambda are not suitable for full table migration, especially for global tables. Option C is incorrect because replicas inherit the table's encryption key and cannot have a different key.

168
MCQhard

A company wants to enforce that all new Amazon RDS DB instances are created with encryption at rest enabled. Which approach should be taken?

A.Use an IAM policy that denies the rds:CreateDBInstance action unless rds:StorageEncrypted is set to true.
B.Use AWS CloudTrail to detect unencrypted instance creation and automatically delete them.
C.Use AWS Config rules to mark unencrypted instances as noncompliant.
D.Enable encryption by default in the RDS console.
AnswerA

This preventive control enforces encryption at creation time via IAM conditions.

Why this answer

An IAM policy with a condition key `rds:StorageEncrypted` set to `true` can deny the `rds:CreateDBInstance` action when encryption is not enabled, enforcing encryption at rest at creation time. Option B is wrong because CloudTrail is an auditing service; it logs API calls but cannot automatically delete unencrypted instances without additional services like Lambda. Option C is wrong because AWS Config detects and reports noncompliant resources but does not prevent creation; it is reactive.

Option D is wrong because Amazon RDS does not offer a default encryption setting at the account level; encryption must be explicitly enabled per instance.

169
MCQhard

A company is designing a multi-tenant application using Amazon Aurora MySQL. Each tenant's data must be isolated from others. They need to encrypt data at rest with a unique AWS KMS key per tenant. How can this be achieved?

A.Create separate databases within the same Aurora cluster and assign a different KMS key to each database.
B.Use client-side encryption with different KMS keys per tenant before inserting data into the database.
C.Use a single Aurora cluster with row-level encryption using different KMS keys per tenant.
D.Launch separate Aurora clusters for each tenant, each with its own KMS key for encryption at rest.
AnswerD

Each Aurora cluster can be encrypted with a different KMS key, providing per-tenant encryption at rest.

Why this answer

Aurora MySQL encryption at rest is applied at the cluster level using a single AWS KMS key. You cannot assign different KMS keys to individual databases or tables within the same cluster. Therefore, the only way to achieve unique per-tenant encryption keys is to use separate Aurora clusters, each with its own KMS key.

Option A is incorrect because RDS encryption is cluster-wide, not per-database. Option B implements client-side encryption, not encryption at rest. Option C is not supported by Aurora MySQL, as there is no row-level encryption with per-tenant KMS keys.

Thus, Option D is correct.

170
MCQmedium

A company wants to restrict access to an Amazon DynamoDB table so that only requests from a specific VPC endpoint are allowed. Which policy should be attached to the table?

A.A security group rule that allows traffic only from the VPC endpoint.
B.An IAM policy that denies access unless the request comes from the specific VPC.
C.A VPC endpoint policy that allows only the specific VPC endpoint to access the DynamoDB table.
D.An S3 bucket policy that references the DynamoDB table.
AnswerC

A VPC endpoint policy attached to the VPC endpoint can restrict which resources, such as DynamoDB tables, are accessible through that endpoint.

Why this answer

A VPC endpoint policy attached to the VPC endpoint can restrict which DynamoDB tables are accessible through that endpoint. Option A is incorrect because security groups apply to EC2 instances and other network interfaces, not to DynamoDB tables. Option B is incorrect because while IAM policies can include conditions to restrict access based on source VPC, they are attached to IAM users or roles, not directly to the DynamoDB table.

Option D is incorrect because bucket policies are used for Amazon S3, not DynamoDB.

171
MCQmedium

A company has an Amazon RDS for SQL Server DB instance that stores financial data. The security team requires that all database activity be monitored in real-time for suspicious queries. Which AWS service should be used to meet this requirement?

A.AWS CloudTrail
B.AWS Security Hub
C.Amazon GuardDuty with RDS Protection
D.Amazon Inspector
AnswerC

GuardDuty RDS Protection monitors database activity for threats.

Why this answer

Amazon GuardDuty with RDS Protection provides real-time monitoring of database activity on Amazon RDS instances, analyzing SQL queries and detecting suspicious behavior such as SQL injection or unusual access patterns. Option A (AWS CloudTrail) is incorrect because it records API calls made to the AWS environment, not the database queries themselves. Option B (AWS Security Hub) is incorrect as it aggregates security findings from multiple AWS services but does not perform real-time database activity monitoring.

Option D (Amazon Inspector) is incorrect because it is a vulnerability assessment service that scans for software vulnerabilities and unintended network exposure, not for database query threats.

172
MCQmedium

A company has a production Amazon RDS for SQL Server database that stores financial data. The database administrator wants to audit all access to sensitive columns (e.g., credit card numbers) using the SQL Server Audit feature. The database is part of a Multi-AZ deployment. The administrator has enabled audit logging to the 'DEFAULT' file audit target, but the audit files are being written to the local instance storage and are not being retained after failover. The compliance team requires that audit logs be stored in Amazon S3 for at least 7 years. The administrator has set up an event subscription to send database events to an S3 bucket using AWS DMS, but the audit logs are not being captured. What should the administrator do to meet the compliance requirements?

A.Use RDS event subscriptions to send database audit logs to an S3 bucket.
B.Configure AWS DMS to continuously replicate the audit database to an S3 bucket.
C.Create a new SQL Server Audit target using the Amazon S3 option and configure the audit to write to an S3 bucket.
D.Enable RDS Enhanced Monitoring and configure it to send logs to CloudWatch Logs.
AnswerC

RDS for SQL Server supports custom audit targets to S3, allowing persistent storage of audit logs.

Why this answer

Amazon RDS for SQL Server supports writing SQL Server Audit logs directly to an Amazon S3 bucket as an audit target. This is the only native method that persists audit logs beyond the instance lifecycle, ensuring they survive Multi-AZ failover and meet the 7-year retention requirement. The DEFAULT file target writes to ephemeral instance storage, which is lost on failover, and RDS event subscriptions or DMS cannot capture SQL Server Audit output.

Exam trap

The trap here is that candidates confuse RDS event subscriptions (which send metadata events) with actual audit log delivery, or assume DMS can replicate arbitrary file output, when in fact only the native S3 audit target persists SQL Server Audit logs in a durable, compliant manner.

How to eliminate wrong answers

Option A is wrong because RDS event subscriptions only send database events (e.g., instance state changes, backups) to S3, not the actual SQL Server Audit log files. Option B is wrong because AWS DMS is a database migration service that replicates tables or schemas, not audit file output; it cannot capture or stream SQL Server Audit binary files to S3. Option D is wrong because RDS Enhanced Monitoring collects OS-level metrics (CPU, memory, I/O) and sends them to CloudWatch Logs, not SQL Server Audit logs.

173
MCQeasy

A company uses Amazon Redshift for its data warehouse. The security team wants to encrypt the data at rest and ensure that only authorized users can access the encryption keys. Which AWS service should be used to manage the encryption keys?

A.AWS CloudHSM
B.AWS Key Management Service (KMS)
C.AWS Secrets Manager
D.AWS Systems Manager Parameter Store
AnswerB

KMS is the integrated key management service for Redshift encryption at rest.

Why this answer

Amazon Redshift uses AWS KMS for encryption at rest. You can use either the default AWS-managed key or a customer-managed CMK. KMS integrates with Redshift to encrypt data in the cluster and allows fine-grained control over key access via IAM policies.

CloudHSM is not directly integrated with Redshift. Secrets Manager and Systems Manager Parameter Store are for secrets, not encryption keys for Redshift.

174
Multi-Selectmedium

Which TWO of the following are methods to control access to an Amazon RDS DB instance? (Select TWO.)

Select 2 answers
A.VPC security groups
B.IAM policies
C.Amazon CloudWatch alarms
D.Database passwords
E.Amazon S3 bucket policies
AnswersA, B

Security groups act as a virtual firewall to control inbound traffic to the DB instance.

Why this answer

Options A and B are correct. VPC security groups control network access to the RDS instance at the instance level, acting as a virtual firewall. IAM policies can control who can perform administrative actions on the RDS instance via the AWS API, such as creating, modifying, or deleting the instance.

Option C is incorrect because CloudWatch alarms monitor performance metrics and trigger actions, but do not control access. Option D is incorrect because database passwords are a form of authentication for users connecting to the database, not a method to control access to the RDS instance itself. Option E is incorrect because S3 bucket policies control access to Amazon S3 resources, not RDS.

175
MCQmedium

A security engineer is investigating an Amazon RDS for MySQL database that was compromised. The engineer finds that the compromise was due to a SQL injection vulnerability in a web application. The web application uses a database user with full administrative privileges. What is the BEST practice to prevent such incidents in the future?

A.Create dedicated database users with minimal privileges required for each application function.
B.Configure the DB parameter group to use the 'sql_mode' option to reject dangerous queries.
C.Enable RDS audit logs to capture all SQL queries.
D.Place the RDS instance in a private subnet with a security group that restricts inbound traffic.
AnswerA

Least privilege ensures that even if compromised, the attacker has limited access.

Why this answer

The best practice is to use dedicated database users with minimal privileges for each application function (Option A). This principle of least privilege limits the damage a SQL injection attack can cause because the compromised user cannot perform unauthorized actions beyond its specific scope. Option B is incorrect because the 'sql_mode' parameter can reject certain dangerous queries but does not address the root cause of excessive privileges and may not prevent all injection attacks.

Option C is incorrect because audit logs only help detect incidents after they occur, not prevent them. Option D is incorrect because while placing the RDS instance in a private subnet and restricting inbound traffic reduces the network attack surface, it does not prevent SQL injection attacks that originate from the application itself; the vulnerability lies in how the application interacts with the database.

176
MCQhard

A company has a compliance requirement to encrypt all RDS snapshots at rest using a customer-managed KMS key. The RDS instance is already encrypted with an AWS-managed key. What is the correct procedure to ensure snapshots use the customer-managed key?

A.Create a new RDS instance with the customer-managed KMS key and migrate data using DMS.
B.Take a snapshot of the RDS instance, copy the snapshot specifying the customer-managed KMS key, and restore from the copied snapshot.
C.Change the default KMS key for the AWS account to the customer-managed key.
D.Modify the RDS instance to use the customer-managed KMS key directly.
AnswerB

This is the only way to re-encrypt the database with a new KMS key.

Why this answer

To encrypt RDS snapshots with a customer-managed KMS key, you must first take a snapshot of the existing instance (which uses an AWS-managed key). Then, copy that snapshot and specify the customer-managed KMS key during the copy operation. Finally, restore from the copied snapshot to create a new instance encrypted with the customer-managed key.

Option A is incorrect because you cannot change the encryption key of an existing instance; you must copy the snapshot. Option B is correct and describes the proper procedure. Option C is incorrect because the default KMS key for the account does not affect existing instance snapshots.

Option D is incorrect because you cannot modify an existing RDS instance to use a different encryption key directly; the encryption key is set at creation.

177
Multi-Selectmedium

A security administrator is setting up a new Amazon RDS for SQL Server database. The company requires that all data be encrypted at rest and in transit. Additionally, the database must be accessible only from a specific CIDR range. Which TWO actions should the administrator take? (Choose TWO.)

Select 2 answers
A.Enable encryption at rest using AWS KMS.
B.Configure a security group that allows inbound traffic from the specific CIDR range.
C.Enable encryption in transit by modifying the RDS option group to include SSL.
D.Modify the DB parameter group to restrict network access.
E.Use AWS CloudHSM to manage encryption keys for the database.
AnswersA, B

Encryption at rest is a requirement.

Why this answer

Enabling encryption at rest using AWS KMS is a straightforward way to meet the encryption-at-rest requirement for RDS. Option B: Configuring a security group to allow inbound traffic from the specific CIDR range restricts network access to the database. Option C is incorrect because encryption in transit is handled by the database engine (e.g., SSL/TLS) and is not an RDS option group feature; you enable it on the client side or by modifying the DB parameter group.

Option D is incorrect because DB parameter groups do not control network access; they manage database engine parameters. Option E is incorrect because AWS KMS is the default service for RDS encryption at rest; CloudHSM is an alternative for key management but not required.

178
Multi-Selectmedium

A company is using Amazon RDS for MySQL and needs to comply with PCI DSS requirements. Which TWO actions should the company take to secure the database? (Choose TWO.)

Select 2 answers
A.Enable encryption at rest using AWS KMS.
B.Configure the database to write audit logs directly to an S3 bucket.
C.Enable audit logging to track database activities.
D.Enable public accessibility on the RDS instance to allow access from anywhere.
E.Change the default database port to a non-standard port.
AnswersA, C

Encryption at rest is required for data protection.

Why this answer

Options A and C are correct. Enabling encryption at rest using AWS KMS protects data on disk, which is a PCI DSS requirement. Enabling audit logging helps track database activities for compliance.

Options B and D are incorrect: writing audit logs directly to an S3 bucket is not supported; RDS audit logs are sent to CloudWatch Logs. Enabling public accessibility would violate security requirements. Option E is incorrect because changing the default port is not a PCI DSS requirement and may complicate management without adding meaningful security.

179
Multi-Selecteasy

Which TWO methods can be used to securely connect to an Amazon RDS for PostgreSQL DB instance from an EC2 instance in the same VPC? (Select TWO.)

Select 2 answers
A.Use IAM database authentication.
B.Configure a security group that allows all traffic from the EC2 instance.
C.Use a bastion host to proxy the connection.
D.Connect using SSL/TLS.
E.Set up a VPC peering connection between the EC2 VPC and the RDS VPC.
AnswersA, D

IAM authentication provides secure authentication.

Why this answer

Using SSL/TLS encrypts the connection. Using IAM database authentication provides a secure authentication mechanism. A security group allows traffic but does not encrypt.

A VPC peering connection does not encrypt. A bastion host may add encryption but is not a method itself.

180
MCQmedium

A company is using Amazon Redshift for data warehousing. They need to ensure that data is encrypted at rest using a customer-managed AWS KMS key. The cluster is currently unencrypted. What is the simplest way to enable encryption?

A.Create a new Redshift cluster with encryption enabled and migrate the data.
B.Enable encryption directly on the existing cluster using AWS CLI.
C.Create a snapshot of the existing cluster and restore it to a new encrypted cluster.
D.Modify the existing cluster and enable encryption using the Redshift console.
AnswerA

This is the simplest method; create a new encrypted cluster and copy the data.

Why this answer

You cannot enable encryption on an existing Amazon Redshift cluster. The simplest approach is to create a new cluster with encryption enabled using a customer-managed AWS KMS key, then migrate the data from the old cluster to the new one using tools such as UNLOAD/COPY or AWS DMS. Option C (snapshot and restore) is also valid, but it is not the simplest because it requires creating a snapshot and then restoring it to a new encrypted cluster, which involves extra steps.

Therefore, option A is correct.

181
MCQmedium

A company is using DynamoDB with a VPC endpoint. They want to restrict access to only requests originating from their VPC. Which policy condition should be used?

A.'aws:SourceVpce': 'vpce-12345678'
B.'aws:VpcSourceIp': '10.0.0.0/16'
C.'s3:x-amz-server-side-encryption': 'AES256'
D.'aws:SourceVpc': 'vpc-12345678'
AnswerA

This condition ensures requests come only from the specified VPC endpoint.

Why this answer

The 'aws:SourceVpce' condition key allows you to restrict access to requests originating from a specific VPC endpoint (interface endpoint) in your VPC. This ensures that only traffic coming through that VPC endpoint can access the DynamoDB table, providing a network-level security boundary. The condition must reference the exact VPC endpoint ID (e.g., 'vpce-12345678') to enforce this restriction.

Exam trap

The trap here is that candidates often confuse 'aws:SourceVpc' (which restricts by VPC ID but is not supported for VPC endpoint policies) with 'aws:SourceVpce' (the correct key for endpoint-level restrictions), leading them to pick Option D instead of A.

How to eliminate wrong answers

Option B is wrong because 'aws:VpcSourceIp' is not a valid AWS condition key; the correct key for restricting by source IP is 'aws:SourceIp', but that would not restrict to VPC-originated traffic specifically. Option C is wrong because 's3:x-amz-server-side-encryption' is an S3-specific condition key for encryption headers, irrelevant to DynamoDB VPC endpoint access control. Option D is wrong because 'aws:SourceVpc' restricts based on the VPC ID, but it does not work for VPC endpoint policies; the correct key for VPC endpoint restrictions is 'aws:SourceVpce' (the endpoint ID), not the VPC ID.

182
MCQmedium

A company is using Amazon RDS for PostgreSQL with a read replica. The security team wants to ensure that data in transit between the primary DB instance and the read replica is encrypted. What should be done?

A.Set up a VPN connection between the primary and the replica.
B.Configure the read replica to use a different KMS key.
C.Enable SSL/TLS on the read replica and configure the primary to use it.
D.Enable encryption at rest on the primary DB instance using AWS KMS.
AnswerD

Encrypted replication is automatically enabled when the primary is encrypted.

Why this answer

Enabling encryption at rest on the primary DB instance using AWS KMS automatically encrypts the replication traffic between the primary and the read replica. Options A, B, and C are incorrect: A VPN is not required as RDS handles encryption in transit for replication when the primary is encrypted; using a different KMS key for the replica does not affect replication encryption; SSL/TLS is for client connections, not for replication traffic.

183
MCQeasy

A company wants to ensure that an Amazon RDS for MySQL database is automatically backed up daily and backups are encrypted. What should they do?

A.Take manual snapshots daily and enable encryption on the snapshot copy.
B.Use Amazon CloudWatch Events to trigger a Lambda function that exports the database to S3 with encryption.
C.Enable automated backups and encryption at rest on the RDS instance.
D.Configure AWS Backup to back up the RDS instance to an S3 bucket with default encryption.
AnswerC

Automated backups are encrypted if encryption at rest is enabled.

Why this answer

Automated backups with encryption at rest ensure that backups are automatically taken daily and encrypted. Option C is correct because it enables both features: automated backups and encryption at rest. Option A is incorrect because manual snapshots are not automatic; they require manual intervention and enabling encryption on the snapshot copy is an extra step.

Option B is incorrect because using CloudWatch Events and Lambda to export to S3 is not the standard automated backup mechanism for RDS; RDS automated backups are handled natively and do not require custom Lambda functions. Option D is incorrect because AWS Backup is not the default automated backup service for RDS; RDS has its own automated backup feature. Additionally, encryption for RDS backups is managed by AWS KMS, not S3 default encryption.

184
MCQmedium

A company has an Amazon RDS for PostgreSQL DB instance that needs to be accessed by an application running on an Amazon EC2 instance. Both resources are in the same VPC. The security team insists that all traffic between the application and the database be encrypted in transit. Which configuration ensures this?

A.Add a security group rule that allows traffic only from the EC2 instance's private IP.
B.Create an AWS Site-to-Site VPN connection between the EC2 instance and the RDS instance.
C.Enable SSL/TLS on the RDS instance and configure the application to connect using SSL.
D.Set up VPC peering between the EC2 instance's VPC and the RDS instance's VPC.
AnswerC

SSL/TLS encrypts the database connection.

Why this answer

Enabling SSL/TLS on the RDS for PostgreSQL DB instance and configuring the application to connect using SSL ensures encryption in transit. Option A is incorrect because security group rules control access (firewall), not encryption. Option B is incorrect because a Site-to-Site VPN is used for on-premises to VPC connectivity, not for same-VPC communication.

Option D is incorrect because VPC peering is for connecting separate VPCs, and both resources are already in the same VPC.

185
Multi-Selecteasy

A company is setting up an Amazon Aurora MySQL-compatible database. The security policy requires that all traffic between the application and database be encrypted in transit. Which TWO steps should be taken?

Select 2 answers
A.Use a Network Load Balancer with a TLS listener in front of the Aurora cluster.
B.Place the Aurora cluster in a private subnet with a VPN connection.
C.Set the 'require_secure_transport' parameter to 'ON' in the DB cluster parameter group.
D.Configure the application connection string to use the SSL-enabled endpoint (port 3306 with SSL).
E.Enable encryption at rest using AWS KMS.
AnswersC, D

This enforces SSL connections from clients.

Why this answer

To encrypt data in transit, you need to enforce SSL on the server side and ensure the client uses SSL. Setting the 'require_secure_transport' parameter to 'ON' in the DB cluster parameter group (Option C) forces the server to require SSL connections. Configuring the application connection string to use the SSL-enabled endpoint (Option D) ensures the client connects using SSL.

Option A is unnecessary because Aurora supports SSL natively without a load balancer. Option B does not encrypt traffic; a VPN only secures the network path but does not enforce encryption at the database layer. Option E encrypts data at rest, not in transit.

186
Multi-Selecthard

A company is deploying an Amazon DynamoDB table with server-side encryption using a customer-managed AWS KMS key. The security team requires that the key be automatically rotated every year and that access to the key be logged. Which THREE steps should be taken?

Select 3 answers
A.Enable automatic key rotation for the KMS key.
B.Use AWS CloudHSM to store the key and manage rotation.
C.Enable AWS CloudTrail to log KMS API calls.
D.Create a KMS key policy that allows only specific IAM roles to use the key.
E.Configure the DynamoDB table to use client-side encryption.
AnswersA, C, D

KMS supports automatic rotation yearly.

Why this answer

To meet the requirements: (1) Enable automatic key rotation (Option A) to satisfy the automatic rotation requirement. (2) Enable AWS CloudTrail to log KMS API calls (Option C) to log access to the key. (3) Create a KMS key policy that restricts usage to specific IAM roles (Option D) to control access. Option B is incorrect because AWS CloudHSM is a hardware security module, not used for KMS key rotation or logging. Option E is incorrect because client-side encryption is not relevant; server-side encryption with KMS is already used.

187
MCQhard

A company uses Amazon DynamoDB with fine-grained access control using IAM policies. A developer reports that an application role can read and write to the 'orders' table but cannot perform a Scan operation on a Global Secondary Index (GSI). The IAM policy attached to the role includes 'dynamodb:Scan' and the resource ARN for the table. What is the likely reason for this failure?

A.The policy has a condition that restricts Scan operations based on the time of day.
B.The role does not have permission to read from the base table.
C.The IAM policy does not include the GSI's ARN in the resource statement.
D.The IAM policy does not allow the 'dynamodb:Scan' action on the table.
AnswerC

This is correct because GSIs have separate ARNs in DynamoDB. The policy must explicitly include the GSI ARN to allow operations like Scan on that index.

Why this answer

DynamoDB Global Secondary Indexes (GSIs) have their own Amazon Resource Names (ARNs) separate from the base table. When using IAM policies with fine-grained access control, the policy must explicitly include the ARN of the GSI in the resource statement to allow operations like Scan on that GSI. Without the GSI ARN, the Scan operation on the GSI is denied by default, even if the policy allows 'dynamodb:Scan' on the base table.

Option A is incorrect because the policy does not mention time-of-day conditions. Option B is incorrect because the role can read from the base table, but the issue is with the GSI. Option D is incorrect because the action 'dynamodb:Scan' is allowed on the table but not on the GSI.

188
MCQmedium

A company uses Amazon RDS for MySQL with encryption at rest enabled. The security team mandates that all access to the database must be authenticated using IAM database authentication. The database administrator has created a user 'app_user' and granted appropriate privileges. However, when the application tries to connect using an IAM authentication token, it receives an 'Access denied' error. Which action should be taken to resolve this issue?

A.Create a password for 'app_user' and use that password in the connection string.
B.Modify the security group to allow inbound traffic on port 3306 from the application's IP address.
C.Ensure the IAM role used by the application has a name that matches the database user 'app_user' and has the necessary policy attached.
D.Download the latest Amazon RDS CA certificate and add it to the application trust store.
AnswerC

IAM database authentication requires the database user name to match the IAM user or role name (or a mapped DB user) that has been granted the rds_iam role.

Why this answer

IAM database authentication for RDS MySQL requires that the database user name matches the IAM role or user name used to generate the authentication token. The IAM role must have a policy that allows the `rds-db:connect` action with a resource ARN specifying the database user. Without this exact match, the authentication token is rejected, resulting in an 'Access denied' error.

Exam trap

The trap here is that candidates often confuse IAM database authentication with network-level security (security groups) or TLS certificate management, when the core requirement is the exact name match between the database user and the IAM principal (role or user) used to generate the token.

How to eliminate wrong answers

Option A is wrong because IAM database authentication does not use a static password; it relies on a temporary authentication token generated via the AWS CLI or SDK, and creating a password would bypass the mandated IAM authentication. Option B is wrong because the 'Access denied' error is an authentication failure, not a network connectivity issue; security group rules control network access, not IAM token validation. Option D is wrong because the CA certificate is used for TLS/SSL encryption of the connection, not for IAM authentication; the error is unrelated to certificate trust.

189
MCQeasy

A company wants to audit all SQL statements executed on their Amazon Aurora MySQL database for compliance. Which AWS feature should be enabled?

A.Database Activity Streams
B.VPC Flow Logs
C.Amazon CloudWatch Logs
D.AWS CloudTrail
AnswerA

Database Activity Streams provide a stream of database activities including SQL queries.

Why this answer

Database Activity Streams provide a stream of database activities including SQL queries. Option B is wrong because VPC Flow Logs capture network traffic, not SQL statements. Option C is wrong because CloudWatch Logs can store logs but the source should be Database Activity Streams; CloudWatch Logs alone does not audit SQL statements.

Option D is wrong because CloudTrail logs API calls, not SQL statements.

190
MCQhard

A company is migrating an on-premises Oracle database to Amazon RDS for Oracle. The security team requires that all network traffic between the application servers and the database be encrypted using TLS. The application servers are in a different VPC connected via VPC Peering. What is the simplest way to enforce encryption in transit?

A.Modify the security group for the RDS instance to only allow traffic on port 443.
B.Enable the rds.force_ssl parameter in the DB parameter group and configure the application to use SSL connections.
C.Use a default DB parameter group, as it already enforces SSL.
D.Set up a VPN connection between the two VPCs and route all traffic through it.
AnswerB

This enforces SSL at the database level, and the client can connect using SSL certificates.

Why this answer

Enabling the rds.force_ssl parameter in the DB parameter group forces all connections to use SSL, satisfying the encryption-in-transit requirement. The application must be configured to connect using SSL with the appropriate certificate. Option A is wrong because changing the security group to port 443 does not enforce encryption; port 443 is for HTTPS, not for Oracle database traffic, and SSL is configured at the database level.

Option C is wrong because the default parameter group does not enforce SSL; the rds.force_ssl parameter must be explicitly set. Option D is wrong because a VPN adds unnecessary complexity and does not directly enforce TLS encryption for database connections.

191
MCQmedium

A company uses Amazon Aurora MySQL-Compatible Edition and needs to audit all SQL statements executed by database users. Which feature should be enabled?

A.Enable the database engine audit logs (advanced auditing).
B.Enable AWS CloudTrail data events for the DB instance.
C.Enable database activity streams.
D.Enable RDS Enhanced Monitoring.
AnswerA

Aurora MySQL can log SQL statements using the audit plugin.

Why this answer

Aurora MySQL supports advanced auditing through database engine audit logs. Option B is wrong because CloudTrail logs API calls, not SQL queries. Option C is wrong because RDS Enhanced Monitoring provides OS metrics, not SQL audit.

Option D is wrong because database activity streams capture activity in near real-time but are designed for monitoring and not primarily for SQL audit logging; however, they can be used, but the most direct answer is advanced auditing.

192
MCQmedium

A company is running an Amazon RDS for MySQL DB instance in a VPC. The security team requires that all connections to the database use SSL/TLS. The DBA has enabled 'require_secure_transport' parameter in the DB parameter group. However, after applying the change and rebooting, some applications that were previously connecting successfully are now failing. What is the most likely cause?

A.The security group inbound rule for the database port is missing.
B.The option group does not have the SSL option enabled.
C.The application is not configured to connect using SSL/TLS.
D.The DB subnet group does not include the application's subnet.
AnswerC

Enabling require_secure_transport forces the server to accept only SSL connections. If the application does not use SSL, the connection will be rejected.

Why this answer

Enabling 'require_secure_transport' in the MySQL parameter group forces the server to accept only SSL/TLS connections. Applications that are not configured with SSL will be rejected, causing them to fail after this change. Option A is incorrect because the security group inbound rule missing would have prevented connections entirely, not just after this change.

Option B is incorrect because the SSL option in the option group is separate from the 'require_secure_transport' parameter; the parameter group controls this setting. Option D is incorrect because the DB subnet group determines network placement, not SSL enforcement.

193
MCQhard

A database administrator has the IAM policy shown above attached to their user. When they try to run the AWS CLI command `aws rds describe-db-instances --region us-west-2`, they receive an access denied error. Why does this fail?

A.The user must use multi-factor authentication (MFA) to perform the describe action.
B.The user does not have permission to describe DB instances in any region.
C.The policy includes a condition key that denies access when the region is not us-east-1.
D.The policy explicitly restricts the resource to a specific DB instance ARN in us-east-1, and the command specifies a different region.
AnswerD

The resource ARN includes region us-east-1, so it does not apply to us-west-2.

Why this answer

The IAM policy includes two Allow statements. The first statement grants rds:DescribeDBInstances only on a specific DB instance ARN in us-east-1. The second statement grants the same action on any resource (*).

Because IAM evaluates the effective permissions as the union of all statements, the user is only allowed to describe that specific instance in us-east-1; describing instances in any other region (such as us-west-2) is not explicitly allowed for that resource, so the request is denied. Option D is correct because it acknowledges that the resource ARN restriction from the first statement limits the allowed region. Option A is incorrect because there is no MFA condition in the policy.

Option B is incorrect because the user can describe the specific instance in us-east-1. Option C is incorrect because the policy restricts access via a resource ARN, not a condition key.

194
MCQmedium

A database administrator is troubleshooting why Amazon RDS Enhanced Monitoring is not displaying metrics for a DB instance. The IAM role attached to the instance has the policy shown in the exhibit. What is the likely cause?

A.The policy denies the 'rds:DescribeDBInstances' action.
B.The policy is missing the 'rds:CreateDBInstance' action.
C.The policy does not include 'monitoring:ListMetrics'.
D.The resource is set to '*' instead of the specific DB instance ARN.
AnswerA

Correct. Denying 'rds:DescribeDBInstances' would prevent Enhanced Monitoring from retrieving instance details necessary to publish metrics.

Why this answer

Amazon RDS Enhanced Monitoring requires the IAM role to have permission to describe the DB instance using 'rds:DescribeDBInstances'. This action is necessary for the monitoring service to retrieve information about the instance so it can collect and publish OS metrics. If the policy explicitly denies this action, Enhanced Monitoring will fail to display metrics.

Option C is incorrect because 'monitoring:ListMetrics' is not required; Enhanced Monitoring publishes to CloudWatch Logs, not CloudWatch Metrics, and the IAM role needs logs permissions (e.g., 'logs:PutLogEvents') rather than monitoring actions. Options B and D are also incorrect: 'rds:CreateDBInstance' is unrelated to monitoring, and using a resource of '*' is acceptable as long as the trust policy allows RDS to assume the role.

195
Multi-Selectmedium

A security engineer is designing access controls for an Amazon DynamoDB table containing customer data. Which TWO actions enforce least privilege access?

Select 2 answers
A.Use IAM conditions to restrict access to specific attributes.
B.Grant dynamodb:* action to all users.
C.Implement fine-grained access control using IAM policy conditions.
D.Use a resource-based policy on the DynamoDB table.
E.Attach a VPC endpoint policy that allows all actions.
AnswersA, C

Correct: IAM conditions can restrict access to specific DynamoDB attributes, enforcing least privilege.

Why this answer

Options A and C are correct. Using IAM conditions to restrict access to specific attributes (A) and implementing fine-grained access control using IAM policy conditions (C) both enforce least privilege by limiting the data and actions a user can access. Option B violates least privilege by granting all actions to all users.

Option D is incorrect because Amazon DynamoDB does not support resource-based policies; access is controlled via identity-based IAM policies. Option E is incorrect because a VPC endpoint policy allowing all actions does not restrict access.

196
MCQhard

A company is using Amazon RDS for PostgreSQL with automated backups. The security team requires that backups be encrypted at rest. The DB instance is currently unencrypted. What is the most efficient way to enable encryption for future backups?

A.Enable encryption by setting the 'backup_encryption' parameter in the DB parameter group.
B.Modify the DB instance to enable encryption.
C.Enable encryption on the S3 bucket where backups are stored.
D.Create a snapshot of the DB instance, copy the snapshot with encryption enabled, and restore the encrypted snapshot to a new DB instance.
AnswerD

This is the standard method to migrate an unencrypted RDS instance to an encrypted one.

Why this answer

The correct method to enable encryption for future backups on an existing unencrypted Amazon RDS for PostgreSQL instance is to create a snapshot of the DB instance, copy the snapshot with encryption enabled, and restore the encrypted snapshot to a new DB instance. Option A is incorrect because there is no 'backup_encryption' parameter in the DB parameter group. Option B is incorrect because modifying the DB instance does not allow enabling encryption on an unencrypted instance; encryption can only be enabled at creation time.

Option C is incorrect because enabling encryption on the S3 bucket does not encrypt the RDS backups themselves; the backups must be encrypted at the source.

197
MCQeasy

A company wants to encrypt data at rest for an existing Amazon RDS for Oracle DB instance. The database is currently unencrypted. What is the simplest way to enable encryption with minimal downtime?

A.Create an encrypted read replica and promote it to a standalone instance.
B.Modify the DB instance and enable encryption using the RDS console.
C.Create a snapshot of the DB instance, copy the snapshot with encryption enabled, and restore the encrypted snapshot to a new DB instance.
D.Enable encryption directly on the existing DB instance by modifying the DB instance settings.
AnswerC

Creating an unencrypted snapshot, copying it with encryption enabled, and restoring to a new DB instance satisfies the requirement for minimal downtime because the original RDS for Oracle instance remains fully available during the snapshot and copy operations; only a brief DNS cutover occurs when the application is redirected to the new encrypted instance. This avoids the constraint that RDS does not support enabling encryption in-place on an existing unencrypted DB instance.

Why this answer

You cannot directly enable encryption on an existing unencrypted Amazon RDS instance. The correct process is to create a snapshot of the DB instance, copy the snapshot with encryption enabled, and then restore the encrypted snapshot to a new DB instance. You then redirect traffic to the new instance.

Option A is incorrect because creating a read replica does not encrypt the master instance, and the replica can only be encrypted if the master is already encrypted. Option B is incorrect because you cannot modify an existing DB instance to enable encryption through the RDS console. Option D is incorrect because enabling encryption directly on the existing DB instance is not supported.

198
MCQeasy

A company wants to restrict access to an Amazon DynamoDB table so that only specific IAM users can read and write data. What is the BEST way to achieve this?

A.Use a resource-based policy on the DynamoDB table.
B.Create an IAM policy that grants access to the DynamoDB table and attach it to the specific IAM users.
C.Use DynamoDB Accelerator (DAX) with IAM authentication.
D.Create a VPC endpoint for DynamoDB and allow only traffic from that VPC.
AnswerB

IAM policies are the standard way to control access to DynamoDB.

Why this answer

Using an IAM policy attached to specific IAM users is the most precise method to restrict access to a DynamoDB table. Resource-based policies are not supported for DynamoDB (Option A is wrong). VPC endpoints control network traffic but do not restrict which users can access the table (Option D is wrong).

DynamoDB Accelerator (DAX) with IAM authentication handles caching and authentication, not table-level access control (Option C is wrong).

199
MCQhard

A company runs an e-commerce platform on AWS. The application uses an Amazon RDS for MySQL Multi-AZ database instance. The security team recently conducted an audit and found that the database is accessible from the internet because the public accessibility setting is enabled. The security team has disabled public accessibility and updated the security group to allow inbound traffic only from the application's security group. However, after these changes, the application can no longer connect to the database. The application is running on EC2 instances in the same VPC. The RDS instance is also in the same VPC. The security group for the RDS instance allows inbound MySQL traffic (port 3306) from the application's security group. The application's security group allows all outbound traffic. The application's EC2 instances have a public IP address and are in a public subnet. The RDS instance is in a private subnet. The VPC has an internet gateway attached. What is the most likely cause of the connection failure?

A.The RDS instance is in a private subnet and cannot receive inbound traffic from the public subnet EC2 instances without a VPC peering or VPN.
B.The security group for the RDS instance still allows traffic from the public IP addresses of the EC2 instances, but the EC2 instances now have different public IPs.
C.The application is using the RDS public DNS name, which no longer resolves after disabling public accessibility.
D.The EC2 instances need a NAT gateway to communicate with the RDS instance in the private subnet.
AnswerB

Correct. The security group still allows inbound from the public IPs of the EC2 instances, but those IPs may have changed (e.g., after an instance restart). The connection fails because the old public IPs are no longer assigned to the EC2 instances.

Why this answer

The most likely cause is that the security group for the RDS instance still contains a rule allowing inbound traffic from the public IP addresses of the EC2 instances. After disabling public accessibility, the EC2 instances in the public subnet may receive new public IPs if they are stopped and started, or the original rule may have referenced specific public IPs that are no longer valid. The application's connection attempts using the old public IPs fail.

Although the security group was updated to allow traffic from the application's security group, the old rule might not have been removed, or the application was not using the security group reference. Since the EC2 instances are in the same VPC, the private IP communication should work with the security group reference, but if the old rule is still present and the public IPs changed, the connection might fail. Options A and D are incorrect because same-VPC communication does not require VPC peering or a NAT gateway.

Option C is incorrect because the public DNS name resolves to the private IP within the VPC even after public accessibility is disabled, so it should work.

200
MCQmedium

A company is using Amazon Redshift for data warehousing. The security team requires that all data is encrypted at rest using a hardware security module (HSM). Additionally, the team wants to ensure that only specific IAM roles can access the database. Which configuration will meet these requirements?

A.Create the Redshift cluster with encryption enabled using a KMS key, and configure the cluster to use an HSM for key storage.
B.Create the Redshift cluster with encryption enabled using an HSM, and attach an IAM role to the cluster to control access.
C.Create the Redshift cluster without encryption, then use the AWS CLI to enable encryption using a KMS key.
D.Create the Redshift cluster with encryption using a KMS key, and then import the HSM certificate into the cluster.
AnswerB

HSM provides hardware-based encryption and IAM roles can be used for access control.

Why this answer

Redshift supports HSM for encryption at rest, and IAM roles can be attached to the cluster for access control. Option A is wrong because HSM and KMS are mutually exclusive. Option C is wrong because KMS does not meet the HSM requirement.

Option D is wrong because encryption cannot be enabled after cluster creation.

201
Multi-Selecteasy

Which TWO AWS services can be used to centrally manage database credentials and automate rotation for Amazon RDS? (Choose two.)

Select 2 answers
A.AWS Secrets Manager
B.AWS Key Management Service (KMS)
C.IAM database authentication
D.AWS Systems Manager Parameter Store
E.AWS CloudHSM
AnswersA, D

AWS Secrets Manager can store and automatically rotate RDS credentials.

Why this answer

Options A and D are correct. AWS Secrets Manager provides native automated rotation for RDS credentials, while AWS Systems Manager Parameter Store (SecureString) can centrally store encrypted credentials and support automated rotation when combined with a custom AWS Lambda function. Both services allow centralized management of database credentials, and with additional configuration, both can automate rotation.

Option B (AWS KMS) is incorrect because KMS manages encryption keys, not secrets. Option C (IAM database authentication) is incorrect because it eliminates the need for stored credentials but does not centrally manage or rotate them. Option E (AWS CloudHSM) is incorrect because it provides hardware security modules for key storage, not secret management.

Exam trap

A common trap is assuming only AWS Secrets Manager can support automated rotation. However, AWS Systems Manager Parameter Store can also achieve rotation through custom automation (e.g., Lambda), making it a valid answer for this question.

202
MCQmedium

A company needs to audit access to an Amazon DynamoDB table. The audit should capture which IAM user or role performed each action. Which AWS service should be used?

A.VPC Flow Logs
B.AWS CloudTrail
C.Amazon GuardDuty
D.AWS Config
AnswerB

CloudTrail logs all API calls and identifies the principal making the call.

Why this answer

AWS CloudTrail is the correct service because it records API calls made to DynamoDB and captures the IAM user or role that performed each action. VPC Flow Logs (Option A) capture network traffic metadata, not API calls. Amazon GuardDuty (Option C) is a threat detection service that monitors for malicious activity, not API auditing.

AWS Config (Option D) tracks resource configuration changes, not API call details.

203
MCQhard

A company is migrating an on-premises Oracle database to Amazon RDS for Oracle. The security team requires that all connections to the database use Oracle Native Network Encryption (NNE). How should this be configured?

A.Enable IAM database authentication.
B.Modify the sqlnet.ora file on the RDS instance to require encryption.
C.Create a custom DB parameter group with the encryption parameters set to REQUIRED.
D.Enable encryption at rest using Oracle TDE.
AnswerC

Correct. A custom DB parameter group allows setting the SQLNET.ENCRYPTION_SERVER and SQLNET.ENCRYPTION_TYPES parameters to enforce NNE for all connections.

Why this answer

RDS for Oracle supports Oracle Native Network Encryption (NNE) through custom DB parameter groups. You must set the SQLNET.ENCRYPTION_SERVER parameter to REQUIRED and optionally specify encryption types. Option A (IAM database authentication) does not encrypt the network connection.

Option B is incorrect because RDS does not allow direct editing of sqlnet.ora files; parameter groups are the correct method. Option D (encryption at rest) protects stored data, not data in transit.

204
MCQhard

Refer to the exhibit. A security engineer has applied this key policy to a customer managed KMS key used to encrypt a Secrets Manager secret containing database credentials. An application running on an Amazon EC2 instance in the same account and region is unable to decrypt the secret. What is the MOST likely cause?

A.The condition kms:ViaService restricts the decryption to requests made via Secrets Manager, but the application is calling KMS directly.
B.The KMS key ARN in the resource field is incorrect.
C.The policy is missing an encryption context that matches the secret's encryption context.
D.The policy only allows Decrypt, but the application needs Encrypt permission.
AnswerA

The `kms:ViaService` condition restricts the `Decrypt` permission to only requests that originate from Secrets Manager. Since the application calls KMS directly, the condition is not satisfied, causing denial.

Why this answer

The condition `kms:ViaService` in the key policy restricts the `Decrypt` permission to requests that originate specifically from the AWS Secrets Manager service. When the application on the EC2 instance calls KMS directly (e.g., via the `Decrypt` API) to decrypt the secret, the request does not come through Secrets Manager, so the condition is not satisfied and the request is denied. This is the most likely cause of the decryption failure.

Exam trap

The trap here is that candidates often overlook the `kms:ViaService` condition and assume the policy is correct, focusing instead on encryption contexts or permissions, when the real issue is that the condition restricts the source of the request to a specific AWS service.

How to eliminate wrong answers

Option B is wrong because the KMS key ARN in the `Resource` field is used to identify the key itself, and if it were incorrect, the policy would not apply to the key at all, but the issue is a conditional denial, not a misidentification. Option C is wrong because encryption contexts are used in cryptographic operations (e.g., `kms:EncryptionContext:context_name`) and are not required in the key policy unless explicitly enforced via a condition; the policy shown does not include an encryption context condition, so missing one would not cause a denial. Option D is wrong because the application is trying to decrypt the secret, not encrypt it; the `Decrypt` permission is exactly what is needed, and the error is due to the `kms:ViaService` condition, not a missing `Encrypt` permission.

205
MCQeasy

A company is migrating an on-premises Oracle database to Amazon RDS for Oracle. The security team requires that all connections to the database use SSL/TLS encryption. Which step is necessary to enforce SSL connections?

A.Configure the security group to only allow traffic on port 443.
B.Modify the DB subnet group to use a private subnet.
C.Add the SSL option to the option group.
D.Set the 'rds.force_ssl' parameter to 1 in the DB parameter group.
AnswerD

This parameter forces SSL connections to the Oracle database.

Why this answer

To enforce SSL/TLS connections to an Amazon RDS for Oracle instance, you must set the 'rds.force_ssl' parameter to 1 in the DB parameter group. This requires all connections to use SSL. Option A is incorrect because security groups control network-level access, not encryption.

Option B is incorrect because the DB subnet group defines the subnets for the instance, not encryption. Option C is incorrect because the option group is used to enable additional features like Oracle Enterprise Manager or timezone, not SSL enforcement. Therefore, Option D is the correct step.

206
Multi-Selectmedium

Which TWO of the following are valid ways to encrypt data at rest in Amazon DynamoDB? (Select TWO.)

Select 2 answers
A.Use AWS owned CMK for server-side encryption.
B.Enable Transparent Data Encryption (TDE).
C.Enable EBS encryption on the underlying storage.
D.Implement client-side encryption before sending data to DynamoDB.
E.Use a customer managed CMK from AWS KMS.
AnswersA, E

DynamoDB encrypts at rest by default using AWS owned keys.

Why this answer

Options A and E are correct. DynamoDB offers server-side encryption at rest using AWS owned CMK (A) or customer managed CMK from AWS KMS (E). Option B is incorrect because Transparent Data Encryption (TDE) is not supported by DynamoDB—it is used for relational databases.

Option C is incorrect because DynamoDB is serverless and does not provision EBS volumes; its encryption is handled internally. Option D is incorrect because client-side encryption is applied before data is sent to DynamoDB, not encryption at rest of the DynamoDB service itself.

207
MCQeasy

A company needs to encrypt an existing unencrypted Amazon RDS for Oracle DB instance. Which set of steps should be followed?

A.Enable encryption using the AWS Management Console by selecting the instance and choosing 'Enable Encryption'.
B.Modify the DB instance and set the KMS key ID to enable encryption.
C.Copy the snapshot to an encrypted snapshot and then restore.
D.Take a snapshot of the instance, copy the snapshot with encryption enabled, and restore from the encrypted snapshot.
AnswerD

This is the standard method.

Why this answer

The correct procedure. To encrypt an existing unencrypted RDS DB instance, you must create a manual snapshot of the instance, then copy that snapshot with encryption enabled (specifying a KMS key), and finally restore a new DB instance from the encrypted snapshot. Option A is wrong because the console does not provide a direct 'Enable Encryption' action on an existing instance.

Option B is wrong because you cannot modify an existing unencrypted instance to enable encryption directly; there is no such modification parameter. Option C is wrong because while it mentions copying the snapshot to an encrypted one, it does not clarify that encryption is applied during the copy operation, and the correct process explicitly requires taking the initial snapshot, copying with encryption, and then restoring; Option D includes all three steps.

208
Multi-Selecteasy

A company is deploying a new Amazon RDS for MySQL database in a VPC. The database must be accessible only from an application server running in the same VPC. The security team also wants to ensure that the database is not accessible from the internet. Which TWO configurations are required? (Choose TWO.)

Select 2 answers
A.Place the DB instance in a public subnet.
B.Modify the DB parameter group to restrict network access.
C.Configure the security group to allow inbound traffic only from the application server's security group.
D.Set the DB instance to be not publicly accessible.
E.Configure a network ACL to deny inbound traffic from 0.0.0.0/0.
AnswersC, D

This restricts access to the specific application server.

Why this answer

To meet the requirements, two configurations are needed. First, the DB instance must be set to not publicly accessible (Option D) to ensure it cannot be reached from the internet. Second, the security group associated with the DB instance must allow inbound traffic only from the application server's security group (Option C), which restricts access to resources within the VPC.

Option A is incorrect because placing the DB instance in a public subnet would expose it to the internet. Option B is incorrect because the DB parameter group controls database engine settings, not network access. Option E is incorrect because network ACLs are stateless and a rule denying all inbound traffic would block legitimate traffic as well; security groups are the appropriate mechanism for this scenario.

209
MCQhard

A financial services company uses Amazon DynamoDB to store transaction data. The table is encrypted with an AWS managed KMS key. The compliance team requires that the encryption key be rotated every 90 days. The current key was created 6 months ago and has not been rotated. The company also needs to ensure that all access to the table is logged for audit purposes. The security engineer proposes to enable DynamoDB Streams and AWS CloudTrail. However, the compliance team notes that CloudTrail only logs management plane events (e.g., CreateTable) and not data plane events (e.g., GetItem, PutItem). What should the engineer do to meet both requirements?

A.Use AWS CloudTrail data events to capture DynamoDB data plane operations and store the logs in S3.
B.Switch to an AWS managed KMS key and enable automatic rotation.
C.Enable DynamoDB Streams and stream write events to CloudWatch Logs for auditing.
D.Create a customer managed KMS key, enable automatic key rotation, and configure CloudTrail to log data events for the DynamoDB table.
AnswerD

Customer managed keys support rotation; CloudTrail data events log data plane operations.

Why this answer

To meet both requirements, the engineer should create a customer managed KMS key, enable automatic key rotation (which rotates the key annually, but for 90-day rotation, the engineer can create a new key every 90 days and update the table), and configure CloudTrail to log data events for the DynamoDB table. CloudTrail data events capture data plane operations like GetItem and PutItem, which addresses the logging requirement. Option A is incorrect because AWS managed keys do not support automatic rotation; also, CloudTrail data events are not tied to key type.

Option B is incorrect because switching to a customer managed key alone does not enable data event logging. Option C is incorrect because DynamoDB Streams are used for change data capture and streaming to other services, not for audit logging of data plane operations; CloudWatch Logs from Streams do not capture all API calls.

210
MCQhard

A company is migrating an on-premises Oracle database to Amazon RDS for Oracle. The database contains sensitive data that must be encrypted at rest using a customer-managed KMS key. The company also needs to ensure that the database is automatically patched by AWS. Which DB instance configuration should be used?

A.Single-AZ, encryption at rest enabled with a customer-managed KMS key, auto minor version upgrade disabled.
B.Multi-AZ, encryption at rest enabled with a customer-managed KMS key, auto minor version upgrade enabled.
C.Single-AZ, encryption at rest enabled with a customer-managed KMS key, auto minor version upgrade enabled.
D.Multi-AZ, encryption at rest enabled with an AWS-managed KMS key, auto minor version upgrade enabled.
AnswerB, C

Correct because it enables encryption at rest with a customer-managed KMS key and enables auto minor version upgrade. Multi-AZ provides high availability but is not required.

Why this answer

The requirements are encryption at rest with a customer-managed KMS key and automatic patching via auto minor version upgrade. Both B (Multi-AZ) and C (Single-AZ) meet these requirements. A fails because auto minor version upgrade is disabled.

D fails because it uses an AWS-managed KMS key, not a customer-managed key. High availability is not a requirement in the stem, so both B and C are correct.

211
MCQhard

A database administrator runs the AWS CLI command shown in the exhibit. The administrator wants to enable encryption at rest for the RDS instance. What should the administrator do?

A.Modify the DB instance and set StorageEncrypted to true.
B.Create a new KMS key and associate it with the DB instance.
C.Create a new DB parameter group with encryption enabled.
D.Take a snapshot of the DB instance, copy the snapshot with encryption enabled, and restore a new instance.
AnswerD

Correct. You must take a snapshot, copy it with encryption enabled, and restore a new instance.

Why this answer

To enable encryption on an unencrypted RDS instance, you must take a snapshot, copy the snapshot with encryption enabled, and restore a new encrypted instance. You cannot enable encryption on an existing instance (Option A is incorrect). Creating a new KMS key does not enable encryption on the existing instance (Option B is incorrect).

Encryption is not controlled by a DB parameter group (Option C is incorrect). Only D is correct.

212
Multi-Selectmedium

Which TWO actions should be taken to protect sensitive data in an Amazon RDS for Oracle DB instance? (Choose two.)

Select 2 answers
A.Store database credentials in the application configuration file.
B.Disable automated backups to reduce storage costs.
C.Use Oracle Transparent Data Encryption (TDE) for sensitive columns.
D.Assign a public IP address to the DB instance for easier access.
E.Enable encryption at rest using AWS KMS.
AnswersC, E

TDE provides column-level encryption.

Why this answer

The correct answers are C and E. Option C, using Oracle Transparent Data Encryption (TDE), encrypts sensitive data at the column level within the database. Option E, enabling encryption at rest using AWS KMS, protects data stored on disk.

Option A is incorrect because storing credentials in application configuration files is insecure. Option B is incorrect because disabling automated backups does not enhance security. Option D is incorrect because assigning a public IP increases exposure to attacks.

213
Multi-Selecthard

Which THREE methods can be used to authenticate users to an Amazon RDS for MySQL DB instance? (Choose three.)

Select 3 answers
A.AWS Managed Microsoft AD authentication.
B.MySQL native password authentication.
C.AWS Lambda function authentication.
D.Kerberos authentication.
E.IAM database authentication.
AnswersB, D, E

Standard MySQL authentication.

Why this answer

Options B, D, and E are correct. MySQL native password authentication (B) is the standard method. Kerberos authentication (D) is supported for RDS for MySQL.

IAM database authentication (E) allows IAM users and roles to authenticate to the DB instance using an authentication token. Option A is incorrect because AWS Managed Microsoft AD authentication is not supported for RDS for MySQL; it is supported for RDS for SQL Server and Oracle. Option C is incorrect because Lambda is not an authentication method; it is a compute service that cannot directly authenticate users to a database.

214
MCQhard

A company uses Amazon DynamoDB with AWS KMS-managed encryption at rest. The security team requires that all access to a particular DynamoDB table be logged for audit purposes. Which solution meets this requirement?

A.Enable VPC Flow Logs for the VPC where the DynamoDB endpoint is accessed.
B.Enable AWS Config rules for DynamoDB.
C.Enable CloudTrail data events for the DynamoDB table.
D.Enable Amazon GuardDuty with DynamoDB protection.
AnswerC

CloudTrail data events log DynamoDB data plane operations.

Why this answer

AWS CloudTrail logs all DynamoDB API calls, including data plane operations, when data events are enabled. Option A is wrong because VPC Flow Logs capture network traffic, not API calls. Option B is wrong because AWS Config records resource configuration changes, not API calls.

Option D is wrong because Amazon GuardDuty is a threat detection service, not a logging service.

215
MCQmedium

A company stores sensitive data in an Amazon RDS for PostgreSQL DB instance. The security team requires that all data at rest be encrypted. The instance is currently unencrypted. What is the simplest way to enable encryption with minimal downtime?

A.Create a snapshot of the DB instance, copy the snapshot with encryption enabled, and restore the snapshot to a new encrypted DB instance.
B.Use the AWS CLI to modify the DB instance and enable encryption.
C.Migrate the data to an Amazon RDS for PostgreSQL DB instance using RDS Custom.
D.Modify the DB instance and enable encryption in the console.
AnswerA

This is the standard procedure to enable encryption with minimal downtime.

Why this answer

An existing unencrypted Amazon RDS instance cannot be directly encrypted. The standard approach to enable encryption with minimal downtime is to create a snapshot of the DB instance, copy the snapshot with encryption enabled, and restore the snapshot to a new encrypted DB instance. This process typically involves a brief outage during the restore but is simpler than other methods.

Option B is incorrect because the AWS CLI does not support enabling encryption on an existing instance. Option C is incorrect because migrating to RDS Custom adds unnecessary complexity and does not directly enable encryption on the current instance. Option D is incorrect because the AWS Management Console also does not allow enabling encryption on an existing instance.

216
MCQmedium

An IAM policy is attached to a role used by an RDS instance. The RDS instance is in VPC with a VPC endpoint to KMS. What is the effect of this policy?

A.Allows all KMS actions on the key only when the request comes from RDS.
B.Allows all KMS actions on the specified key from any source.
C.Allows the specified KMS actions on all KMS keys in the account.
D.Allows only the specified KMS actions on the key when the request originates from the RDS service via the specific VPC endpoint.
AnswerD

The policy has conditions limiting to RDS and VPC endpoint.

Why this answer

An IAM policy attached to a role used by an RDS instance, combined with a VPC endpoint to KMS, restricts the allowed KMS actions to only those specified and requires that the request originate from the RDS service via that specific VPC endpoint. Option A is incorrect because it suggests all KMS actions are allowed, which is not the case; only specified actions are allowed. Option B is incorrect because it mistakenly implies the policy allows actions from any source, ignoring the VPC endpoint restriction.

Option C is incorrect because it states the policy applies to all KMS keys, whereas it is typically scoped to a specific key.

217
MCQhard

A company has an Amazon RDS for Oracle DB instance that needs to be encrypted at rest. The instance currently uses Oracle Transparent Data Encryption (TDE) with a key stored in the database. The company wants to use AWS KMS for key management. What is the correct migration path?

A.Take a snapshot of the DB instance, copy the snapshot with KMS encryption, and restore from the encrypted snapshot.
B.Enable KMS encryption directly on the existing DB instance using the AWS CLI.
C.Create a read replica with KMS encryption.
D.Modify the DB instance and select the KMS key.
AnswerA

To change the encryption key from Oracle TDE to AWS KMS, you must take a snapshot of the DB instance, copy the snapshot with KMS encryption, and restore from the encrypted snapshot. This process enables encryption at rest with KMS.

Why this answer

To change the encryption key from Oracle TDE to AWS KMS, you must take a snapshot of the DB instance, copy the snapshot with KMS encryption, and restore from the encrypted snapshot. This process enables encryption at rest with KMS. Option B is incorrect because you cannot directly enable KMS encryption on an existing TDE instance; this is not supported.

Option C is incorrect because creating a read replica does not allow changing the encryption key; read replicas inherit the source instance's encryption. Option D is incorrect because you cannot modify the encryption key in place on an existing instance.

218
MCQeasy

A developer is troubleshooting an issue where an IAM user cannot perform a 'DescribeTable' action on a DynamoDB table. The IAM policy attached to the user is: {"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":["dynamodb:GetItem","dynamodb:PutItem"],"Resource":"*"}]}. What is the most likely reason for the failure?

A.The policy uses lowercase 'dynamodb' but the action is case-sensitive.
B.There is an implicit Deny for DescribeTable due to a service control policy.
C.The policy does not include the 'dynamodb:DescribeTable' action.
D.The resource specified in the policy is '*' which does not include the table.
AnswerC

The policy only allows GetItem and PutItem.

Why this answer

The IAM policy only includes the actions 'dynamodb:GetItem' and 'dynamodb:PutItem', but does not include 'dynamodb:DescribeTable'. Therefore, the IAM user is denied the DescribeTable action by default. Option A is incorrect because although action names are case-sensitive, the policy uses the correct lowercase 'dynamodb' and the actions are properly cased.

Option B is incorrect because there is no implicit Deny; the policy grants access to GetItem and PutItem, and DescribeTable is simply not allowed. Service control policies could apply, but they are not the most likely reason given the policy's explicit lack of the required action. Option D is incorrect because the resource '*' does include all tables; the problem is the missing action, not the resource specification.

219
MCQeasy

A company has an Amazon Redshift cluster that contains sensitive data. The security team wants to ensure that all data is encrypted at rest and that the encryption keys are managed by AWS. Which configuration should be used?

A.Use AWS CloudHSM to generate and store encryption keys.
B.Use server-side encryption with S3-managed keys (SSE-S3) for the Redshift cluster.
C.Enable encryption at rest using the default AWS-managed KMS key for Redshift.
D.Use client-side encryption with the AWS Encryption SDK.
AnswerC

This encryption is managed by AWS and uses KMS.

Why this answer

Amazon Redshift supports encryption at rest using AWS KMS. When you enable encryption, you can choose to use the default AWS-managed key (aws/redshift) or a customer-managed key. The default key is managed by AWS, meeting the requirement that keys are managed by AWS.

Option A is incorrect because CloudHSM is used for customer-managed keys, not AWS-managed keys. Option B is incorrect because SSE-S3 is for S3 objects, not Redshift clusters. Option D is incorrect because client-side encryption is not supported for Redshift at rest.

220
Multi-Selecteasy

Which TWO of the following are methods to encrypt data at rest for an Amazon RDS for Oracle DB instance? (Select TWO.)

Select 2 answers
A.Enable encryption at rest using AWS KMS when creating the DB instance.
B.Use Oracle Transparent Data Encryption (TDE) with the Oracle wallet.
C.Enable SSL/TLS for the DB instance.
D.Configure Amazon S3 server-side encryption on the DB instance's storage.
E.Use client-side encryption in the application before sending data to RDS.
AnswersA, B

RDS can be launched with KMS encryption.

Why this answer

Options A and B are correct. Amazon RDS for Oracle supports encryption at rest via two methods: enabling encryption using AWS KMS when creating the DB instance (Option A) or using Oracle Transparent Data Encryption (TDE) with a customer-managed Oracle wallet (Option B). Option C (SSL/TLS) encrypts data in transit, not at rest.

Option D (S3 SSE) is irrelevant as S3 is not used for RDS storage. Option E (client-side encryption) is an application-level approach and not a native RDS encryption method.

221
MCQhard

A company is using an Amazon RDS for MySQL database and needs to audit all database login events. The audit logs must be stored in Amazon S3 for long-term retention. Which steps should be taken to accomplish this?

A.Enable the 'general_log' parameter and set 'log_output' to 'FILE', then copy the log file to S3 manually.
B.Enable CloudTrail data events for RDS to capture login events and store in S3.
C.Enable the 'audit_log' plugin and configure RDS to publish logs to an S3 bucket.
D.Enable the 'audit_log' plugin, publish logs to CloudWatch Logs, and create an export task to S3.
AnswerD

This is the standard method to get audit logs into S3.

Why this answer

Amazon RDS for MySQL supports the audit_log plugin, which captures login events. These logs can be published to CloudWatch Logs, and then an export task can be created to move them to Amazon S3 for long-term retention. Option A is incorrect because RDS does not allow direct log file copying to S3 via manual methods.

Option B is incorrect because CloudTrail data events for RDS capture API calls, not database-level login events. Option C is incorrect because RDS does not natively publish audit logs directly to an S3 bucket; they must go through CloudWatch Logs first.

222
Multi-Selecteasy

A company uses Amazon DynamoDB and wants to audit access to a table. Which TWO services can be used together to log and monitor data plane operations? (Choose TWO.)

Select 2 answers
A.Amazon CloudWatch Logs
B.S3 access logs
C.AWS CloudTrail
D.VPC Flow Logs
E.AWS Config
AnswersA, C

CloudWatch Logs can store and monitor CloudTrail logs.

Why this answer

AWS CloudTrail (option C) can be configured to log data plane operations for DynamoDB, such as GetItem, PutItem, or Query. Amazon CloudWatch Logs (option A) can then be used to store, monitor, and alarm on these logs. Together they provide auditing of data plane access.

Options B, D, and E are incorrect: S3 access logs only apply to S3, VPC Flow Logs capture network traffic, and AWS Config records configuration changes, not data operations.

223
MCQeasy

A developer wants to grant an IAM user read-only access to an Amazon DynamoDB table named 'Orders' in the 'us-east-1' region. Which IAM policy should be attached to the user?

A.{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":["dynamodb:GetItem","dynamodb:Query","dynamodb:Scan"],"Resource":"arn:aws:dynamodb:us-east-1:123456789012:table/Orders"}]}
B.{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":["dynamodb:*"],"Resource":"arn:aws:dynamodb:us-east-1:123456789012:table/Orders"}]}
C.{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":["dynamodb:GetItem","dynamodb:PutItem","dynamodb:UpdateItem"],"Resource":"arn:aws:dynamodb:us-east-1:123456789012:table/Orders"}]}
D.{"Version":"2012-10-17","Statement":[{"Effect":"Deny","Action":["dynamodb:PutItem","dynamodb:UpdateItem","dynamodb:DeleteItem"],"Resource":"arn:aws:dynamodb:us-east-1:123456789012:table/Orders"}]}
AnswerA

This allows read-only actions on the table.

Why this answer

It grants only the read-only actions GetItem, Query, and Scan on the specified DynamoDB table. Option B is incorrect because it grants full DynamoDB access (dynamodb:*) to the table, allowing write and delete operations. Option C is incorrect because it includes PutItem and UpdateItem, which are write operations.

Option D is incorrect because it uses a Deny effect for write operations, but an explicit deny is not necessary and could conflict with other policies; additionally, it does not explicitly allow read actions, so the user would have no access.

224
MCQeasy

A company has an Amazon RDS for MySQL database that contains sensitive data. The security team requires that all data be encrypted at rest using a customer-managed key stored in AWS KMS. Which action should be taken to meet this requirement?

A.Enable encryption on the existing RDS instance by modifying the instance.
B.Create a new RDS instance with encryption enabled using the KMS key, migrate data, and delete the old instance.
C.Configure the DB parameter group to require encryption at rest.
D.Create a snapshot of the unencrypted database and restore it as an encrypted database.
AnswerB

This is the only way to achieve encryption at rest with a customer-managed KMS key for an existing database.

Why this answer

Amazon RDS encryption at rest with a customer-managed KMS key can only be enabled when the DB instance is created. You cannot enable encryption on an existing unencrypted instance (option A is incorrect). Once you create a new encrypted instance using the desired KMS key, you can migrate the data from the old instance and then delete it.

Option D is incorrect because restoring a snapshot of an unencrypted database without modifying encryption settings will result in an unencrypted instance; you would need to create an encrypted copy of the snapshot first, which is not described. Option C is incorrect because DB parameter groups do not control encryption at rest.

225
MCQhard

A company has an Amazon Redshift cluster that stores sensitive financial data. The security team requires that all data be encrypted at rest and that the encryption keys be rotated annually. Which solution meets these requirements?

A.Use AWS KMS with automatic key rotation to encrypt the Redshift cluster.
B.Create the cluster with AWS CloudHSM-backed encryption and rotate the key annually.
C.Enable encryption on the existing cluster by modifying the cluster settings.
D.Create a new encrypted cluster with a KMS key and configure automatic key rotation.
AnswerD

Correct. You create a new encrypted cluster using a KMS key with automatic key rotation. This ensures encryption at rest and automatic annual rotation.

Why this answer

The security requirements are to have encryption at rest and automatic annual key rotation. Amazon Redshift clusters can only be encrypted at creation time; you cannot enable encryption on an existing unencrypted cluster. Therefore, the only way to meet the requirements is to create a new encrypted cluster using a KMS key with automatic rotation enabled. The existing cluster must be replaced by restoring from an encrypted snapshot or by creating a new cluster and migrating data. Option D precisely describes this solution: 'Create a new encrypted cluster with a KMS key and configure automatic key rotation.' Automatic rotation can be enabled on the KMS key, and Redshift will use the new key material automatically for re-encryption.

Option A is ambiguous: 'Use AWS KMS with automatic key rotation to encrypt the Redshift cluster' – this could be interpreted as enabling encryption on an existing cluster, which is not possible. Option D clearly states the correct procedure. Hence D is the best answer.

Option B is wrong because CloudHSM-backed encryption does not support automatic key rotation; rotation must be done manually.

Option C is wrong because encryption cannot be enabled on an existing cluster; a new encrypted cluster must be created.

← PreviousPage 3 of 5 · 310 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Db Security questions.