Courseiva

CCNA Database Security Questions

75 of 310 questions · Page 1/5 · Database Security · Answers revealed

1
MCQeasy

A developer needs to allow an application running on an EC2 instance to connect to an Amazon RDS for MySQL DB instance securely. Which combination of steps should the developer take?

A.Store the database password in the application code.
B.Open the RDS security group to allow traffic from 0.0.0.0/0.
C.Store the credentials in an S3 bucket and download them at runtime.
D.Attach an IAM role to the EC2 instance with permissions to use RDS IAM authentication, and configure the database to use an authentication token.
AnswerD

Correct. Attaching an IAM role to the EC2 instance with permissions to use RDS IAM authentication and configuring the database to use an authentication token provides a secure, passwordless authentication method using temporary credentials.

Why this answer

The most secure method to allow an EC2 instance to connect to an RDS for MySQL DB instance is to use IAM roles for EC2 combined with IAM database authentication. By attaching an IAM role to the EC2 instance that has permissions to generate RDS authentication tokens, and configuring the DB instance to accept authentication tokens instead of passwords, the application can obtain temporary credentials without hardcoding or storing any secrets. Option A is insecure because storing credentials in application code exposes them to anyone with access to the code.

Option B is insecure because opening the security group to all traffic (0.0.0.0/0) exposes the database to the internet. Option C is insecure because storing credentials in S3 and downloading them at runtime still involves storing static credentials and adds potential risk from S3 access misconfiguration.

2
MCQhard

A company uses Amazon DynamoDB for its critical application. The security team requires that all access to DynamoDB tables be logged and monitored for suspicious activity. The company also needs to be alerted when a user deletes a table. Which combination of AWS services should be used?

A.AWS CloudTrail and Amazon DynamoDB Streams.
B.AWS Config and Amazon Simple Notification Service (SNS).
C.AWS CloudTrail and Amazon CloudWatch Events.
D.Amazon VPC Flow Logs and Amazon CloudWatch Logs.
AnswerC

CloudTrail logs API calls, and CloudWatch Events can create rules to match DeleteTable events and trigger alerts.

Why this answer

AWS CloudTrail logs all DynamoDB API calls, including DeleteTable, and can send events to Amazon CloudWatch Events, which can trigger alerts via SNS or Lambda. Option A is incorrect because DynamoDB Streams captures item-level changes, not API calls. Option B is incorrect because AWS Config records resource configuration changes but not API calls directly for alerting; CloudTrail is needed.

Option D is incorrect because VPC Flow Logs capture network traffic, not API calls.

3
Multi-Selecthard

A company uses Amazon DynamoDB to store session data for a web application. The security team discovers that an IAM user has been performing unauthorized scans on the table. They need to implement controls to detect and prevent such unauthorized access in the future. Which THREE actions should the security team take? (Choose THREE.)

Select 3 answers
A.Enable AWS CloudTrail logging and create a metric filter for Scan API calls.
B.Use fine-grained access control with IAM conditions to restrict access to specific items or attributes.
C.Disable the Scan operation on the DynamoDB table.
D.Create an IAM policy that denies the 'Scan' action for unauthorized users using a condition key.
E.Enable VPC Flow Logs to monitor traffic to DynamoDB.
AnswersA, B, D

CloudTrail logs API calls, and metric filters can trigger alarms on unauthorized scans.

Why this answer

Options A, B, and D are correct. Option A: Enabling CloudTrail logging and creating a metric filter for Scan API calls allows the security team to detect unauthorized scan attempts in real time and trigger alerts. Option B: Using fine-grained access control with IAM conditions (e.g., 'dynamodb:LeadingKeys' or 'dynamodb:Attributes') restricts access to specific items or attributes, preventing unauthorized scans from retrieving sensitive data.

Option D: Creating an IAM policy that denies the 'Scan' action for unauthorized users using a condition key (e.g., 'aws:SourceIp' or custom tag) provides a preventive control to block unauthorized scans at the API level. Option C is incorrect because disabling the Scan operation on the DynamoDB table would break legitimate use cases that require scanning (e.g., admin queries, reporting) and is not a recommended control. Option E is incorrect because VPC Flow Logs capture network traffic to DynamoDB, not the DynamoDB API operations themselves, so they cannot detect scans.

4
Multi-Selecteasy

A company is using Amazon RDS for MySQL and wants to implement database activity monitoring to detect suspicious queries. Which TWO AWS services can be used together to achieve this?

Select 2 answers
A.AWS Lambda
B.AWS CloudTrail
C.AWS Systems Manager Patch Manager
D.Amazon Inspector
E.Amazon CloudWatch Logs
AnswersA, E

Can process CloudWatch Logs and detect patterns.

Why this answer

Options A and E are correct. Amazon RDS for MySQL can publish database logs (such as general logs, slow query logs, or audit logs) to Amazon CloudWatch Logs. CloudWatch Logs can then trigger an AWS Lambda function to analyze the logs in real-time and detect suspicious queries.

Option B (AWS CloudTrail) records API calls made to AWS services, not database queries. Option C (AWS Systems Manager Patch Manager) is used for patching OS and applications. Option D (Amazon Inspector) is a vulnerability assessment service, not for database activity monitoring.

5
Multi-Selecteasy

A company is using Amazon DynamoDB and wants to restrict access to a specific table so that only users in a particular IAM group can perform read and write operations. Which THREE steps should be taken to achieve this?

Select 3 answers
A.Create an IAM policy that allows dynamodb:GetItem, dynamodb:PutItem, etc. on the specific table ARN.
B.Attach the IAM policy to an IAM group.
C.Attach a resource-based policy to the DynamoDB table allowing access from the group.
D.Add the users to the IAM group.
E.Create an IAM role and assign it to the table.
AnswersA, B, D

This defines the allowed actions on the table.

Why this answer

The correct answers are A, B, and D. To restrict access to a specific DynamoDB table, you create an IAM policy that allows the required DynamoDB actions on that table's ARN (A). You then attach that policy to an IAM group (B), and add the users who need access to that group (D).

Options C and E are incorrect because DynamoDB does not support resource-based policies, and IAM roles are not directly assigned to tables for access control.

6
MCQhard

The security team reports that the database 'mydb' is not encrypted. However, the CLI output shows 'StorageEncrypted' is true. What is the MOST likely reason for the security team's concern?

A.The database is using a default AWS managed key instead of a customer-managed key.
B.The KMS key specified may have been disabled or deleted, causing the database to be inaccessible or not encrypted.
C.The 'StorageEncrypted' field is false, but the CLI output shows true.
D.The database is not using a KMS key and is instead using a CloudHSM key.
AnswerB

If the KMS key is disabled or deleted, the database may not be able to encrypt/decrypt data, leading to security concerns.

Why this answer

The security team's concern likely stems from the possibility that the KMS key specified for encryption might have been disabled or deleted. Even though 'StorageEncrypted' is true, if the KMS key is not available, the database may become inaccessible or the encryption may not be effective. Option A is incorrect because using a default AWS managed key still provides encryption; the security team's concern is about encryption itself, not key type.

Option C is incorrect because the CLI output clearly shows 'StorageEncrypted' is true, so the field is not false. Option D is incorrect because there is no indication that a CloudHSM key is involved, and using a KMS key is the standard approach for RDS encryption.

7
MCQhard

A security engineer runs the commands shown in the exhibit for an RDS MySQL DB instance. The engineer wants to enforce SSL connections to the database. What should the engineer do?

A.Modify the default.mysql8.0 parameter group to set require_secure_transport to ON and reboot the instance.
B.Run the modify-db-instance command with --require-ssl-transport.
C.Create a custom DB parameter group with require_secure_transport set to ON, associate it with the DB instance, and reboot the instance.
D.Modify the DB instance and set the --enable-iam-database-authentication flag.
AnswerC

This is the correct method to enforce SSL.

Why this answer

Enforcing SSL for MySQL requires setting require_secure_transport to ON in a custom DB parameter group, then associating it with the DB instance and rebooting. Option A is wrong because the default parameter group cannot be modified. Option B is wrong because there is no --require-ssl-transport flag; the setting is a parameter group parameter, not an instance-level flag.

Option D is wrong because IAM database authentication does not enforce SSL connections.

8
Multi-Selectmedium

A company runs an Amazon RDS for MySQL DB instance in a VPC. Security requirements mandate that only specific EC2 instances in the same VPC can connect to the database. The security group attached to the RDS instance currently allows inbound traffic on port 3306 from 0.0.0.0/0. Which combination of steps should a database specialist take to meet the security requirement without impacting existing application connectivity? (Choose two.)

Select 2 answers
A.Modify the network ACL for the DB subnet to allow inbound port 3306 from the EC2 instance's private IP.
B.Remove the inbound rule for 0.0.0.0/0 on the RDS security group.
C.Add an inbound rule to the RDS security group referencing the security group ID of the EC2 instances.
D.Modify the DB subnet group to place the RDS instance in a public subnet with a route to the EC2 instance.
E.Add an inbound rule to the RDS security group allowing traffic from the VPC CIDR on port 3306.
AnswersB, C

Removing the overly permissive rule is necessary to restrict access.

Why this answer

Removing the overly permissive inbound rule for 0.0.0.0/0 on the RDS security group eliminates unrestricted access, which is a direct violation of the security requirement. Option C is correct because adding an inbound rule that references the security group ID of the EC2 instances allows traffic only from those instances, leveraging security group referencing for granular, stateful access control within the same VPC.

Exam trap

The trap here is that candidates often confuse network ACLs with security groups, thinking that modifying the NACL at the subnet level is sufficient, but they overlook that NACLs are stateless and less granular, while security group referencing provides precise, stateful control for instance-to-instance communication.

9
MCQmedium

A company is using Amazon Aurora MySQL and needs to audit all database logins, including failed attempts, and store the audit logs for one year for compliance. The logs must be immutable and accessible only by the security team. Which solution should the company implement?

A.Enable VPC Flow Logs to capture network connections to the database endpoint.
B.Enable AWS CloudTrail to log database login events.
C.Enable RDS for Aurora database activity streams, stream to CloudWatch Logs, and export to S3 with S3 Object Lock enabled.
D.Enable the standard MySQL audit log plugin and store logs in a database table with restricted access.
AnswerC

Activity streams provide immutable audit logs.

Why this answer

Amazon Aurora MySQL supports Database Activity Streams, which capture detailed audit information including login attempts (both successful and failed). These streams can be sent to Amazon CloudWatch Logs for monitoring and then exported to Amazon S3. To ensure immutability and restricted access, S3 Object Lock can be enabled, preventing any updates or deletions, and S3 bucket policies can limit access to only the security team.

Option A is incorrect because VPC Flow Logs capture network-level traffic, not database login events. Option B is incorrect because AWS CloudTrail logs API calls made to AWS services, not database-level login attempts. Option D is incorrect because the standard MySQL audit log plugin stores logs in a table that can be modified, lacking immutability, and does not natively integrate with S3 Object Lock for long-term immutable storage.

10
MCQeasy

A small business runs a web application on a single Amazon RDS for MySQL DB instance. The application uses a master user account for all database operations. The security team is concerned about the risk of SQL injection and wants to implement the principle of least privilege. They want to create separate database users for read-only and read-write operations. The application currently uses a single connection string. The developer needs to modify the application to use two separate users. What is the correct approach to implement this securely?

A.Use stored procedures for all database operations and grant execute only to the master user.
B.Keep using the master user but restrict its IP address.
C.Enable IAM database authentication and use a single IAM role.
D.Create a read-only user and a read-write user in the database, grant minimal privileges, and modify the application to use the appropriate user for each operation.
AnswerD

Enforces least privilege.

Why this answer

Creating separate users with minimal privileges and modifying the application to use the appropriate user for each operation reduces the risk of SQL injection and enforces least privilege. Option A is wrong because using stored procedures with a single master user does not eliminate the need for separate users for different privilege levels. Option B is wrong because restricting IP address does not address the need for granular permissions.

Option C is wrong because enabling IAM database authentication with a single IAM role does not provide separate read-only and read-write capabilities.

11
MCQhard

A company is using Amazon DynamoDB with AWS Lambda to process data. The Lambda function needs to read and write items to a DynamoDB table. The security team wants to follow the principle of least privilege. Which IAM policy statement should be attached to the Lambda execution role?

A.{"Effect":"Allow","Action":"dynamodb:*","Resource":"*"}
B.{"Effect":"Allow","Action":["dynamodb:DescribeTable","dynamodb:ListTables"],"Resource":"*"}
C.{"Effect":"Allow","Action":["dynamodb:GetItem","dynamodb:PutItem","dynamodb:UpdateItem","dynamodb:DeleteItem"],"Resource":"arn:aws:dynamodb:us-east-1:123456789012:table/MyTable"}
D.{"Effect":"Allow","Action":"dynamodb:*","Resource":"arn:aws:dynamodb:us-east-1:123456789012:table/MyTable"}
AnswerC

This policy grants only the necessary read/write actions (GetItem, PutItem, UpdateItem, DeleteItem) on the specific table, following least privilege.

Why this answer

It grants only the necessary DynamoDB actions (GetItem, PutItem, UpdateItem, DeleteItem) on the specific table. Option A is wrong because it grants full DynamoDB access on all resources, which is too permissive. Option B is wrong because it only allows DescribeTable and ListTables on all tables, which does not provide the read/write permissions needed.

Option D is wrong because it allows all DynamoDB actions on a specific table, which is overly permissive and violates least privilege.

12
MCQhard

A company is using an RDS for MySQL DB instance encrypted at rest with AWS KMS. The security team requires that all access to the database be logged, including queries that fail due to authentication errors. Which configuration meets this requirement?

A.Enable the RDS audit log by setting the 'audit_log_enabled' parameter to 1 in the DB parameter group and export logs to CloudWatch Logs.
B.Enable RDS Enhanced Monitoring and publish metrics to CloudWatch.
C.Enable AWS CloudTrail for the RDS instance and store logs in S3.
D.Use S3 server access logs to capture database connection attempts.
AnswerA

Audit logs capture authentication failures and queries; exporting to CloudWatch allows monitoring.

Why this answer

RDS for MySQL supports audit logs that can capture authentication failures and queries. By setting the 'audit_log_enabled' parameter to 1 in the DB parameter group and exporting logs to CloudWatch Logs, you meet the requirement to log all access including failed authentication attempts. Option B is incorrect because Enhanced Monitoring provides OS-level metrics, not query logs.

Option C is incorrect because AWS CloudTrail logs control plane API calls for RDS, not data plane activities like database queries. Option D is incorrect because S3 server access logs capture requests made to S3 buckets, not database connections.

13
Multi-Selectmedium

A company is designing a security strategy for Amazon RDS for SQL Server. Which TWO actions should be taken to encrypt data at rest? (Choose TWO.)

Select 2 answers
A.Enable Amazon EBS encryption on the underlying volumes.
B.Enable Transparent Data Encryption (TDE) on the SQL Server database.
C.Use AWS CloudHSM to store encryption keys.
D.Enable SSL/TLS for connections.
E.Enable RDS encryption at rest using AWS KMS.
AnswersB, E

Correct. Transparent Data Encryption (TDE) is a SQL Server feature that encrypts data at rest within the database files.

Why this answer

For Amazon RDS for SQL Server, encryption at rest can be achieved using two methods: enabling RDS encryption at rest with AWS KMS (option E) or enabling Transparent Data Encryption (TDE) natively within SQL Server (option B). Option A is incorrect because EBS encryption is automatically handled by RDS when you enable encryption at rest via KMS, but you cannot enable EBS encryption directly on the underlying volumes. Option C is incorrect because AWS CloudHSM can be used for key management but is not required for RDS encryption at rest.

Option D is incorrect because SSL/TLS encrypts data in transit, not at rest.

14
MCQhard

A security auditor notices that the DynamoDB table 'UserData' is encrypted with a KMS key (exhibit). The company policy requires that all DynamoDB tables use an AWS managed key for encryption. What must be done to comply with the policy?

A.Create a new DynamoDB table with SSE enabled using the AWS managed key, then export data from the existing table and import into the new table.
B.Delete the customer managed KMS key and recreate it as an AWS managed key.
C.Modify the table's SSE configuration to use the AWS managed key.
D.Use the UpdateTable API to change the KMS key to the AWS managed key.
AnswerA

Key can only be set at creation.

Why this answer

DynamoDB does not support changing the KMS key or SSE configuration after table creation. To use the AWS managed key instead of a customer managed key, you must create a new table with SSE-KMS enabled using the AWS managed key (alias 'aws/dynamodb'), export the existing table data (via DynamoDB export to S3 or using a scan/write process), and import it into the new table. Option B is incorrect because a customer managed KMS key cannot be converted into an AWS managed key; they are distinct key types.

Option C is incorrect because you cannot modify the SSE configuration of an existing DynamoDB table; encryption settings are immutable after creation. Option D is incorrect because the UpdateTable API does not allow changing the KMS key used for encryption; it only supports updating other table settings like billing mode or provisioned throughput.

15
Matchingmedium

Match each DynamoDB concept to its definition.

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

Concepts
Matches

Single attribute used to distribute data across partitions

Attribute that determines order within a partition

Index with a different partition and sort key for alternate query patterns

Index with the same partition key but different sort key

Time-ordered sequence of item-level changes in a table

Why these pairings

This matching exercise tests understanding of core DynamoDB concepts. The partition key distributes items across partitions, while the sort key enables ordering. Global secondary indexes (GSIs) allow queries on different partition keys, while local secondary indexes (LSIs) share the same partition key but different sort keys.

16
MCQmedium

Refer to the exhibit. A company has attached this IAM policy to an IAM role used by an application running on Amazon EC2. The application needs to decrypt data in an S3 bucket that is encrypted with the specified KMS key. However, the application is receiving access denied errors. What is the most likely cause?

A.The policy does not include 'kms:Decrypt' for the specific key.
B.The application is decrypting the data by calling KMS directly instead of using S3's server-side decryption.
C.The policy is missing a 'Principal' element.
D.The IAM role does not have a trust policy that allows EC2 to assume it.
AnswerB

The 'kms:ViaService' condition requires that the call be made via S3, not directly to KMS.

Why this answer

The policy condition 'kms:ViaService' restricts KMS operations to only when they are made through S3. However, the condition also includes 'kms:CallerAccount' which is redundant but not harmful. The error likely occurs because the EC2 instance does not have the correct IAM role, or the policy is missing 'kms:Decrypt' for the specific ciphertext.

But the most common mistake is that the application is not using the S3 service to decrypt; if the application reads the encrypted object and then calls KMS directly to decrypt, the 'kms:ViaService' condition will fail because the call is not via S3. Option B addresses this. Option A is wrong because the condition is present.

Option C is wrong because the role is not explicitly denied. Option D is wrong because the policy allows KMS actions.

17
MCQhard

An IAM policy is attached to a user. Which of the following actions will be allowed?

A.Delete a DB instance named 'prod-db'.
B.Create a new DB instance named 'prod-db'.
C.Delete a DB instance named 'test-db'.
D.Delete a DB instance named 'dev-db'.
AnswerB

Cannot be determined without the IAM policy.

Why this answer

The question does not include the IAM policy text, so it is impossible to determine which actions are allowed. Without the policy, we cannot evaluate whether any specific action is permitted or denied. Therefore, none of the options can be confirmed as correct.

18
MCQmedium

A company is running an RDS for MySQL database and needs to ensure that all connections to the database use SSL encryption. Which configuration step is required?

A.Set 'require_secure_transport' to ON in the DB parameter group.
B.Enable 'Enable SSL' in the RDS console.
C.Set 'rds.force_ssl' to 1 in the DB parameter group.
D.Set 'ssl' to 'require' in the DB parameter group.
AnswerA

This forces all connections to use SSL.

Why this answer

Setting 'require_secure_transport' to ON in the DB parameter group forces all connections to the RDS for MySQL database to use SSL/TLS encryption. This parameter is supported in MySQL 5.7 and later, and when enabled, the server rejects non-encrypted connections, ensuring compliance with security policies.

Exam trap

The trap here is that candidates confuse the MySQL-specific parameter 'require_secure_transport' with the PostgreSQL-specific parameter 'rds.force_ssl', or assume a generic 'Enable SSL' console option exists, leading them to pick incorrect answers.

How to eliminate wrong answers

Option B is wrong because there is no 'Enable SSL' toggle in the RDS console; SSL is always available for RDS MySQL, but enforcement requires a parameter group change. Option C is wrong because 'rds.force_ssl' is not a valid parameter for RDS MySQL; this parameter exists for RDS for PostgreSQL, not MySQL. Option D is wrong because setting 'ssl' to 'require' is not a valid parameter in the MySQL DB parameter group; the correct parameter is 'require_secure_transport'.

19
MCQhard

A company is using Amazon RDS for SQL Server with Multi-AZ deployment. The security team requires that all database activity be monitored for suspicious queries. The database specialist enabled RDS Database Activity Streams and configured AWS Lambda to process the stream. However, the Lambda function fails to process some events when the database fails over to the standby instance. What is the most likely cause?

A.The security group does not allow the Lambda function to connect to the new primary instance.
B.The Lambda function does not re-establish the stream session after a failover event.
C.The parameter group for the standby instance does not have the activity stream enabled.
D.The KMS key used to encrypt the activity stream is not available in the standby instance's Region.
AnswerB

The Lambda function must re-establish the stream session after a failover. If it does not, events are lost.

Why this answer

When a failover occurs, the RDS Database Activity Stream session is tied to the original primary instance. The Lambda function must re-establish the stream session to the new primary instance to continue processing events. If it does not, events during failover are lost.

Option A is incorrect because the security group controls network access to the RDS endpoint, which remains the same after failover; connectivity is not the issue. Option C is incorrect because parameter group settings apply to both primary and standby instances; the activity stream setting is not parameter group-dependent. Option D is incorrect because the KMS key used for encryption is available in the same region; region unavailability is not a factor in Multi-AZ deployments within a single region.

20
MCQmedium

A company is using Amazon RDS for MySQL and wants to restrict access to a specific database so that an application user can only perform SELECT and INSERT operations on tables within that database. The application user already exists. Which SQL statement should be executed?

A.GRANT SELECT ON app_db.* TO 'app_user'@'%';
B.GRANT CREATE, ALTER, SELECT, INSERT ON app_db.* TO 'app_user'@'%';
C.GRANT SELECT, INSERT ON app_db.* TO 'app_user'@'%';
D.GRANT ALL PRIVILEGES ON app_db.* TO 'app_user'@'%';
AnswerC

This grants exactly the required permissions.

Why this answer

It grants exactly the required SELECT and INSERT privileges on all tables within the app_db database. Option A is incorrect because it only grants SELECT, missing INSERT. Option B is incorrect because it includes unnecessary DDL privileges (CREATE, ALTER) which are not needed and could be a security risk.

Option D is incorrect because it grants ALL PRIVILEGES, which is too permissive for an application user.

21
MCQhard

A security engineer is troubleshooting an issue where an application using IAM role 'app-role' with a trust policy to assume the 'app-user' user is unable to decrypt an RDS database that uses a customer-managed KMS key. The above key policy is attached to the KMS key. What is the likely cause of the failure?

A.The 'kms:ViaService' condition requires the request to come from RDS, but the application is making KMS API calls directly.
B.The policy has a missing 'Effect': 'Deny' statement that is blocking access.
C.The principal in the policy is 'app-user', but the application uses an IAM role that does not have the necessary permissions.
D.The condition 'kms:ViaService' restricts the key to be used only with RDS, but the application is using a different service.
AnswerC

The policy grants permissions to the user 'app-user', but the application uses a role. The role needs to be added to the key policy.

Why this answer

The KMS key policy specifies the principal as 'app-user', which is an IAM user. However, the application uses an IAM role 'app-role' to make the decryption requests. Since the principal in the key policy does not include the role or its associated permissions, the KMS key policy denies access to the role, causing the decryption failure.

The trust policy on the role allows the user to assume it, but that does not grant the role any KMS permissions unless explicitly added.

Exam trap

The trap here is that candidates often confuse the trust policy of an IAM role with the permissions granted to the role, assuming that if a user can assume a role, the role inherits the user's KMS permissions, when in fact the role must be explicitly authorized in the key policy or via an IAM policy.

How to eliminate wrong answers

Option A is wrong because the 'kms:ViaService' condition in the key policy allows requests coming via RDS, not that the request must come from RDS; the application making direct KMS API calls would still be allowed if the principal matches, so this is not the cause. Option B is wrong because the policy does not have a missing 'Deny' statement; the issue is that the principal is incorrect, not that a Deny is needed. Option D is wrong because the 'kms:ViaService' condition is set to 'rds.amazonaws.com', which permits RDS to use the key, but the application is not using RDS to make the decryption call; however, the primary failure is the principal mismatch, not the service condition.

22
MCQhard

A security team is auditing IAM policies for Amazon RDS. They want to ensure that all RDS snapshots shared with other AWS accounts are encrypted. Which IAM policy condition key should be used to enforce this?

A.rds:Encrypted
B.rds:SnapshotEncrypted
C.rds:StorageEncrypted
D.s3:x-amz-server-side-encryption
AnswerA

This condition key checks whether the snapshot is encrypted.

Why this answer

Rds:Encrypted. This condition key verifies that a snapshot is encrypted when sharing with other AWS accounts. Option B (rds:SnapshotEncrypted) is not a valid condition key.

Option C (rds:StorageEncrypted) is used to check if the DB instance's storage is encrypted, not the snapshot. Option D (s3:x-amz-server-side-encryption) is an S3 condition key and not applicable to RDS snapshots.

23
MCQmedium

A company is launching a new application that requires an Amazon RDS for PostgreSQL database. The database will store highly sensitive data, and the security team mandates that all data at rest must be encrypted. The company also requires that the encryption keys be managed by the security team using AWS CloudHSM. What is the MOST efficient way to meet these requirements?

A.Enable EBS encryption on the RDS instance's underlying volumes using a KMS key.
B.Enable Transparent Data Encryption (TDE) using a CloudHSM key in the RDS instance.
C.Use AWS KMS with a customer-managed key (CMK) for RDS encryption.
D.Implement client-side encryption in the application before writing data to the database.
AnswerC

RDS encryption with a customer-managed KMS key encrypts data at rest and can be backed by CloudHSM via custom key store.

Why this answer

Amazon RDS for PostgreSQL does not support Transparent Data Encryption (TDE). TDE is only available for Oracle and SQL Server. The most efficient way to meet the requirements is to use RDS encryption with a customer-managed key (CMK) in AWS KMS, which encrypts the underlying storage and automated backups.

The security team can manage the CMK via CloudHSM by using a KMS custom key store, thus satisfying the key management requirement. Option A is incorrect because EBS encryption is not directly applicable to RDS instances; RDS encryption uses KMS. Option B is incorrect because TDE is not supported for PostgreSQL.

Option D is incorrect because client-side encryption introduces application changes and does not ensure encryption at rest within the database.

Exam trap

Candidates may assume TDE applies to all RDS engines, but TDE is only supported for Oracle and SQL Server, not PostgreSQL or MySQL.

24
Multi-Selectmedium

Which TWO AWS services can be used to monitor database security events in real time? (Choose 2.)

Select 2 answers
A.AWS WAF
B.Amazon GuardDuty
C.Amazon RDS Performance Insights
D.Amazon CloudWatch Logs
E.AWS CloudTrail
AnswersB, D

GuardDuty can detect threats based on database activity.

Why this answer

Amazon GuardDuty (Option B) is a threat detection service that continuously monitors for malicious activity and unauthorized behavior, including database security events such as suspicious API calls or potential credential compromise. It uses machine learning, anomaly detection, and integrated threat intelligence to analyze AWS CloudTrail logs, VPC Flow Logs, and DNS logs in real time, making it suitable for monitoring database security events.

Exam trap

AWS often tests the distinction between services that provide real-time security monitoring (GuardDuty, CloudWatch Logs with metric filters) versus those that offer historical auditing (CloudTrail) or performance monitoring (Performance Insights), leading candidates to mistakenly select CloudTrail for real-time needs.

25
MCQmedium

A security engineer is designing a solution to encrypt data at rest for an Amazon Redshift cluster. The company requires that the encryption key be rotated automatically every year. Which solution meets these requirements?

A.Use a Lambda function to rotate the encryption key manually every year.
B.Enable encryption for the Redshift cluster using an AWS KMS key with automatic rotation.
C.Use a CloudHSM key to encrypt the Redshift cluster and configure automatic rotation in CloudHSM.
D.Store the Redshift cluster data in an S3 bucket with server-side encryption enabled.
AnswerB

Enabling encryption for the Redshift cluster with an AWS KMS key that has automatic rotation meets the requirement for yearly key rotation.

Why this answer

Amazon Redshift supports encryption at rest using AWS KMS with automatic key rotation. When you enable encryption for a Redshift cluster, you can choose a KMS key with automatic rotation enabled, which meets the requirement of rotating the encryption key automatically every year.

Option A is incorrect because manual rotation using a Lambda function is not the recommended approach when automatic rotation is available. Redshift does not support custom manual rotation; it relies on KMS for key management.

Option C is incorrect because Redshift does not support CloudHSM for encryption at rest; it uses AWS KMS. CloudHSM does not provide automatic rotation as a built-in feature in the same way KMS does.

Option D is incorrect because Redshift does not store cluster data in an S3 bucket; S3 server-side encryption is not applicable to the Redshift cluster itself. Redshift uses its own encryption mechanism integrated with KMS.

26
Multi-Selecteasy

A company is using Amazon RDS for MySQL with Multi-AZ deployment. The security team wants to ensure that database administrators cannot view sensitive data. Which TWO actions should be taken to achieve this goal?

Select 2 answers
A.Use IAM database authentication for application access.
B.Enable audit logging to capture all data access.
C.Store database credentials in AWS Secrets Manager and enforce automatic rotation.
D.Enable encryption at rest using a customer-managed KMS key.
E.Disable query logging to prevent sensitive data from being written to logs.
AnswersA, C

IAM database authentication allows applications to connect without passwords, reducing the need for DBAs to handle credentials.

Why this answer

IAM database authentication allows you to authenticate to your RDS MySQL instance using an IAM user or role instead of a traditional database password. This eliminates the need for database administrators to know or manage database credentials, as they can only access the database through IAM policies that grant specific, auditable permissions. By using IAM authentication, you enforce a separation of duties where DBAs cannot view sensitive data unless explicitly authorized by IAM policies.

Exam trap

The trap here is that candidates often confuse encryption at rest (which protects data on disk) with access control (which protects data from being queried), leading them to select encryption options when the real requirement is to prevent DBAs from viewing data through database connections.

27
MCQmedium

A security engineer runs the AWS CLI command shown in the exhibit. The engineer wants to ensure that all RDS DB instances in the account are encrypted at rest. What should the engineer do to remediate the unencrypted read replica?

A.Modify the read replica by setting the StorageEncrypted parameter to true.
B.Delete the unencrypted read replica and create a new read replica from the encrypted source, enabling encryption on the new replica.
C.Enable encryption on the source DB instance and the read replica will automatically become encrypted.
D.Create a snapshot of the read replica, encrypt the snapshot, and restore it as a new instance.
AnswerB

This ensures the new read replica is encrypted, and the source is already encrypted.

Why this answer

To encrypt an unencrypted read replica that is sourced from an encrypted DB instance, you cannot directly enable encryption on an existing read replica or modify it. Instead, you must delete the unencrypted read replica and create a new read replica from the encrypted source, enabling encryption on the new replica. This is because encryption at rest can only be enabled during instance creation, and read replicas inherit encryption settings from the source at creation time.

Option A is incorrect because the StorageEncrypted parameter cannot be modified on an existing instance. Option C is incorrect because enabling encryption on the source does not encrypt existing replicas; it only affects new replicas. Option D is incorrect because creating a snapshot of the unencrypted replica and restoring it as a new encrypted instance is not the standard procedure for encrypting a read replica; the correct approach is to recreate the read replica from the encrypted source with encryption enabled.

28
MCQeasy

A developer runs the AWS CLI command shown in the exhibit. What is the output indicating?

A.The secret value is not accessible.
B.The secret is not encrypted.
C.The secret has been rotated.
D.The secret contains a username and password in JSON format.
AnswerD

The output displays the secret value in JSON format containing both a username and password, which is the expected result of retrieving a secret.

Why this answer

The `aws secretsmanager get-secret-value` command returns the secret's value in the `SecretString` field, which typically contains a JSON object with the username and password. Option A is incorrect because the command succeeded, indicating the secret is accessible. Option B is incorrect because secrets are encrypted at rest by default.

Option C is incorrect because the output includes the version ID but does not indicate rotation.

29
MCQeasy

A company is storing sensitive customer data in an Amazon RDS for MySQL DB instance. They need to ensure that data is encrypted at rest. What is the simplest way to achieve this?

A.Enable encryption on the existing DB instance by modifying the DB instance settings.
B.Enable Transparent Data Encryption (TDE) on the MySQL instance.
C.Launch a new encrypted DB instance and migrate the data.
D.Use client-side encryption with AWS KMS to encrypt data before inserting into the database.
AnswerC

Launching a new RDS instance with encryption enabled is the simplest method, as encryption is specified at launch time.

Why this answer

Amazon RDS for MySQL does not allow enabling encryption at rest on an existing unencrypted DB instance. The simplest way to achieve encryption at rest is to launch a new encrypted DB instance and migrate the data. Option A is incorrect because encryption cannot be enabled on an existing DB instance via modification; it requires creating a new instance.

Option B is incorrect because RDS for MySQL does not support Transparent Data Encryption (TDE). Option D is incorrect because client-side encryption with AWS KMS is more complex and not the simplest approach.

30
Multi-Selectmedium

A company uses Amazon RDS for PostgreSQL and wants to audit all database login attempts. Which TWO services can be used together to achieve this?

Select 2 answers
A.Enable AWS CloudTrail.
B.Enable VPC Flow Logs.
C.Enable S3 access logs to capture API calls.
D.Enable RDS Enhanced Monitoring.
E.Enable RDS for PostgreSQL to log to CloudWatch Logs.
AnswersA, E

Correct. CloudTrail captures management API calls, including those that modify the DB parameter group to enable audit logging, which is part of the auditing process.

Why this answer

To audit all database login attempts in RDS for PostgreSQL, you need to capture both the configuration changes (e.g., enabling audit logging) and the actual login events. AWS CloudTrail (Option A) records management API calls, such as modifying the DB parameter group to enable logging to CloudWatch Logs. Option E enables RDS for PostgreSQL to log login attempts directly to CloudWatch Logs.

Together, they provide complete auditing: CloudTrail for the administrative actions and CloudWatch Logs for the login events. The other options do not capture login attempts.

31
MCQmedium

A company is migrating an on-premises Oracle database to Amazon RDS for Oracle. The compliance team requires that all database connections use SSL/TLS and that users authenticate using IAM database authentication. The database migration is completed, but the application team reports that connections using IAM authentication are failing. The company has already enabled IAM database authentication on the RDS instance. What is the most likely cause of the failure?

A.The application is using an outdated root CA certificate for SSL.
B.The Security Group does not allow inbound traffic from the application.
C.The database user has not been granted the necessary privileges for IAM authentication.
D.The RDS instance is using a different KMS key for encryption.
AnswerC

Database users must be created with 'IDENTIFIED WITH AWS_AUTHENTICATION' and granted 'rds_iam' role to use IAM authentication.

Why this answer

IAM database authentication requires that the database user be created with the `IDENTIFIED WITH AWS_AUTHENTICATION` clause in Oracle. Without this privilege, the RDS instance will reject IAM-authenticated connections even if IAM authentication is enabled at the instance level. The application team must ensure the database user has been granted the `AWS_ORACLE_EXTENSIONS` role and that the user is mapped to an IAM policy allowing `rds-db:connect`.

Exam trap

The trap here is that candidates often assume enabling IAM authentication on the RDS instance is sufficient, overlooking the mandatory step of creating the database user with the `IDENTIFIED WITH AWS_AUTHENTICATION` clause and granting the necessary privileges.

How to eliminate wrong answers

Option A is wrong because an outdated root CA certificate would cause SSL/TLS handshake failures, not IAM authentication failures; IAM authentication relies on a valid authentication token, not the CA certificate chain. Option B is wrong because security group inbound rules control network-layer access, not authentication; if the security group blocked traffic, the application would receive a timeout or connection refused error, not an IAM authentication failure. Option D is wrong because the KMS key used for encryption at rest is unrelated to IAM authentication; IAM authentication uses the AWS Signature Version 4 signing process and does not involve KMS keys.

32
MCQeasy

An IAM policy is attached to a user. What does this policy allow the user to do?

A.Update an item in the Orders table.
B.Scan the entire Orders table and return all attributes.
C.Delete an item from the Orders table.
D.Get an item from the Orders table but only return the order_id, customer_id, and status attributes.
AnswerD

The policy allows GetItem with attribute restriction.

Why this answer

The IAM policy allows the GetItem action on the Orders table, with a condition that restricts the returned attributes to order_id, customer_id, and status. This matches option D. Option A is incorrect because the policy does not allow UpdateItem.

Option B is incorrect because the policy does not allow Scan (it only allows GetItem). Option C is incorrect because the policy does not allow DeleteItem.

33
MCQhard

A company runs a production Amazon DynamoDB table with on-demand capacity. The security team requires that all access to the table be logged for compliance. What is the most cost-effective way to log every DynamoDB API call?

A.Enable DynamoDB Streams on the table and process the stream with AWS Lambda.
B.Enable Amazon CloudWatch Logs to capture DynamoDB API calls.
C.Enable VPC Flow Logs and analyze them with Amazon Athena.
D.Enable AWS CloudTrail and create a trail that delivers logs to Amazon CloudWatch Logs.
AnswerD

AWS CloudTrail logs all DynamoDB API calls (e.g., GetItem, PutItem, Query) and can deliver these logs to CloudWatch Logs for monitoring and compliance.

Why this answer

AWS CloudTrail logs all DynamoDB API calls (e.g., GetItem, PutItem, Query) and can deliver these logs to CloudWatch Logs for monitoring and compliance. Option A is incorrect because DynamoDB Streams capture data modifications (INSERT, MODIFY, DELETE), not the API calls themselves. Option B is incorrect because CloudWatch Logs is a destination for logs, not a service that captures API calls directly; it relies on CloudTrail or other sources to send logs.

Option C is incorrect because VPC Flow Logs record network traffic metadata (IP addresses, ports), not API-level calls.

34
MCQhard

A company has a multi-AZ RDS for PostgreSQL DB instance. The security team wants to ensure that database audit logs are stored in CloudWatch Logs for real-time monitoring. The team enabled the 'pgaudit.log' parameter and set 'log_destination' to 'csvlog'. However, logs are not appearing in CloudWatch. What is the most likely cause?

A.The DB instance is multi-AZ, which prevents log delivery to CloudWatch.
B.AWS CloudTrail is not enabled for the RDS instance.
C.The DB parameter group is not associated with the DB instance.
D.The 'rds.logs_to_cloudwatch' parameter is not set to 1.
AnswerD

This parameter must be enabled for logs to be published to CloudWatch.

Why this answer

RDS publishes logs to CloudWatch only if the 'rds.logs_to_cloudwatch' parameter is set to 1. Option A is wrong because multi-AZ does not prevent log delivery. Option B is wrong because CloudTrail is not involved in log delivery to CloudWatch; it's about API activity logging.

Option C is wrong because the DB parameter group is associated; the issue is that the specific parameter 'rds.logs_to_cloudwatch' is not set.

35
MCQmedium

A company has an Amazon RDS for MySQL DB instance that stores sensitive customer data. The security team requires that all data at rest be encrypted using a customer-managed AWS KMS key. The DB instance was originally launched without encryption. Which combination of steps will meet the requirement with the least downtime?

A.Create a read replica of the DB instance with encryption enabled, and then promote the read replica to become the primary instance.
B.Modify the DB instance and enable encryption using the AWS Management Console.
C.Take a snapshot of the DB instance, copy the snapshot with encryption enabled using the desired KMS key, and restore the encrypted snapshot to a new DB instance.
D.Take a snapshot of the DB instance, copy the snapshot with encryption enabled, and restore the encrypted snapshot to the same DB instance ID.
AnswerC

This is the standard procedure to enable encryption on an existing unencrypted RDS instance.

Why this answer

To enable encryption on an existing unencrypted RDS MySQL DB instance, you must take a snapshot of the instance, copy the snapshot with encryption enabled using the desired KMS key, and then restore the encrypted snapshot to a new DB instance. This process results in some downtime but is the standard method. Option A is incorrect because you cannot create an encrypted read replica from an unencrypted source instance; encryption on a read replica requires the source to be encrypted.

Option B is incorrect because you cannot enable encryption on an existing unencrypted DB instance by modifying it; encryption can only be enabled at creation time or by restoring an encrypted snapshot. Option D is incorrect because you cannot restore an encrypted snapshot to the same DB instance ID; you must restore to a new instance, then update the application endpoint.

36
MCQhard

A CloudFormation template is used to create an RDS DB instance with encryption, as shown in the exhibit. The stack creation fails because the DB instance creation fails. What is the most likely cause?

A.The DB instance has StorageEncrypted set to true but KmsKeyId is not a valid ARN.
B.The KMS key policy does not grant permissions to the RDS service principal.
C.The KmsKeyId property requires the key ARN, not a reference.
D.The DB instance depends on the KMS key, but there is no DependsOn clause to ensure the key is created first.
AnswerD

Without DependsOn, the DB instance may be created before the key.

Why this answer

KMS key creation must be completed before the DB instance can use it; CloudFormation does not automatically order creation unless dependencies are defined. Option A is wrong because the KMS key policy allows the account root full access. Option B is wrong because the KMS key ID is passed correctly via !Ref.

Option C is wrong because encryption is set to true and the KMS key is provided.

37
MCQmedium

A user is unable to list the contents of the S3 bucket 'my-db-backups' using the AWS CLI. The IAM policy attached to the user is shown in the exhibit. What is the likely cause?

A.The user is using the wrong bucket name.
B.The policy does not grant 's3:ListBucket' permission.
C.The resource ARN is missing the bucket-level ARN needed for listing.
D.The policy has a syntax error.
AnswerB

ListBucket is required to list objects.

Why this answer

The IAM policy must include the 's3:ListBucket' action to allow listing the contents of an S3 bucket. The given policy lacks this action, so the user cannot list the bucket's objects. Option A is incorrect because there is no indication the bucket name is wrong.

Option C is incorrect because the resource ARN in the policy includes the bucket-level ARN (e.g., 'arn:aws:s3:::my-db-backups'), which is sufficient for listing. Option D is incorrect because the policy syntax is valid JSON.

38
MCQmedium

A company needs to enforce that all new Amazon RDS DB instances are automatically encrypted at rest. What is the most efficient way to achieve this?

A.Create an IAM policy that denies rds:CreateDBInstance unless encryption is enabled, and attach it to all users.
B.Enable the 'encryption at rest' default in each AWS account's RDS console.
C.Use an AWS Organizations service control policy (SCP) to deny creation of unencrypted RDS instances.
D.Use AWS CloudFormation StackSets to deploy a template that creates encrypted instances in every account.
AnswerC

SCPs can enforce encryption at the organizational level.

Why this answer

Using an AWS Organizations service control policy (SCP) to deny creation of unencrypted RDS instances is the most efficient way to enforce encryption at rest for all new RDS DB instances across multiple accounts. SCPs are applied at the organization, organizational unit, or account level and cannot be overridden by users, ensuring consistent enforcement. Option A is wrong because IAM policies with condition keys only affect specified users or roles, not service-linked roles or resources, and can be bypassed if users have permissions to modify policies.

Option B is wrong because there is no 'encryption at rest' default setting in the RDS console; encryption must be enabled per instance or via other mechanisms. Option D is wrong because CloudFormation StackSets require manual creation and maintenance of templates, and do not enforce encryption if users launch instances outside the stack.

39
MCQmedium

A company is using Amazon DocumentDB (with MongoDB compatibility) for a content management system. The security team requires that all data be encrypted at rest and in transit. The DocumentDB cluster is already encrypted at rest using AWS KMS. To enforce encryption in transit, the security team wants to ensure that all client connections use TLS. The team has enabled the 'tls' parameter in the cluster parameter group. However, a developer reports that they can still connect to the cluster without specifying TLS options using the mongo shell. The developer is connecting from an EC2 instance in the same VPC. The security group for the DocumentDB cluster allows inbound traffic on port 27017 from the EC2 instance's security group. What is the most likely reason the developer can connect without TLS?

A.DocumentDB does not support TLS; it only supports SSL.
B.The EC2 instance is in the same VPC, so TLS is not enforced for intra-VPC traffic.
C.The developer is using an older version of the mongo shell that does not support TLS.
D.The 'tls' parameter was not applied to the cluster because the parameter group was not associated with the cluster or the cluster was not rebooted.
AnswerD

Parameter group changes require a reboot to take effect.

Why this answer

In Amazon DocumentDB, enabling the 'tls' parameter in the cluster parameter group requires the parameter group to be associated with the cluster and the cluster to be rebooted for the change to take effect. If the parameter group was not properly associated or the cluster was not rebooted after modifying the parameter, TLS enforcement would not be active, allowing connections without TLS. Options A, B, and C are incorrect because DocumentDB supports TLS (via SSL), intra-VPC traffic does not bypass TLS, and older mongo shell versions can still use TLS if configured.

Exam trap

Candidates often overlook that parameter group changes in DocumentDB require a cluster reboot to take effect, and that enabling the 'tls' parameter does not immediately force TLS on all connections.

40
MCQmedium

Refer to the exhibit. A database administrator is reviewing the output of 'SHOW FULL PROCESSLIST' on an Amazon RDS for MySQL DB instance. The company's security policy requires that all database users access only the minimum necessary data. Which user's activity should be investigated further?

A.Both users, because they are both accessing the credit_cards table.
B.The admin user, because the query is selecting all columns from the credit_cards table.
C.The app_user, because the query is selecting card_number which is sensitive.
D.Neither user, because the queries are normal for their roles.
AnswerB

This violates the principle of least privilege; the admin should not be selecting all columns.

Why this answer

The admin user is executing a full scan of the credit_cards table, which is a security concern because it could be accessing unnecessary data. The app_user is querying a specific column with a condition, which is more appropriate. The admin user should have a more restrictive query.

Option B is correct. Option A is wrong because the admin user's query is broad. Option C is wrong because the app_user's query is specific.

Option D is wrong because both queries are selecting data, but the admin's is more concerning.

41
Multi-Selecthard

A company uses Amazon DynamoDB with DAX and wants to implement fine-grained access control using IAM. Which THREE conditions can be used in an IAM policy to restrict access to specific items based on the primary key?

Select 3 answers
A.dynamodb:Attributes
B.dynamodb:ReturnValues
C.dynamodb:TableName
D.dynamodb:LeadingKeys
E.dynamodb:Select
AnswersA, D, E

Restricts access to specific attributes (columns).

Why this answer

Options A, D, and E are correct. DynamoDB supports fine-grained access control using IAM conditions: dynamodb:LeadingKeys restricts access based on partition key, dynamodb:Attributes controls access to specific attributes, and dynamodb:Select restricts the use of Select parameters. Option B (dynamodb:ReturnValues) is a write operation parameter, not a condition for access control.

Option C (dynamodb:TableName) identifies the table, not specific items.

42
MCQeasy

A company's security policy requires that all database passwords be rotated every 90 days. The company uses AWS Secrets Manager to store database credentials for Amazon RDS. Which feature can be used to automate password rotation?

A.Configure automatic rotation in Secrets Manager with a rotation interval of 90 days.
B.Use an AWS Lambda function triggered by Amazon CloudWatch Events every 90 days to rotate the password.
C.Use IAM Access Analyzer to detect unused passwords and rotate them.
D.Store the password in AWS Systems Manager Parameter Store and use automatic rotation.
AnswerA

Secrets Manager can automatically rotate RDS credentials on a schedule.

Why this answer

Secrets Manager has built-in rotation support for RDS databases. Option B is wrong because Lambda can be used but is not a feature of Secrets Manager itself; the managed rotation is the simplest. Option C is wrong because IAM Access Analyzer is for analyzing resource policies, not password rotation.

Option D is wrong because Systems Manager Parameter Store does not have built-in rotation for RDS.

43
MCQmedium

A company is using Amazon Aurora MySQL-Compatible Edition. The security team wants to restrict access to the database so that only specific applications running on Amazon EC2 instances can connect. The EC2 instances are in the same VPC as the Aurora cluster. Which combination of steps should be taken to enforce this restriction?

A.Enable IAM database authentication and create database users for each application.
B.Modify the DB subnet group to include only subnets where the EC2 instances reside.
C.Use a network ACL to allow traffic only from the EC2 instances' IP addresses.
D.Configure the Aurora cluster's security group to allow inbound traffic from the EC2 instances' security group.
AnswerD

Security group rules can reference other security groups.

Why this answer

Configuring the Aurora cluster's security group to allow inbound traffic from the EC2 instances' security group is the correct approach because security groups can reference other security groups as a source, enabling dynamic, instance-level access control without managing individual IP addresses. Option A is incorrect because IAM database authentication manages user authentication at the database level, not network access. Option B is incorrect because the DB subnet group defines the subnets where the Aurora cluster can be placed, not traffic filtering rules.

Option C is incorrect because network ACLs are stateless and operate at the subnet boundary, making them less granular and harder to manage for instance-specific access compared to security group references.

44
MCQmedium

A security team is investigating a potential data breach in an Amazon RDS for SQL Server database. They need to determine which user executed a specific DELETE statement at a particular time. What should they do?

A.Enable AWS CloudTrail for the RDS instance.
B.Enable audit logs for the RDS instance and send them to CloudWatch Logs.
C.Enable VPC Flow Logs for the database subnet.
D.Enable AWS Trusted Advisor.
AnswerB

Audit logs record SQL statements and can be analyzed.

Why this answer

Enabling audit logs for the RDS for SQL Server instance captures detailed SQL statement execution, including the users and timestamps. Sending these logs to CloudWatch Logs allows for easy searching and alerting. Option B is correct because it directly addresses the need to identify the user who executed a specific SQL statement.

Option A is incorrect because AWS CloudTrail logs API actions (e.g., creating or modifying RDS instances), not SQL queries. Option C is incorrect because VPC Flow Logs capture network traffic metadata, not database-level activity. Option D is incorrect because AWS Trusted Advisor provides best-practice checks and does not offer fine-grained auditing.

45
MCQmedium

A company has an Amazon RDS for MySQL DB instance that is publicly accessible. The security team wants to restrict access to only specific IP addresses. Which configuration should be used?

A.Create a VPC endpoint for RDS and attach a policy that allows only the specific IP addresses.
B.Use an IAM policy with a condition that restricts the source IP address.
C.Configure a security group associated with the RDS instance to allow inbound traffic only from the specific IP addresses.
D.Configure a network ACL to allow inbound traffic from the specific IP addresses.
AnswerC

Security groups can restrict inbound traffic by IP address.

Why this answer

A security group associated with the RDS instance can be configured to restrict inbound traffic to specific IP addresses, even if the instance is publicly accessible. Option A is incorrect because a VPC endpoint is used for private connectivity from within a VPC, not for restricting public access. Option B is incorrect because IAM policies control permissions for API actions, not network-level access.

Option D is incorrect because network ACLs are stateless and applied at the subnet level, and while they can filter IP traffic, security groups are the more appropriate and granular control for individual RDS instances.

46
MCQeasy

A security engineer reviews the IAM policy attached to a user. The user is unable to modify any RDS DB instance, even when MFA is enabled. What is the most likely cause?

A.The policy is missing the ec2:ModifyInstance permission.
B.The policy does not include a Deny statement for RDS actions.
C.The user does not have MFA enabled, or the instance name does not match the allowed prefixes.
D.The user is trying to use the RDS console, but the policy only allows API calls.
AnswerC

Correct. The most likely cause is that the IAM policy requires MFA and matching instance name prefixes, which are not satisfied.

Why this answer

The scenario states that the user cannot modify any RDS DB instance even when MFA is enabled. This suggests that the IAM policy likely includes a condition requiring MFA or a specific resource prefix (e.g., 'prod-*' or 'dev-*'). If MFA is not actually enabled on the user's account, or if the instance name does not match the allowed prefixes, the condition would fail, denying all ModifyDBInstance actions.

Option A is incorrect because EC2 permissions are irrelevant to RDS. Option B is incorrect because the absence of a Deny statement does not cause failure; the issue is an Allow condition not being met. Option D is incorrect because the console versus API distinction does not explain the inability to modify any instance.

47
MCQhard

A company runs an Amazon Aurora MySQL-compatible database cluster. The security team requires that all database credentials be rotated automatically every 30 days. Which combination of AWS services can meet this requirement with minimal operational overhead?

A.Use IAM database authentication and rotate the IAM user keys every 30 days.
B.Store the password in AWS Secrets Manager and enable automatic rotation with a 30-day interval.
C.Use AWS CloudHSM to generate a new password and a Lambda function to update the database.
D.Store the password in AWS Systems Manager Parameter Store and use a scheduled Lambda function to update the password.
AnswerB

Secrets Manager can automatically rotate RDS credentials.

Why this answer

AWS Secrets Manager provides built-in automatic rotation for RDS database credentials. Option A is incorrect because IAM database authentication does not involve password rotation. Option C is incorrect because CloudHSM does not manage password rotation.

Option D is incorrect because Systems Manager Parameter Store lacks built-in rotation capabilities for RDS credentials.

48
MCQeasy

A developer needs to connect to an Amazon RDS for PostgreSQL DB instance from an EC2 instance in the same VPC. What is the most secure way to authenticate the connection without storing database credentials in the application code?

A.Use a hardcoded password in the application configuration file.
B.Store the database password in AWS Secrets Manager and retrieve it at runtime.
C.Enable IAM database authentication and generate an authentication token.
D.Store the password in AWS Systems Manager Parameter Store as a SecureString.
AnswerC

IAM database authentication eliminates the need for a stored password.

Why this answer

IAM database authentication for RDS PostgreSQL allows the application to connect using an IAM user or role without storing any database credentials. The authentication token is generated by the AWS SDK and is valid for 15 minutes. This eliminates the need to store credentials in the application code.

Option A is incorrect because a hardcoded password is not secure. Option B (Secrets Manager) and Option D (Systems Manager Parameter Store SecureString) both require the application to retrieve a secret at runtime, which still introduces credential management overhead and potential exposure. IAM authentication is the most secure option as it removes static credentials entirely.

49
MCQmedium

A security team is auditing an Amazon RDS for SQL Server DB instance. They notice that SSL connections are not enforced. Which configuration change will enforce SSL for all connections?

A.Modify the security group to only allow inbound traffic on port 443.
B.Add the SQL Server SSL option to the option group.
C.Set the 'rds.force_ssl' parameter to 1 in the DB parameter group.
D.Change the DB subnet group to a public subnet.
AnswerC

This parameter forces SSL connections to the SQL Server DB instance.

Why this answer

For Amazon RDS for SQL Server, you can enforce SSL connections by setting the 'rds.force_ssl' parameter to 1 in the DB parameter group. This forces all connections to use SSL. Option A is incorrect because security groups control network access but do not enforce encryption.

Option B is incorrect because the option group manages features such as Transparent Data Encryption (TDE) and native backup/restore, not SSL enforcement. Option D is incorrect because changing the subnet to public would expose the instance to the internet and does not enforce SSL.

50
MCQeasy

A company is using Amazon RDS for MySQL and wants to restrict access to the database based on the source IP address. Which AWS feature should be used to achieve this?

A.DB Parameter Groups
B.VPC Security Groups
C.IAM Database Authentication
D.Network ACLs
AnswerB

Security groups act as a firewall for the DB instance, controlling inbound traffic based on IP or other security groups.

Why this answer

Security groups act as a virtual firewall for RDS instances. You can specify inbound rules that allow traffic only from certain IP addresses or other security groups. Network ACLs are for subnets, not individual instances.

IAM policies control API access, not network traffic. DB parameter groups configure database engine parameters.

51
MCQhard

A financial company uses Amazon RDS for PostgreSQL with a custom parameter group. The security team wants to ensure that all connections to the database are encrypted in transit. Which action should the database administrator take?

A.Attach an IAM role to the RDS instance to authenticate users.
B.Change the database port to 8432 to use a non-standard port.
C.Set 'ssl' to 'off' in the parameter group.
D.Set the parameter 'rds.force_ssl' to 1 in the custom parameter group.
E.Modify the security group to allow inbound traffic only on port 5432 with the '--ssl' option.
AnswerD

Setting 'rds.force_ssl' to 1 forces all connections to use SSL/TLS, ensuring encryption in transit.

Why this answer

Setting the parameter 'rds.force_ssl' to 1 in the RDS for PostgreSQL custom parameter group forces all connections to use SSL/TLS, ensuring encryption in transit. Option A is incorrect because IAM roles provide authentication, not transport encryption. Option B is incorrect because changing the port does not encrypt data.

Option C is incorrect because setting 'ssl' to off disables encryption. Option E is incorrect because modifying a security group to allow inbound traffic on port 5432 does not enforce encryption; the '--ssl' option is a client-side parameter, not enforceable via security groups.

52
MCQhard

A financial services company stores sensitive data in an Amazon DynamoDB table. The security team requires that all data at rest be encrypted with a customer-managed key that is rotated automatically every 12 months. The company also needs to audit key usage. Which solution meets these requirements?

A.Use server-side encryption with S3-managed keys (SSE-S3) for the DynamoDB table.
B.Use AWS CloudHSM to generate and store the encryption key. Configure the application to encrypt data before writing to DynamoDB.
C.Enable encryption at rest using the default DynamoDB encryption option (AWS owned key). Use AWS CloudTrail to audit key usage.
D.Enable encryption at rest using an AWS KMS customer-managed CMK. Configure automatic key rotation with a 12-month period. Use AWS CloudTrail to audit key usage.
AnswerD

Encryption at rest with an AWS KMS customer-managed CMK allows automatic key rotation every 12 months (configurable) and CloudTrail can audit KMS API calls for key usage, meeting all requirements.

Why this answer

DynamoDB supports encryption at rest with AWS KMS customer-managed CMKs. Automatic key rotation every 12 months is a feature of KMS for CMKs. CloudTrail logs KMS API calls for auditing.

Option A is incorrect because SSE-S3 is for S3, not DynamoDB. Option B is incorrect because CloudHSM does not provide automatic key rotation every 12 months and requires application-side encryption. Option C is incorrect because the default DynamoDB encryption uses an AWS owned key, which is not customer-managed and rotates automatically every 3 years, not 12 months.

Option D is correct: it uses a customer-managed CMK with yearly rotation and CloudTrail for auditing.

53
MCQhard

Refer to the exhibit. An engineer runs the CLI command to check security groups attached to the RDS instance 'mydb'. The output shows only one security group. The engineer wants to ensure that only traffic from an application server with IP 10.0.1.5 is allowed to the database port 3306. Which security group rule should be added?

A.Add an inbound rule to allow traffic from 10.0.1.5/32 on port 80.
B.Add an inbound rule to allow traffic from 10.0.1.5/32 on port 3306.
C.Add an outbound rule to allow traffic to 10.0.1.5 on port 3306.
D.Add an inbound rule to allow traffic from 0.0.0.0/0 on port 3306.
AnswerB

Correctly restricts access to the specific IP.

Why this answer

To allow only the specific IP 10.0.1.5 to access the database, an inbound rule must be added to the security group allowing traffic on port 3306 (MySQL/Aurora) from source 10.0.1.5/32. Option B is correct. Option A is incorrect because it uses port 80 (HTTP) instead of the database port.

Option C is incorrect because an outbound rule controls egress, not ingress; inbound rules are needed to allow incoming connections to the database. Option D is incorrect because it allows traffic from any IP (0.0.0.0/0), which is insecure and would violate the requirement to restrict access to a single IP.

54
MCQeasy

A company needs to securely store and manage the master password for their Amazon RDS for PostgreSQL instance. Which AWS service is purpose-built for managing secrets with automatic rotation?

A.AWS Key Management Service (KMS)
B.AWS Secrets Manager
C.AWS Identity and Access Management (IAM)
D.AWS CloudHSM
AnswerB

AWS Secrets Manager is designed for secret management with built-in rotation.

Why this answer

AWS Secrets Manager is designed for secret management with built-in rotation. Option A is wrong because KMS is for encryption keys, not secret management. Option C is wrong because IAM is for identity and access management, not secret storage.

Option D is wrong because CloudHSM provides hardware security modules but not secret rotation.

55
MCQmedium

A company is using an Amazon RDS for MySQL DB instance to store sensitive customer data. A security audit reveals that all database traffic between the application and the database is transmitted in plaintext. Which configuration change would encrypt data in transit for new connections?

A.Modify the DB instance to require SSL/TLS connections and update the application connection string to use SSL.
B.Configure the DB instance to be in a VPC with a VPC peering connection to the application's VPC.
C.Enable encryption at rest for the RDS DB instance using AWS KMS.
D.Enable IAM database authentication for the DB instance.
AnswerA

This encrypts data in transit for new connections.

Why this answer

To encrypt data in transit for new connections to an Amazon RDS for MySQL DB instance, you must modify the DB instance to require SSL/TLS connections. This forces all connections to use SSL/TLS, encrypting the data transmitted between the application and the database. After enabling this, the application connection string must be updated to use SSL (e.g., by adding ssl=true or equivalent).

The other options do not encrypt data in transit: VPC peering (B) does not encrypt traffic; encryption at rest using AWS KMS (C) only protects stored data; and IAM database authentication (D) manages authentication but does not encrypt the connection itself.

56
Multi-Selectmedium

A company is using Amazon RDS for PostgreSQL and wants to implement encryption in transit for all client connections. The security team has identified that some connections are not using SSL. Which TWO actions should the company take to enforce SSL for all connections?

Select 2 answers
A.Set the 'rds.force_ssl' parameter to '1' in the DB parameter group.
B.Install the RDS CA certificate on all client machines.
C.Create a new SSL certificate and associate it with the RDS instance.
D.Configure the application connection string to use 'sslmode=require'.
E.Modify the pg_hba.conf file to require SSL for all users by setting 'hostssl' entries.
AnswersA, E

This parameter forces the PostgreSQL server to reject non-SSL connections.

Why this answer

The correct actions to enforce SSL for all connections are A and E. Option A: Setting 'rds.force_ssl' to '1' in the DB parameter group forces the RDS PostgreSQL instance to require SSL for all incoming connections at the server level. Option E: Modifying the 'pg_hba.conf' file to require SSL for all users via 'hostssl' entries ensures that only SSL connections are allowed, complementing the server-side enforcement.

Option C is incorrect because associating a custom SSL certificate is not required for enforcing SSL; AWS RDS provides a valid certificate. Option B is a client-side configuration that does not enforce server-side SSL. Option D is client-side and not a server-side enforcement action.

Options A and E together provide robust server-side enforcement.

57
MCQmedium

A company has an Amazon RDS for Oracle DB instance that is publicly accessible. They want to restrict access to only a specific CIDR block. Which two actions must be taken together?

A.Modify the VPC security group to allow inbound traffic on the database port from the specific CIDR, and ensure the DB instance is publicly accessible with the correct security group.
B.Modify the DB subnet group to include only subnets from the allowed CIDR.
C.Add a rule to the network ACL to allow inbound traffic from the CIDR.
D.Set the rds.force_ssl parameter to force encrypted connections from the allowed CIDR.
AnswerA

The security group acts as a firewall for the DB instance, and the PubliclyAccessible setting allows it to have a public IP.

Why this answer

You must modify the VPC security group to allow inbound traffic on the database port from the specific CIDR, and the DB instance must be configured as publicly accessible with that security group attached. Option B is wrong because the DB subnet group determines which subnets the instance can be deployed in, not inbound access restrictions. Option C is wrong because network ACLs operate at the subnet level and are less granular; security groups are the appropriate mechanism for RDS access control.

Option D is wrong because the rds.force_ssl parameter enforces encrypted connections but does not restrict by source IP or CIDR.

58
MCQmedium

A database administrator needs to audit all SQL statements executed on an Amazon Aurora MySQL DB cluster, including SELECT queries. Which AWS service should be used to capture and store these logs?

A.Amazon RDS Database Activity Streams
B.Amazon RDS Enhanced Monitoring
C.Amazon CloudWatch Logs
D.Amazon RDS Performance Insights
AnswerA

Database Activity Streams captures database activity including SQL statements and sends to CloudWatch and Kinesis.

Why this answer

Amazon RDS Database Activity Streams (Option A) is the correct service to capture and store audit logs of SQL statements, including SELECT queries, on an Aurora MySQL DB cluster. It streams database activity to Amazon CloudWatch Logs and Amazon Kinesis Data Streams for further analysis and storage. Option B (Amazon RDS Enhanced Monitoring) provides OS-level metrics, not SQL statements.

Option C (Amazon CloudWatch Logs) can store logs but does not capture SQL statements directly; it requires a source like Database Activity Streams. Option D (Amazon RDS Performance Insights) monitors database performance, not SQL audit logs.

59
MCQeasy

A company has an Amazon DynamoDB table with a global secondary index (GSI). The security team wants to ensure that the table and the GSI are encrypted at rest. How can this be achieved?

A.Nothing; DynamoDB encrypts all data at rest by default.
B.Create the table with encryption disabled to avoid performance impact.
C.Enable encryption at rest on the table and the GSI separately.
D.Enable encryption on the GSI using a KMS key.
AnswerA

DynamoDB tables and GSIs are encrypted at rest by default.

Why this answer

DynamoDB encrypts all tables and GSIs at rest by default. Option B is wrong because encryption is always on. Option C is wrong because encryption cannot be disabled.

Option D is wrong because GSIs are automatically encrypted with the table.

60
MCQmedium

A company is using Amazon Aurora MySQL-Compatible Edition. The database administrator wants to restrict a specific user to only execute SELECT statements on a specific database. Which SQL command should the administrator use?

A.ALTER USER 'user'@'%' WITH GRANT OPTION;
B.CREATE USER 'user'@'%' IDENTIFIED BY 'password';
C.REVOKE ALL PRIVILEGES ON db_name.* FROM 'user'@'%';
D.GRANT SELECT ON db_name.* TO 'user'@'%';
AnswerD

Grants SELECT on all tables in the database.

Why this answer

The GRANT SELECT ON db_name.* TO 'user'@'%' command grants SELECT privilege on all tables within the specified database to the user. Option A is incorrect because ALTER USER with GRANT OPTION is used to change user attributes or grant the ability to grant privileges, not to directly grant SELECT. Option B is incorrect because CREATE USER only creates a new user without assigning any privileges.

Option C is incorrect because REVOKE ALL PRIVILEGES removes all privileges from the user, which is opposite of the desired action.

61
MCQhard

A financial services company runs a critical application on Amazon RDS for PostgreSQL. The database stores sensitive customer financial data. The security team has mandated that all access to the database must be through IAM database authentication to eliminate the need for passwords. The application currently uses a master user password stored in AWS Secrets Manager. The DBA needs to implement IAM authentication without downtime. The application is deployed on Amazon ECS and connects to the database using a connection string. The DBA has already created an IAM role for the ECS task with a policy that allows rds-db:connect. The DBA has also modified the DB instance to require SSL. However, after making these changes, the application cannot connect. The error message indicates 'IAM authentication is not enabled for this user'. What step did the DBA miss?

A.The DBA did not create a database user that is set to use IAM authentication.
B.The DBA did not attach the IAM policy to the ECS task role.
C.The DBA did not enable the 'password' authentication method.
D.The DBA did not update the security group to allow traffic on port 5432.
AnswerA

When using IAM database authentication, you must create a database user that is set to authenticate using IAM. This is done by creating the user with the CREATEROLE option and granting rds_iam role. Without this, authentication fails. This is the missed step.

Why this answer

IAM database authentication requires that a database user be created with the IAM authentication method. Specifically, the user must be created with the CREATEROLE privilege and granted the rds_iam role. Without this step, the authentication fails even if the IAM role is correctly configured.

Option B is incorrect because the IAM policy was already attached. Option C is incorrect because IAM authentication does not require a password; it uses authentication tokens. Option D is incorrect because the security group and port are not related to IAM authentication.

62
Multi-Selecthard

A company uses Amazon RDS for SQL Server with Multi-AZ deployment. The security team wants to ensure that all data at rest is encrypted using a customer-managed KMS key in both the primary and standby instances. Which THREE actions are required?

Select 3 answers
A.Create a separate KMS key for the standby instance.
B.Specify a customer-managed KMS key during creation.
C.Enable Transparent Data Encryption (TDE) on the instance.
D.Enable Multi-AZ with encryption enabled.
E.Enable encryption at rest when creating the DB instance.
AnswersB, D, E

Customer-managed key is required.

Why this answer

Options B, D, and E are correct. To encrypt data at rest with a customer-managed KMS key, you must specify the KMS key during DB instance creation (B). Multi-AZ with encryption enabled (D) ensures both primary and standby instances are encrypted.

Encryption at rest must be enabled when creating the DB instance (E); it cannot be added later. Option A is wrong because a separate KMS key is not required—the same key encrypts both instances. Option C is wrong because Transparent Data Encryption (TDE) is a SQL Server feature for encrypting the database files, but RDS handles encryption at the storage layer using KMS, not TDE.

TDE is not applicable when using RDS encryption with KMS.

63
MCQeasy

A developer is writing an AWS Lambda function that needs to access a Secrets Manager secret to retrieve database credentials. The Lambda function has an IAM role. Which action must be allowed in the IAM policy?

A.kms:Decrypt
B.secretsmanager:PutSecretValue
C.secretsmanager:ListSecrets
D.secretsmanager:GetSecretValue
AnswerD

This is required to retrieve the secret.

Why this answer

The Lambda function must call secretsmanager:GetSecretValue to retrieve the secret. Option A (kms:Decrypt) may be necessary if the secret is encrypted with a KMS key, but it is not the primary action. Option B (secretsmanager:PutSecretValue) is for updating secrets, not reading.

Option C (secretsmanager:ListSecrets) only lists secret names, not the actual values.

64
Multi-Selectmedium

A company uses Amazon RDS for PostgreSQL to store customer data. The security team wants to audit all SQL queries executed against the database, including SELECT statements. Which TWO actions should be taken to achieve this?

Select 2 answers
A.Install the pgaudit extension in the DB instance.
B.Enable the 'log_connections' and 'log_disconnections' parameters.
C.Set the 'pgaudit.log' parameter to include 'read' and 'write' statements.
D.Set the 'audit_log_enabled' parameter to 1 in the DB parameter group.
E.Enable Database Activity Streams on the DB instance.
AnswersA, C

pgaudit is the standard extension for PostgreSQL audit logging.

Why this answer

To audit SQL queries on Amazon RDS for PostgreSQL, the pgaudit extension must be installed (Option A). Then, the 'pgaudit.log' parameter must be set to include 'read' and 'write' statements to capture SELECT and DML operations (Option C). Option B enables connection logging but not query auditing.

Option D ('audit_log_enabled') is for MySQL, not PostgreSQL. Option E (Database Activity Streams) provides a different auditing mechanism that may not capture all SQL queries and requires additional setup.

65
MCQeasy

A company wants to audit all SQL statements executed on their RDS for PostgreSQL database. Which AWS service should they use?

A.AWS Database Migration Service (DMS)
B.VPC Flow Logs
C.Amazon RDS Performance Insights
D.CloudWatch Logs with PostgreSQL audit logs
AnswerD

Enable pgaudit extension and publish logs to CloudWatch Logs.

Why this answer

For auditing SQL statements on Amazon RDS for PostgreSQL, you enable the PostgreSQL Audit Extension (pgaudit) and configure it to send logs to Amazon CloudWatch Logs. CloudWatch Logs can then be used to monitor, store, and access the SQL audit logs. Option A (AWS Database Migration Service) is used for migrating databases, not auditing.

Option B (VPC Flow Logs) captures IP traffic metadata, not SQL statements. Option C (Amazon RDS Performance Insights) monitors database performance metrics, not individual SQL statements.

66
Multi-Selecthard

Which TWO actions can be used to encrypt an existing unencrypted Amazon RDS for MySQL DB instance? (Choose 2.)

Select 2 answers
A.Create a read replica with encryption enabled.
B.Enable SSL on the DB instance.
C.Create a new encrypted DB instance and migrate data using database dump and restore.
D.Take a snapshot of the DB instance, copy it with encryption enabled, and restore from the encrypted snapshot.
E.Modify the DB instance and enable encryption.
AnswersC, D

Migrating to a new encrypted instance is another valid method.

Why this answer

To encrypt an existing unencrypted RDS for MySQL DB instance, you cannot modify the instance directly (option E is incorrect). You can either take a snapshot, copy it with encryption enabled, and restore from the encrypted snapshot (option D), or create a new encrypted DB instance and migrate data using database dump and restore (option C). Option A is incorrect because creating a read replica with encryption enabled does not encrypt the source instance.

Option B is incorrect because enabling SSL encrypts data in transit, not at rest.

67
MCQmedium

A company uses Amazon Redshift for data warehousing. The security team requires that all data be encrypted at rest with a customer-managed key, and that the key be rotated every year. Which configuration meets these requirements?

A.Launch the Redshift cluster without encryption and enable encryption later using AWS CloudHSM.
B.Launch the Redshift cluster with encryption enabled using an S3-managed key.
C.Launch the Redshift cluster with encryption enabled using a customer-managed KMS key with automatic annual rotation.
D.Launch the Redshift cluster with encryption enabled using a KMS key and configure the cluster to use an HSM for key storage.
AnswerC

This meets both requirements.

Why this answer

Amazon Redshift supports encryption at rest using a KMS key. You can enable automatic key rotation on a customer-managed KMS key. Option A is wrong because launching without encryption and enabling later using CloudHSM is not supported; Redshift does not support enabling encryption after launch without reloading data, and CloudHSM requires manual key rotation.

Option B is wrong because Redshift does not use S3-managed keys for encryption; you must use a KMS key or HSM. Option C is correct because it meets the requirements. Option D is wrong because using an HSM for key storage does not provide automatic key rotation; you would need to rotate the key manually.

68
MCQmedium

An IAM policy is attached to a role used by an application to access an Amazon RDS for MySQL DB instance. The DB instance is encrypted with a customer-managed KMS key. The application is unable to create a snapshot of the encrypted DB instance. Which missing permission is the most likely cause?

A.kms:ReEncrypt
B.kms:DescribeKey
C.kms:CreateGrant
D.kms:Encrypt
AnswerC

RDS needs kms:CreateGrant to authorize RDS to use the KMS key for snapshot operations.

Why this answer

To create a snapshot of an encrypted RDS DB instance, the IAM role must have the kms:CreateGrant permission on the customer-managed KMS key. This permission allows RDS to create a grant that enables it to use the key for encrypting the snapshot. Without kms:CreateGrant, the snapshot creation fails.

Options A (kms:ReEncrypt), B (kms:DescribeKey), and D (kms:Encrypt) are not required for this operation.

69
MCQeasy

A company has an Amazon S3 bucket that stores database backup files. The backups are encrypted using server-side encryption with AWS KMS (SSE-KMS). The security team wants to ensure that only a specific IAM role can decrypt the backups when restoring the database. Which policy should be attached to the KMS key to achieve this?

A.An S3 bucket policy that grants kms:Decrypt to the IAM role.
B.An S3 bucket policy that grants s3:GetObject to the IAM role.
C.An IAM policy attached to the role that grants kms:Decrypt.
D.A KMS key policy that grants kms:Decrypt to the IAM role.
AnswerD

The KMS key policy controls who can use the key for decryption.

Why this answer

A KMS key policy can grant the kms:Decrypt permission to a specific IAM role, ensuring only that role can decrypt the backups. Option A is incorrect because an S3 bucket policy cannot grant kms:Decrypt; KMS permissions are controlled via KMS key policies or IAM policies. Option B is incorrect because s3:GetObject alone does not enable decryption of SSE-KMS encrypted objects; decryption also requires kms:Decrypt.

Option C is incorrect because an IAM policy attached to the role that grants kms:Decrypt is not sufficient unless the KMS key policy also allows the role to use the key; the key policy must explicitly grant permission to the role or the root account.

70
MCQhard

A company is using an Amazon DynamoDB table with a global table configuration across two AWS regions. The security team wants to ensure that all data is encrypted in transit between the regions. What should the team do?

A.Configure an Internet gateway in each region and enforce HTTPS for all traffic.
B.Use AWS CloudFront to route traffic between the regions with SSL/TLS termination.
C.Set up a VPC peering connection between the two regions and route DynamoDB traffic through it.
D.No additional action is required; DynamoDB global tables encrypt all replication traffic in transit by default.
AnswerD

Replication traffic between regions is automatically encrypted.

Why this answer

DynamoDB global tables automatically encrypt all replication traffic in transit using TLS, so no additional configuration is required. Option A is incorrect because internet gateways are not involved in inter-region replication; DynamoDB global tables use the AWS backbone network. Option B is incorrect because CloudFront is a content delivery network and does not handle DynamoDB replication traffic.

Option C is incorrect because VPC peering is not required; global tables operate outside of VPCs and do not traverse VPC peering connections.

71
MCQeasy

A developer needs to grant an IAM user permission to perform automated backups of an Amazon RDS DB instance. Which IAM action should be allowed?

A.rds:BackupDBInstance
B.rds:CreateDBSnapshot
C.rds:RestoreDBInstanceFromDBSnapshot
D.rds:ModifyDBInstance
AnswerD

rds:ModifyDBInstance allows modifying the backup retention period to enable automated backups, which is the correct action for automated backups.

Why this answer

The question asks for the IAM action to perform automated backups of an Amazon RDS DB instance. Automated backups are managed by setting the backup retention period, which is configured using the ModifyDBInstance API call. Therefore, the correct IAM action is rds:ModifyDBInstance (option D).

Option A (rds:BackupDBInstance) is not a valid IAM action. Option B (rds:CreateDBSnapshot) is for manual snapshots, not automated backups. Option C (rds:RestoreDBInstanceFromDBSnapshot) is for restoration.

72
MCQmedium

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 key stored in AWS CloudHSM. What must be done to meet this requirement?

A.Enable RDS encryption at rest using a KMS key backed by CloudHSM.
B.Create an encrypted file system on the RDS instance using CloudHSM.
C.Configure SSL/TLS for the database connection.
D.Use Oracle Transparent Data Encryption (TDE) with CloudHSM as the key store.
AnswerD

RDS Oracle supports TDE with CloudHSM.

Why this answer

Use Oracle Transparent Data Encryption (TDE) with CloudHSM as the key store. RDS for Oracle supports TDE, which allows encryption at rest using keys stored in CloudHSM. Option A is incorrect because RDS encryption at rest uses AWS KMS, and while KMS can use a CloudHSM key as a custom key store, the question specifies the key must be stored in CloudHSM directly, which is achieved via TDE integration.

Option B is incorrect because RDS does not support custom file system encryption; encryption at rest is managed at the database or instance level. Option C is incorrect because SSL/TLS provides encryption in transit, not at rest.

73
MCQhard

A company wants to audit all SQL queries made to their Amazon RDS for MySQL database. Which AWS service should they use?

A.VPC Flow Logs
B.AWS Config
C.AWS CloudTrail
D.Database Activity Streams
AnswerD

Database Activity Streams for Amazon RDS for MySQL push transactional logs directly to Amazon Kinesis, enabling near-real-time capture of all SQL queries at the database engine level. This satisfies the audit requirement without enabling slow query logs or general logs, which would impose performance overhead. The stream integrates with AWS CloudTrail and third-party monitoring tools for compliance analysis.

Why this answer

Database Activity Streams (D) is the correct choice because it provides a near-real-time stream of database activity, including all SQL queries, directly from the RDS for MySQL engine. This service integrates with AWS services like Amazon Kinesis and third-party monitoring tools to capture and audit every SQL statement, user login, and schema change at the database engine level, which is essential for comprehensive auditing.

Exam trap

The trap here is that candidates often confuse CloudTrail (which logs AWS API calls) with database-level auditing, failing to recognize that CloudTrail does not capture SQL queries executed inside the database engine.

How to eliminate wrong answers

Option A is wrong because VPC Flow Logs capture IP traffic metadata (source/destination IP, ports, protocol) at the network interface level, not SQL query content or database operations. Option B is wrong because AWS Config records resource configuration changes (e.g., DB instance settings, security group rules) and evaluates compliance, but it does not capture SQL query execution or database-level activity. Option C is wrong because AWS CloudTrail logs API calls made to the RDS service (e.g., CreateDBInstance, ModifyDBInstance) but does not capture SQL queries executed within the database session itself.

74
MCQhard

A company is migrating an on-premises Oracle database to Amazon RDS for Oracle. The database contains personally identifiable information (PII). The security team requires that all PII columns be transparently encrypted and that the encryption keys be stored in AWS CloudHSM. Which solution meets these requirements?

A.Enable Amazon RDS encryption at rest using a KMS key and rely on that encryption.
B.Modify the Oracle database to use AWS KMS for column-level encryption.
C.Use Oracle Data Pump to export data with encryption and store the encryption key in AWS Secrets Manager.
D.Use Oracle Transparent Data Encryption (TDE) with AWS CloudHSM as the key store.
AnswerD

Oracle TDE provides transparent column encryption, and CloudHSM can serve as the hardware security module for key storage.

Why this answer

Oracle Transparent Data Encryption (TDE) with AWS CloudHSM as the key store enables transparent encryption of PII columns and stores the encryption keys in CloudHSM, meeting the security requirements. Option A is wrong because Amazon RDS encryption at rest uses AWS KMS, not CloudHSM, and it encrypts the entire database instance, not specific columns. Option B is wrong because modifying an Oracle database to use AWS KMS for column-level encryption is not supported natively in RDS; Oracle TDE is required for transparent column encryption.

Option C is wrong because Oracle Data Pump is an export/import utility, not a column-level encryption solution; it does not provide transparent encryption of PII columns in the live database.

75
Multi-Selecthard

A company is using Amazon Redshift and needs to comply with regulatory requirements that mandate encryption of all data at rest and control of the encryption keys. Which THREE steps should be taken? (Choose THREE.)

Select 3 answers
A.Enable automatic key rotation for the KMS key.
B.Configure the cluster to use a customer-managed KMS key.
C.Use AWS CloudHSM to generate and manage encryption keys.
D.Enable encryption on the cluster after creation by modifying the cluster.
E.Create the cluster with encryption enabled using a KMS key.
AnswersA, B, E

Automatic rotation helps meet compliance requirements.

Why this answer

Enabling automatic key rotation for the KMS key ensures that encryption keys are rotated regularly, meeting key control requirements. Option B is correct because using a customer-managed KMS key allows the company to control the encryption keys themselves. Option E is correct because Amazon Redshift requires encryption to be enabled at cluster creation time, and using a KMS key accomplishes this.

Option C is incorrect because AWS CloudHSM is not necessary for this requirement; KMS provides sufficient key management. Option D is incorrect because encryption cannot be enabled on an existing Redshift cluster; it must be enabled at creation.

Page 1 of 5 · 310 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Database Security questions.