Courseiva

CCNA Db Security Questions

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

226
MCQeasy

A database specialist is troubleshooting a connectivity issue with an Amazon RDS for PostgreSQL instance. The instance is in a VPC with a public subnet. The security group allows inbound traffic on port 5432 from the application server's IP address. The application server is in the same VPC but in a private subnet. Despite the security group configuration, the application cannot connect. Which action should the specialist take to resolve the issue?

A.Launch the RDS instance in the default VPC.
B.Change the DB subnet group to include the application server's subnet.
C.Add a network ACL rule allowing inbound traffic on port 5432 from the application server's public IP.
D.Modify the RDS instance to be publicly accessible.
E.Update the security group inbound rule to allow traffic from the application server's private IP address.
AnswerE

The application connects from its private IP within the VPC, so the security group should allow that private IP.

Why this answer

The application server is in a private subnet, so it communicates with the RDS instance using its private IP address. The security group inbound rule must allow traffic from the application server's private IP (or the security group of the application server) on port 5432. The current rule only allows the application server's public IP, which is not used for traffic within the VPC, causing the connection failure.

Exam trap

The trap here is that candidates may confuse public and private IP addressing within a VPC, assuming that allowing the application server's public IP in the security group is sufficient, when in fact traffic between instances in the same VPC always uses private IPs.

How to eliminate wrong answers

Option A is wrong because launching the RDS instance in the default VPC does not resolve the IP mismatch; the application server's private IP would still need to be allowed in the security group. Option B is wrong because the DB subnet group defines which subnets the RDS instance can be placed in, not which subnets can connect to it; the application server's subnet is irrelevant for connectivity rules. Option C is wrong because network ACLs are stateless and apply at the subnet level, but the issue is that the security group is allowing the wrong IP (public instead of private); additionally, the application server's public IP is not used for VPC-internal traffic.

Option D is wrong because making the RDS instance publicly accessible would expose it to the internet, which is unnecessary and less secure; the application server is in the same VPC, so private connectivity should be used.

227
Multi-Selectmedium

A company is deploying a new application on Amazon RDS for PostgreSQL. The security policy requires that all data be encrypted at rest and in transit. Which TWO actions should the company take to meet these requirements?

Select 2 answers
A.Use a client-side encryption library to encrypt data before sending to the database.
B.Enable encryption for automated backups separately.
C.Enable encryption at rest by specifying a KMS key when creating the DB instance.
D.Create an encrypted read replica and promote it to master.
E.Set the parameter rds.force_ssl to 1 in the DB parameter group.
AnswersC, E

This encrypts the data at rest.

Why this answer

To encrypt data at rest, you must enable encryption when creating the DB instance by specifying a KMS key (Option C). RDS automatically encrypts automated backups for encrypted instances, so Option B is unnecessary. To encrypt data in transit, you must enforce SSL/TLS connections by setting the parameter rds.force_ssl to 1 in the DB parameter group (Option E).

Option A is incorrect because client-side encryption is not required when using RDS encryption and SSL; the requirement is to use RDS features. Option D is incorrect because creating an encrypted read replica does not encrypt the original master instance; you need to enable encryption on the master from the start.

228
Multi-Selectmedium

A company is migrating an on-premises Oracle database to Amazon RDS for Oracle. The security team requires that all connections to the database be encrypted in transit. Which TWO steps should be taken to enforce this requirement?

Select 2 answers
A.Set the rds.force_ssl parameter to 1 in the DB parameter group.
B.Configure the database to require a client-side SSL/TLS certificate.
C.Enable Oracle native network encryption (NNE) in the sqlnet.ora file.
D.Use AWS Secrets Manager to store database credentials and enable Kerberos authentication.
E.Use AWS Direct Connect or a VPN to connect to the VPC.
AnswersA, B

Setting the rds.force_ssl parameter to 1 in the DB parameter group forces all connections to the Oracle RDS instance to use SSL/TLS encryption. This is the direct method to enforce encryption in transit for Amazon RDS for Oracle, as it rejects any non-SSL connections at the database level.

Why this answer

The correct steps are A and B. Setting the rds.force_ssl parameter to 1 in the DB parameter group forces all connections to use SSL/TLS on the server side. Additionally, configuring the database to require a client-side SSL/TLS certificate provides mutual authentication and ensures that only clients with valid certificates can connect, thereby enforcing encryption in transit from both ends.

Exam trap

The trap here is that candidates may confuse Oracle Native Network Encryption (NNE) with SSL/TLS, but RDS for Oracle does not support NNE; only SSL/TLS is available for encryption in transit.

229
MCQeasy

A developer accidentally exposed an Amazon RDS snapshot to the public. What is the quickest way to remediate this issue?

A.Delete the snapshot and create a new one from the source DB instance.
B.Copy the snapshot to a new snapshot and delete the original.
C.Share the snapshot with only the required AWS account.
D.Modify the snapshot permissions to set it to private.
AnswerD

Modifying the snapshot permissions to private immediately revokes public access. This is the quickest remediation.

Why this answer

The quickest remediation is to modify the snapshot permissions to make it private. This immediately revokes public access. Option A is incorrect because deleting the snapshot would remove the backup entirely, which is unnecessary and could risk data loss if no other backup exists.

Option B is incorrect because copying the snapshot does not change the original's permissions; the original remains public. Option C is incorrect because sharing with a specific account does not revoke public access; it only adds an additional permission. Therefore, modifying the snapshot to private is the direct and fastest fix.

230
MCQeasy

A security audit reveals that an Amazon RDS for MySQL DB instance is accessible from the internet. The security team requires that the database be accessible only from a specific set of application servers within the same VPC. Which solution should be implemented?

A.Modify the DB instance's security group to allow inbound traffic only from the application servers' security group.
B.Apply a network ACL that denies inbound traffic from 0.0.0.0/0 and allows from the application servers' IP range.
C.Enable encryption at rest on the DB instance to prevent unauthorized access.
D.Move the DB instance to a private subnet and configure a bastion host for access.
AnswerA

Security group references allow traffic from instances with that security group.

Why this answer

Modifying the DB instance's security group to allow inbound traffic only from the application servers' security group restricts access to only those instances, using the security group as a source for a more dynamic and manageable solution. Option B is incorrect because network ACLs are stateless and apply at the subnet level, not the instance level, and allowing from the application servers' IP range is less flexible and secure than using security group references. Option C is incorrect because enabling encryption at rest protects data at rest but does not control network access.

Option D is incorrect because moving to a private subnet and using a bastion host is unnecessary when the application servers are in the same VPC; a security group rule is simpler and more appropriate.

231
MCQeasy

A company needs to rotate the master user password for an Amazon RDS for MySQL DB instance. What is the recommended way to do this without downtime?

A.Modify the DB instance and set a new password, which will cause a reboot for the change to take effect.
B.Update the DB parameter group with the new password.
C.Use the AWS Management Console, CLI, or API to modify the DB instance with a new master password.
D.Delete the DB instance and launch a new one with the new password.
AnswerC

The password change is applied immediately without requiring a reboot.

Why this answer

Using the AWS Management Console, CLI, or API to modify the DB instance with a new master password updates the password without any downtime or reboot. Option A is incorrect because modifying the DB instance and setting a new password does not cause a reboot; password changes take effect immediately. Option B is incorrect because updating the DB parameter group does not change the master password.

Option D is incorrect because deleting and relaunching the instance is unnecessary and would cause downtime.

232
MCQhard

A company uses Amazon Redshift for data warehousing. The security team requires that all data loaded into the cluster be encrypted at rest using a customer-managed KMS key. The cluster is currently unencrypted. What is the most efficient way to achieve this requirement with minimal data loss?

A.Unload the data from the existing cluster to S3, create a new encrypted cluster using the KMS key, and reload the data from S3.
B.Change the cluster parameter group to enable encryption.
C.Modify the cluster and enable encryption in the Redshift console.
D.Take a snapshot of the cluster, copy the snapshot with encryption, and restore from the encrypted snapshot.
AnswerA

This is the recommended approach to migrate data to an encrypted cluster.

Why this answer

An existing unencrypted Redshift cluster cannot be encrypted in place. The only way to achieve encryption using a customer-managed KMS key is to unload the data to S3, create a new encrypted cluster with the desired KMS key, and reload the data. Options B, C, and D are incorrect because Redshift does not support enabling encryption on an existing cluster, modifying an existing cluster to enable encryption, or adding encryption to an unencrypted snapshot.

233
MCQhard

A company uses an Amazon RDS for PostgreSQL database with Multi-AZ deployment. The security team wants to audit all SQL queries executed against the database for compliance purposes. Which solution should be implemented to capture and store the queries?

A.Use AWS CloudTrail to capture SQL queries.
B.Enable Performance Insights and store the data in CloudWatch Logs.
C.Enable RDS event notifications for database queries.
D.Enable PostgreSQL query logging and publish logs to Amazon CloudWatch Logs.
AnswerD

PostgreSQL can log all queries, and those logs can be sent to CloudWatch Logs for storage and analysis.

Why this answer

Enabling PostgreSQL query logging and publishing those logs to CloudWatch Logs captures all SQL queries for auditing. Option A is wrong because CloudTrail captures API calls, not SQL queries. Option B is wrong because Performance Insights captures performance metrics, not the text of SQL queries.

Option C is wrong because RDS event notifications are for database events (e.g., failover, scaling), not for capturing SQL query text.

234
MCQeasy

A developer accidentally deleted an RDS database. Which action will allow the database to be restored with the least data loss?

A.Restore from the latest automated backup using point-in-time recovery.
B.Use the 'Recycle Bin' feature to recover the RDS instance.
C.Restore from the latest manual snapshot.
D.Create a new RDS instance and hope for the best.
AnswerA

Automated backups allow restoration to any point within the retention period, minimizing data loss.

Why this answer

Point-in-time recovery (PITR) allows you to restore an RDS DB instance to any second within the automated backup retention period, typically up to the last five minutes. This minimizes data loss because it replays transaction logs from the latest automated backup to the specified time, recovering changes made right up to the deletion moment. Automated backups are enabled by default with a 7-day retention, making PITR the most granular recovery option.

Exam trap

The trap here is that candidates may assume manual snapshots are the safest recovery method, but they lack the transaction log replay capability of PITR, leading to greater data loss than using automated backups with point-in-time recovery.

How to eliminate wrong answers

Option B is wrong because the Recycle Bin feature is available for Amazon RDS only in certain AWS Regions and for specific instance types, and it retains deleted instances for a limited time (default 1 day) but does not recover transaction logs, so data loss can be greater than PITR. Option C is wrong because manual snapshots capture the database at a specific point in time and do not include transaction logs for replay, so you lose all changes made after the snapshot was taken. Option D is wrong because creating a new RDS instance without restoring from a backup results in a blank database, losing all data entirely.

235
MCQhard

A company has an Amazon RDS for SQL Server Multi-AZ DB instance with a standby replica in a different AWS Region. The database is encrypted with a KMS key. The company needs to implement automated backups that are also encrypted and stored in a cross-region S3 bucket. The backups must be retained for 3 years. Which solution meets these requirements with the LEAST administrative effort?

A.Configure RDS to send automated backups directly to the cross-region S3 bucket using the AWS Backup service.
B.Enable automated backups on the RDS instance, configure cross-Region backup copy to a destination Region, and store the backups in an S3 bucket with S3 Object Lock enabled for retention.
C.Use AWS Database Migration Service (DMS) to continuously replicate the database to an S3 bucket in the target region.
D.Create manual snapshots of the RDS instance, copy them to the cross-region S3 bucket using AWS CLI, and set a lifecycle policy for retention.
AnswerA

AWS Backup can automate RDS backups and store them in a cross-region S3 bucket, fulfilling all requirements with minimal effort.

Why this answer

AWS Backup can be used to manage automated backups of RDS instances and store them in a cross-region S3 bucket. AWS Backup natively supports RDS and allows you to create backup plans that automatically take snapshots and copy them to a different region, storing them in S3. The backups are encrypted using the KMS key, and you can set retention policies for 3 years.

This solution requires minimal administrative effort as AWS Backup automates the entire process. Option B is incorrect because RDS cross-Region backup copy stores backups in the destination region's RDS-managed storage, not in an S3 bucket as required. Option C is incorrect because AWS DMS is designed for migrations, not for ongoing backup management.

Option D is incorrect because manual snapshots require manual intervention and do not provide automated backups.

236
MCQhard

A company is using Amazon DynamoDB with client-side encryption using the DynamoDB Encryption Client. The encryption keys are stored in AWS KMS. The security team wants to ensure that the encryption keys can be used only by authorized applications. What should be done?

A.Store the encryption keys in AWS CloudHSM instead of KMS.
B.Use AWS Secrets Manager to store the encryption keys and rotate them automatically.
C.Use an IAM policy that denies access to the DynamoDB table unless the request includes the correct key.
D.Use a KMS key policy that grants access only to the specific IAM roles used by the applications.
AnswerD

KMS key policies can restrict which principals can use the key.

Why this answer

A KMS key policy that restricts decryption permissions to specific IAM roles ensures only authorized applications can use the client-side encryption keys. Option A is incorrect because storing keys in CloudHSM does not by itself enforce application-level authorization; key policies are still needed. Option B is incorrect because Secrets Manager is for storing secrets, not for managing key permissions; it does not replace KMS key policies.

Option C is incorrect because IAM policies alone cannot deny DynamoDB access based on encryption keys; access control is managed via the key policy and IAM permissions.

237
MCQeasy

Refer to the exhibit. A developer created an IAM policy with the above command and attached it to a user. What is the security implication of this policy?

A.The policy restricts access to only one specific DB instance.
B.The policy allows only actions in the us-east-1 region.
C.The policy grants full administrative access to all RDS resources in the account.
D.The policy only allows read-only access to RDS.
AnswerC

This is the security risk.

Why this answer

The policy allows all RDS actions on all resources, granting full administrative access to all RDS resources in the account. This is overly permissive and violates the principle of least privilege. Option A is wrong because the policy does not restrict to a specific region.

Option B is wrong because it does not restrict to a specific region. Option D is wrong because it does not restrict to read-only access.

238
Multi-Selectmedium

Which TWO actions should a company take to secure an Amazon RDS for MySQL database that is accessible from the internet? (Choose two.)

Select 2 answers
A.Use a security group that restricts inbound traffic to only the required IP addresses.
B.Disable encryption at rest to reduce latency.
C.Use the default VPC with a public subnet and a network ACL that allows all traffic.
D.Launch the DB instance in a public subnet with a public IP address.
E.Place the DB instance in a private subnet without a public IP address.
AnswersA, E

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

Why this answer

Options A and E are correct. Option A: Using a security group to restrict inbound traffic to only required IP addresses limits exposure to the internet. Option E: Placing the DB instance in a private subnet without a public IP address ensures it is not directly accessible from the internet.

Option B is incorrect because disabling encryption at rest reduces security and does not address internet accessibility. Option C is incorrect because using the default VPC with a public subnet and a network ACL that allows all traffic increases exposure. Option D is incorrect because launching the DB instance in a public subnet with a public IP address makes it directly reachable from the internet.

239
MCQeasy

A company wants to centrally manage database user credentials and rotate them automatically. The database is an Amazon RDS for MySQL instance. Which AWS service should be used?

A.AWS Secrets Manager
B.AWS CloudHSM
C.AWS Identity and Access Management (IAM)
D.AWS Systems Manager Parameter Store
AnswerA

Correct. AWS Secrets Manager provides centralized management and automatic rotation of RDS MySQL credentials.

Why this answer

AWS Secrets Manager (option A) is the correct service because it is designed to centrally manage database credentials and can automatically rotate them for Amazon RDS for MySQL instances on a schedule you define. Option B (AWS CloudHSM) provides hardware security modules for cryptographic key storage, not credential management or rotation. Option C (IAM) is used for controlling access to AWS resources and supports IAM database authentication for RDS, but it does not manage database user passwords or provide automatic rotation of those passwords.

Option D (AWS Systems Manager Parameter Store) can store secrets securely, but it does not offer native automatic rotation of RDS database credentials; that functionality requires Secrets Manager.

Exam trap

A common trap is to choose IAM (option C) because IAM database authentication allows database access without passwords. However, the requirement is to manage database user credentials and rotate them automatically, which is a core feature of Secrets Manager, not IAM.

240
Multi-Selectmedium

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

Select 2 answers
A.VPC security groups
B.DB subnet groups
C.AWS WAF
D.IAM policies
E.DB parameter groups
AnswersA, B

Security groups act as a virtual firewall for your DB instance to control inbound and outbound traffic.

Why this answer

A and B are correct. VPC security groups (A) act as a virtual firewall to control inbound and outbound traffic to the RDS instance at the network level. DB subnet groups (B) determine which subnets the RDS instance can be deployed in, effectively controlling network access by restricting the IP ranges that can reach the instance.

AWS WAF (C) is a web application firewall for HTTP/HTTPS traffic, not for network-level RDS access. IAM policies (D) control API-level permissions, not network traffic. DB parameter groups (E) manage database engine configuration settings and do not affect network access.

241
Multi-Selectmedium

A company is migrating its Oracle database to Amazon RDS for Oracle. The security team requires that all data be encrypted at rest using a customer-managed AWS KMS key. Which TWO steps are necessary to achieve this?

Select 2 answers
A.Migrate the data using Oracle Data Pump to the new encrypted instance.
B.Modify the DB instance to enable encryption using a KMS key.
C.Create a new DB instance and specify the KMS key for encryption.
D.Enable encryption at rest on the existing RDS instance by modifying the DB instance.
E.Use the default RDS encryption key (aws/rds) to encrypt the instance.
AnswersA, C

Data must be migrated to the new encrypted instance.

Why this answer

To enable encryption at rest with a customer-managed KMS key in Amazon RDS for Oracle, you must create a new DB instance and specify the KMS key for encryption (Option C). Encryption cannot be enabled on an existing RDS instance without migrating to a new encrypted instance (Options B and D are incorrect). After creating the encrypted instance, you can migrate the Oracle database using Oracle Data Pump to the new encrypted instance (Option A).

Using the default RDS encryption key (Option E) does not meet the requirement of a customer-managed key. Therefore, the two necessary steps are A and C.

242
Multi-Selectmedium

A security engineer is designing a disaster recovery plan for an Amazon DynamoDB table that contains sensitive data. The table is encrypted using an AWS KMS customer managed key (CMK). The engineer needs to ensure that the table can be restored in a different AWS Region. Which TWO actions must be taken to enable cross-region restores with the same encryption? (Choose TWO.)

Select 2 answers
A.Enable point-in-time recovery (PITR) on the table.
B.Enable DynamoDB global tables.
C.Export the table to S3 and copy the S3 objects to the destination Region.
D.Create a multi-Region KMS key in the source and replicate it to the destination Region.
E.Create a CloudHSM key and use it for encryption.
AnswersA, D

PITR is required for cross-region restores.

Why this answer

To enable cross-region restores of an encrypted DynamoDB table, you need to have the table's backups available in the destination region. Cross-region restores require point-in-time recovery (PITR) to be enabled on the source table (Option A). Additionally, because the table uses a customer managed KMS key, you must create a multi-Region KMS key (or replicate the key) in the destination region so that DynamoDB can use it to decrypt the backup during restore (Option D).

Option B (global tables) is for live replication, not for backup/restore scenarios. Option C (export to S3 and copy) does not preserve the same encryption because the exported data is not encrypted with the KMS key. Option E (CloudHSM) is not supported for DynamoDB encryption.

243
MCQmedium

An application uses an Amazon RDS for MySQL database. The security team requires that all traffic to the database be encrypted in transit. Which configuration ensures this?

A.Use the default RDS parameter group.
B.Create a custom DB parameter group with the require_secure_transport parameter set to ON.
C.Configure the security group to allow only port 3306 from the application.
D.Use a network ACL to restrict inbound traffic to port 3306.
AnswerB

Setting require_secure_transport to ON enforces encrypted connections.

Why this answer

Setting require_secure_transport to ON in a custom DB parameter group enforces SSL/TLS for all connections to the RDS MySQL database, ensuring encryption in transit. Option A is wrong because the default parameter group does not enforce SSL. Option C is wrong because security groups control network access at the port level, not encryption.

Option D is wrong because network ACLs are stateless and do not enforce encryption.

244
MCQhard

A company is using Amazon DynamoDB with a global table that replicates data across two AWS Regions. The security team requires that all data be encrypted at rest with a customer-managed AWS KMS key. How should the company configure the KMS keys to meet this requirement?

A.Create a single KMS key in the primary region and use it for both replicas.
B.Use AWS managed encryption as DynamoDB does not support customer managed KMS keys for global tables.
C.Create a separate KMS key in each region and assign each replica table its regional KMS key.
D.Create a multi-Region KMS key and use it for both replicas.
AnswerC

Each replica table can use its own regional KMS key.

Why this answer

For DynamoDB global tables, each replica table can use a different KMS key. You must create a KMS key in each region and configure the table to use the regional key. Option A is incorrect because a single KMS key cannot be used across regions; KMS keys are region-specific.

Option B is incorrect because using the same key across regions is not possible. Option D is incorrect because DynamoDB global tables support encryption with customer managed keys.

245
Multi-Selecteasy

Which TWO AWS services can be used to monitor and alert on suspicious database access patterns in Amazon RDS? (Choose 2.)

Select 2 answers
A.Amazon Inspector
B.Amazon CloudWatch
C.AWS Trusted Advisor
D.AWS Config
E.Amazon GuardDuty
AnswersB, E

Amazon CloudWatch monitors RDS metrics and logs, and can trigger alarms based on suspicious access patterns (e.g., failed authentication attempts).

Why this answer

The correct answers are Amazon CloudWatch (B) and Amazon GuardDuty (E). Amazon CloudWatch can monitor RDS metrics and create alarms based on access patterns like failed login attempts. Amazon GuardDuty is a threat detection service that uses machine learning to identify suspicious database access activity.

Option A (Amazon Inspector) is for vulnerability assessment, not monitoring access patterns. Option C (AWS Trusted Advisor) provides best practice checks and recommendations. Option D (AWS Config) is for resource configuration tracking and compliance.

246
Multi-Selecthard

A company is using Amazon RDS for MySQL to host a web application. The security team has identified that the application is vulnerable to SQL injection attacks. The team wants to implement a defense-in-depth strategy to protect the database. Which THREE measures should be taken to mitigate SQL injection risks?

Select 3 answers
A.Grant the minimum required permissions to the database user used by the application.
B.Move all SQL logic into stored procedures.
C.Use parameterized queries or prepared statements in the application code.
D.Enable encryption at rest for the RDS instance.
E.Deploy AWS WAF in front of the web application to filter malicious requests.
AnswersA, C, E

Least privilege limits damage if injection occurs.

Why this answer

Options A, C, and E are correct. Parameterized queries (C) prevent SQL injection by separating SQL logic from data. Least privilege (A) reduces the impact if injection occurs.

AWS WAF (E) provides a web application firewall to filter malicious input before it reaches the database. Option B is incorrect because stored procedures alone do not prevent SQL injection unless they use parameterized queries. Option D is incorrect because encryption at rest protects data at rest but does not prevent SQL injection.

247
MCQmedium

A company has an Amazon RDS for Oracle DB instance that stores sensitive data. The security team wants to audit all SQL queries that read or modify specific columns containing personally identifiable information (PII). The audit logs must be stored for 5 years. Which solution should the database specialist implement?

A.Use Oracle fine-grained auditing to create an audit policy on the specific columns and store logs in a custom table.
B.Enable database activity streams and send logs to Amazon CloudWatch Logs with a retention of 5 years.
C.Enable RDS Enhanced Monitoring and enable SQL auditing in the parameter group.
D.Enable Oracle Audit Vault and Database Firewall.
AnswerA

Fine-grained auditing allows column-level auditing.

Why this answer

Amazon RDS for Oracle supports fine-grained auditing (FGA) to create audit policies on specific columns, and audit logs can be stored in a custom table with the desired retention period. Option B is incorrect because database activity streams capture all database activities and do not filter by specific columns, and they integrate with CloudWatch Logs where retention must be set separately. Option C is incorrect because RDS Enhanced Monitoring is for OS-level metrics, not SQL auditing.

Option D is incorrect because Oracle Audit Vault and Database Firewall are not supported on Amazon RDS for Oracle.

248
MCQmedium

A database administrator runs the command shown in the exhibit. The security team requires that the database be encrypted at rest. What should the administrator do to enable encryption?

A.Enable encryption at the table level using MySQL's built-in encryption.
B.Create a snapshot of the DB instance, copy the snapshot with encryption, and restore from the encrypted snapshot.
C.Modify the DB instance and set StorageEncrypted to true.
D.The instance is already encrypted because the output shows 'StorageEncrypted' as false.
AnswerB

This is the standard method to enable encryption on an existing instance.

Why this answer

Encryption cannot be enabled on an existing unencrypted instance; you must create a snapshot, copy it with encryption, and restore. Option A is wrong because encryption is at the storage level, not table level. Option C is wrong because modifying the instance does not add encryption.

Option D is wrong because the command shows StorageEncrypted is false, so it is not encrypted.

249
MCQeasy

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 the data be encrypted at rest using a customer-managed key stored in AWS KMS. Additionally, the team wants to ensure that the key can be rotated automatically every year. What should the company do to meet these requirements?

A.Enable encryption on the RDS instance using the default RDS encryption and use AWS Secrets Manager to store the key.
B.Create a customer-managed key in AWS KMS, enable automatic rotation, and enable encryption on the RDS instance using that key.
C.Create a customer-managed key in AWS KMS without automatic rotation, and manually rotate the key using the RDS console.
D.Use an AWS managed key for RDS and create an AWS Lambda function to rotate the key manually each year.
AnswerB

Customer-managed KMS keys support automatic annual rotation.

Why this answer

The correct approach is to create a customer-managed key in AWS KMS with automatic rotation enabled, then enable encryption on the RDS instance using that key. This meets the requirements for encryption at rest with a customer-managed key and automatic annual rotation. Option A is incorrect because AWS Secrets Manager is used for storing secrets, not encryption keys.

Option C lacks automatic rotation. Option D uses an AWS managed key, not customer-managed, and requires a manual Lambda function, not automatic rotation.

250
MCQhard

A company has a multi-account AWS environment using AWS Organizations. The security team wants to centrally manage database encryption keys for all Amazon RDS instances across accounts. They require that the keys be stored in a single account, and that each account can use the key to encrypt its RDS instances. Additionally, they want to automatically rotate the keys every year. Which solution should they implement?

A.Copy the KMS key from the central account to each account using the KMS key replication feature.
B.Use AWS CloudHSM to create a key and share the HSM partition with each account.
C.Create a multi-Region customer managed KMS key in the central account and replicate it to each account.
D.Create a customer managed KMS key in the central account and grant the RDS service in each account permission to use the key.
AnswerD

KMS supports cross-account key usage for RDS encryption.

Why this answer

AWS KMS allows you to create a customer managed key in a central account and grant cross-account access to the RDS service principal in each account. This enables each account to use the central key for RDS encryption while keeping the key stored centrally. Option A is incorrect because KMS key replication is for multi-Region, not cross-account.

Option B is incorrect because CloudHSM is not integrated with RDS for encryption. Option C is incorrect because multi-Region keys are for cross-Region use, not cross-account; they do not solve the cross-account requirement.

251
MCQhard

A company is using Amazon DynamoDB with fine-grained access control using IAM policies. The security team wants to ensure that a specific IAM role can only read the 'status' attribute from items in a table. The table is named 'Orders'. Which IAM policy statement should be used?

A.Condition: { 'ForAllValues:StringEquals': { 'dynamodb:Attributes': ['active'] } }
B.Condition: { 'ForAllValues:StringEquals': { 'dynamodb:Attributes': ['status'] } }
C.Condition: { 'ForAllValues:StringEquals': { 'dynamodb:ReturnValues': 'ALL_OLD' } }
D.Condition: { 'StringEquals': { 'dynamodb:Select': 'SPECIFIC_ATTRIBUTES' } }
AnswerB

Correct. This condition restricts access to only the 'status' attribute name, which is a step towards controlling attribute access, but it does not filter items by value. The requirement to read items with status='active' requires additional data modeling (e.g., GSI) or app-level filtering.

Why this answer

It uses the `dynamodb:Attributes` condition key with `ForAllValues:StringEquals` to restrict the request to only access the 'status' attribute. This ensures the role can only read the 'status' attribute, meeting the requirement. Option A incorrectly uses the condition to match the literal value 'active' as an attribute name.

Options C and D use invalid or irrelevant condition keys.

252
MCQhard

A financial services company runs a critical application on Amazon RDS for PostgreSQL. They must ensure that database activity logs are sent to Amazon CloudWatch Logs for real-time monitoring. The logs must include all SQL queries, including SELECT statements. Which configuration will meet these requirements?

A.Set log_statement = 'all' and log_min_duration_statement = 0 in the DB parameter group. Enable CloudWatch Logs export.
B.Install the pgAudit extension and configure it to log all statements. Enable CloudWatch Logs export in the RDS console.
C.Set the parameter log_statement = 'ddl' in the DB parameter group. Enable CloudWatch Logs export.
D.Set log_min_duration_statement = -1 in the DB parameter group. Enable CloudWatch Logs export.
AnswerA

log_statement = 'all' logs all statements, and log_min_duration_statement = 0 ensures all durations are logged, so all queries appear in the logs.

Why this answer

Setting `log_statement = 'all'` captures every SQL statement, including SELECT, and `log_min_duration_statement = 0` ensures all statements are logged regardless of duration. Enabling CloudWatch Logs export then sends these logs to CloudWatch Logs for real-time monitoring. Option B is incorrect because while pgAudit can log all statements, it is not necessary; the built-in PostgreSQL logging with `log_statement = 'all'` meets the requirement without additional extensions.

Option C is incorrect because `log_statement = 'ddl'` only logs data definition language statements, not SELECT queries. Option D is incorrect because `log_min_duration_statement = -1` disables logging of all statements.

253
MCQeasy

A developer needs to allow an application running on an EC2 instance to read and write data to a DynamoDB table named 'Orders'. The EC2 instance is configured with an IAM role. Which IAM policy should be attached to the role?

A.{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "dynamodb:*", "Resource": "*" } ] }
B.{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "ec2:*", "Resource": "*" } ] }
C.{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "dynamodb:GetItem", "dynamodb:PutItem" ], "Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/Orders" } ] }
D.{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:*", "Resource": "arn:aws:s3:::example-bucket/*" } ] }
AnswerC

Correctly grants read/write to the specific table.

Why this answer

The policy grants exactly the required DynamoDB actions (GetItem and PutItem) on the specific 'Orders' table, following the principle of least privilege. Option A is incorrect because it grants full DynamoDB access to all tables, which is overly permissive. Option B is incorrect because it grants EC2 actions, not DynamoDB actions.

Option D is incorrect because it grants S3 actions instead of DynamoDB actions.

254
MCQhard

A company has an Amazon DynamoDB table that stores sensitive user data. The security team requires that all data is encrypted at rest using a customer-managed AWS KMS key. Which step should be taken to meet this requirement?

A.Enable server-side encryption with S3-managed keys (SSE-S3) on the DynamoDB table.
B.Attach a bucket policy to restrict access to the DynamoDB table.
C.Specify a customer-managed KMS key in the DynamoDB table creation.
D.Modify the existing DynamoDB table to enable encryption at rest.
E.Create an IAM policy that allows dynamodb:GetItem and dynamodb:PutItem only when the request is made by the specific IAM role.
AnswerC

Correct. Specifying a customer-managed KMS key during table creation enables encryption with that key.

Why this answer

You can specify a customer-managed AWS KMS key when creating a DynamoDB table to enable encryption at rest with that key. Option E is incorrect because while you can restrict access to a specific IAM role, the question specifically asks about encryption at rest. Option A is wrong because DynamoDB uses KMS keys, not S3-managed keys.

Option B is wrong because bucket policies are for S3, not DynamoDB. Option D is wrong because encryption at rest cannot be enabled after table creation; it must be specified at creation time.

Exam trap

Candidates often confuse DynamoDB encryption options with S3 encryption. DynamoDB does not support SSE-S3 or SSE-C; it uses AWS KMS.

255
MCQmedium

A company is using Amazon RDS for MySQL to power a web application. The database contains sensitive data, and the security team requires that all connections to the database use SSL/TLS. The team has enabled 'require_secure_transport' parameter in the DB parameter group. However, a developer reports that they are able to connect to the database using a MySQL client without specifying SSL options. What could be the reason?

A.The RDS instance is configured to accept both SSL and non-SSL connections by default.
B.The MySQL client automatically upgrades to SSL when the server requires it.
C.The 'require_secure_transport' parameter is not set to '1' in the DB parameter group.
D.The developer is connecting from an EC2 instance in the same VPC, which bypasses SSL enforcement.
AnswerC

The parameter must be set to '1' to enforce SSL; otherwise, non-SSL connections are allowed.

Why this answer

Enabling the 'require_secure_transport' parameter in the DB parameter group requires explicitly setting it to '1'. By default, this parameter is '0' (disabled). Even if the parameter group is associated with the RDS instance, if the parameter value is not set to '1', the database will still accept non-SSL connections.

After setting it to '1', the instance must be rebooted for the change to take effect. Option A is incorrect because 'require_secure_transport', when properly configured, rejects non-SSL connections. Option B is incorrect because the MySQL client does not automatically upgrade to SSL; it only uses SSL if explicitly requested or if the client defaults to SSL (which depends on client configuration).

Option D is incorrect because connections from within the same VPC are still subject to the database's SSL enforcement settings.

Exam trap

A common trap is assuming that simply enabling the parameter in the parameter group (e.g., clicking 'Enable') is enough. In RDS, you must set the parameter value to '1' (a string) and then reboot the instance for the change to take effect.

256
MCQeasy

A company wants to audit all API calls made to its Amazon RDS DB instances. Which AWS service should be used to capture these API calls?

A.AWS CloudTrail
B.AWS Config
C.Amazon GuardDuty
D.Amazon Inspector
AnswerA

Correct. AWS CloudTrail records API calls to AWS services, including RDS, providing an audit trail of actions.

Why this answer

AWS CloudTrail records API calls made to AWS services, including RDS, providing an audit trail of actions taken. Option B is incorrect because AWS Config tracks resource configuration changes and compliance, not API calls. Option C is incorrect because Amazon GuardDuty is a threat detection service that monitors for malicious activity, not an API audit tool.

Option D is incorrect because Amazon Inspector is a vulnerability assessment service that scans for security issues, not an audit trail of API calls.

257
MCQmedium

A retail company uses Amazon DynamoDB to store product catalog data. The security team wants to ensure that only authorized applications can read and write to the table. The applications are running on Amazon EC2 instances. The current setup uses an IAM role attached to the EC2 instance with a policy that grants dynamodb:* on the specific table. However, during a security audit, it was discovered that any process on the EC2 instance can access the table because the instance has access to the temporary credentials from the instance metadata service. The security team requires that only specific processes (the application) can access the credentials, and that the credentials cannot be extracted from the instance. What should be done to meet these requirements?

A.Create a VPC endpoint for DynamoDB with a policy that restricts access to the specific IAM role, and configure the EC2 instance to use IMDSv2 with a hop limit.
B.Modify the security group to only allow traffic from the EC2 instance's private IP.
C.Store AWS access keys on the EC2 instance and use them in the application.
D.Attach a resource-based policy to the DynamoDB table allowing only the EC2 instance's IAM role.
AnswerA

VPC endpoint policy and IMDSv2 enhance security.

Why this answer

Using a VPC endpoint for DynamoDB with a policy that restricts access to the specific IAM role ensures that only requests from that role are allowed, and using IMDSv2 with a hop limit prevents credential theft by ensuring that only the intended application process on the EC2 instance can access the credentials. Option B is incorrect because security groups control network traffic but do not enforce IAM role usage. Option C is incorrect because storing AWS access keys on the instance is less secure and exposes credentials to any process.

Option D is incorrect because DynamoDB does not support resource-based policies; IAM roles are authorized via identity-based policies attached to the role.

258
MCQmedium

A company is using an Amazon RDS for PostgreSQL database to store sensitive customer data. The security team requires that all data be encrypted at rest and in transit, and that access to the database is restricted to only specific applications. Currently, the database is encrypted at rest using AWS KMS, and connections are made over SSL. However, the security team wants to ensure that even if the database credentials are compromised, an attacker cannot access the database from unauthorized IP addresses. What should be done to meet this requirement?

A.Attach a resource-based policy to the RDS instance to allow only specific IAM roles.
B.Create a new RDS instance in a VPC with a network ACL that allows inbound traffic only from specific IP ranges, and migrate the data.
C.Modify the security group associated with the RDS instance to allow inbound traffic only from the application's IP addresses.
D.Enable IAM database authentication for the RDS instance.
AnswerC

Security groups act as a virtual firewall and can restrict inbound traffic based on IP addresses.

Why this answer

Modifying the security group associated with the RDS instance to allow inbound traffic only from the application's IP addresses restricts network access at the instance level, preventing unauthorized IP addresses from connecting even if credentials are compromised. Option A (attaching a resource-based policy) does not restrict network access—it controls IAM permissions. Option B (creating a new RDS instance in a VPC with a network ACL) is unnecessarily complex and involves migrating data; the requirement can be met by modifying the existing security group without creating a new instance.

Option D (enabling IAM database authentication) authenticates database users via IAM but does not restrict source IP addresses, so it does not meet the stated requirement.

259
MCQeasy

A company is using Amazon RDS for MySQL and needs to restrict access to the database to only specific Amazon EC2 instances in the same VPC. Which security mechanism should be used?

A.Configure a VPC security group that allows inbound traffic from the EC2 security groups.
B.Create an IAM policy that allows the EC2 instances to connect to the RDS instance.
C.Create a DB subnet group that includes only the subnets where the EC2 instances reside.
D.Modify the network ACL for the DB subnet to allow traffic from the EC2 instances' IP addresses.
AnswerA

DB security groups are only applicable in EC2-Classic, not in a VPC. In a VPC, you should use a VPC security group to control traffic to the RDS instance.

Why this answer

In a VPC, RDS instances use VPC security groups to control inbound traffic. Configuring a VPC security group that allows inbound traffic from the EC2 security groups is the correct mechanism. Option B is incorrect because IAM policies control API access, not network connectivity.

Option C is incorrect because subnet groups define subnets for deployment, not security rules. Option D is incorrect because network ACLs are stateless, apply to entire subnets, and cannot reference security groups or specific instances.

260
MCQmedium

A company is using Amazon RDS for PostgreSQL and needs to implement column-level encryption for sensitive data. The application must be able to encrypt and decrypt data transparently. Which approach should be taken?

A.Enable RDS encryption at rest using a KMS key, which will automatically encrypt all columns.
B.Use AWS Lambda to encrypt data before writing to the database and decrypt after reading.
C.Use the AWS KMS Encrypt and Decrypt APIs directly in the application code.
D.Install the pgcrypto extension on the RDS instance and use its functions to encrypt data at the column level.
AnswerD

pgcrypto provides transparent column-level encryption.

Why this answer

Pgcrypto is a PostgreSQL extension that provides column-level encryption functions, allowing the application to encrypt and decrypt data transparently at the column level. Option A is incorrect because RDS encryption at rest encrypts the entire database storage, not individual columns. Option B is incorrect because using AWS Lambda would require application modifications and introduce additional latency.

Option C is incorrect because AWS KMS is a key management service, not a direct column-level encryption solution for databases, and using its APIs would require building encryption logic in the application.

261
MCQmedium

A company is using Amazon DynamoDB with a TTL attribute to automatically delete expired items. The security team is concerned that deleted items might still be recoverable from backups. They need to ensure that once an item is deleted by TTL, it is not included in future on-demand backups. Additionally, they want to ensure that the TTL deletion itself is logged for audit purposes. What should they do?

A.Disable TTL and implement a custom deletion process that logs deletions before removing items.
B.Enable DynamoDB Streams on the table and use a Lambda function to log TTL deletion events to CloudWatch Logs.
C.Use AWS CloudTrail to log the UpdateTimeToLive API call.
D.Enable AWS CloudTrail data events for DynamoDB to capture TTL deletions.
AnswerB

Streams capture TTL deletions as REMOVE events.

Why this answer

DynamoDB Streams can capture TTL deletions as 'REMOVE' events. By processing these events with a Lambda function and logging them to CloudWatch Logs, the security team can audit TTL deletions. On-demand backups reflect the current table state, so items deleted by TTL before the backup is taken will not be included.

Option A is incorrect because disabling TTL and implementing a custom deletion process adds complexity and may not be as efficient. Option C is incorrect because CloudTrail logs the UpdateTimeToLive API call (control plane), not the actual TTL deletions (data plane). Option D is incorrect because CloudTrail data events for DynamoDB capture GetItem, PutItem, etc., but not TTL deletions.

262
MCQhard

A company has an Amazon RDS for SQL Server DB instance that stores financial data. The security team requires that the data be encrypted at rest using a customer-managed key stored in AWS KMS. Additionally, they want to ensure that the key cannot be deleted without authorization. What should be done?

A.Create a customer-managed KMS key, enable key rotation, and set a deletion protection policy.
B.Enable encryption on the RDS instance and use the default KMS key.
C.Use AWS CloudHSM to generate and store the encryption key, and associate it with the RDS instance.
D.Enable AWS CloudTrail to log key deletion attempts.
AnswerA

KMS supports customer-managed keys with rotation and deletion protection.

Why this answer

Creating a customer-managed KMS key allows you to control key rotation and deletion protection, meeting the security requirements. Option B is wrong because using the default KMS key does not provide a customer-managed key. Option C is wrong because AWS CloudHSM is not directly used for RDS encryption at rest; KMS is the required service.

Option D is wrong because AWS CloudTrail only logs actions but does not prevent key deletion.

Exam trap

Candidates may confuse key rotation with deletion protection; both are required here. Deleting the KMS key would render encrypted data unrecoverable.

263
MCQmedium

A company has a requirement to automatically rotate the password for an Amazon RDS for MySQL DB instance every 90 days. The password is stored in AWS Secrets Manager. Which combination of steps will meet this requirement?

A.Enable IAM database authentication for the RDS instance and rotate the IAM keys every 90 days.
B.Store the password in AWS Systems Manager Parameter Store and configure a scheduled AWS Lambda function to update the parameter and the RDS password.
C.Store the password in Secrets Manager and configure automatic rotation with a Lambda function that updates the RDS password every 90 days.
D.Use an AWS Lambda function to manually update the RDS password and store the new password in Secrets Manager, triggered by a CloudWatch Events rule every 90 days.
AnswerC

Secrets Manager supports automatic rotation for RDS with a custom Lambda rotation function.

Why this answer

AWS Secrets Manager provides built-in support for automatic rotation of RDS database passwords using a custom or pre-built AWS Lambda rotation function. You can configure the rotation interval to 90 days to meet the requirement. Option A is incorrect because IAM database authentication does not rotate passwords; it uses IAM roles and credentials, not password rotation.

Option B is incorrect because AWS Systems Manager Parameter Store does not have native rotation capabilities for RDS passwords; it requires a custom solution. Option D is incorrect while it describes a manual approach via Lambda and CloudWatch Events, it does not leverage Secrets Manager's automatic rotation feature, which is the recommended and simplest method.

264
MCQeasy

A developer needs to securely store database credentials for an application that runs on Amazon EC2 and connects to an Amazon RDS for PostgreSQL database. The credentials must be automatically rotated every 90 days. Which AWS service should the developer use to meet these requirements?

A.AWS Systems Manager Parameter Store
B.AWS CloudHSM
C.AWS Identity and Access Management (IAM) roles
D.AWS Secrets Manager
AnswerD

Supports automatic rotation of database credentials.

Why this answer

AWS Secrets Manager. Secrets Manager is designed to securely store and manage secrets such as database credentials. It natively supports automatic rotation of credentials for Amazon RDS databases, including PostgreSQL, with a customizable rotation interval (e.g., every 90 days).

Option A (AWS Systems Manager Parameter Store) can store secrets but does not provide built-in automatic rotation for RDS credentials. Option B (AWS CloudHSM) provides hardware security modules for encryption key storage, not for managing database credentials. Option C (IAM roles) allow EC2 instances to assume roles for API access but do not store or rotate database credentials; while IAM database authentication can be used with RDS PostgreSQL, it does not meet the requirement to store and rotate credentials automatically.

265
Multi-Selectmedium

A security team needs to audit all SQL statements executed against an Amazon Aurora MySQL DB cluster. Which combination of actions should be taken to achieve this? (Choose TWO.)

Select 2 answers
A.Enable AWS CloudTrail for the Aurora DB cluster.
B.Enable Enhanced Monitoring for the DB cluster.
C.Enable RDS event subscription for the DB cluster.
D.Set the server_audit_logging parameter to 1 in the DB cluster parameter group.
E.Configure the DB cluster to publish audit logs to Amazon CloudWatch Logs.
AnswersD, E

This enables the audit plugin for Aurora MySQL.

Why this answer

Options D and E are correct. To audit SQL statements in an Aurora MySQL DB cluster, you need to enable the Aurora MySQL audit plugin. This is done by setting the `server_audit_logging` parameter to 1 in the DB cluster parameter group (option D).

Then you can configure the DB cluster to publish the audit logs to Amazon CloudWatch Logs (option E) for centralized monitoring and analysis. Option A is incorrect because AWS CloudTrail captures API calls, not SQL statements. Option B is incorrect because Enhanced Monitoring captures OS-level metrics, not SQL queries.

Option C is incorrect because RDS event subscriptions notify about events like DB instance changes, not SQL execution.

266
MCQmedium

A security engineer creates the IAM policy shown in the exhibit and attaches it to an IAM user. What is the effect of this policy?

A.The user can delete any database except 'prod-db'.
B.The user can describe all databases except 'prod-db'.
C.The user can modify 'prod-db' but cannot delete it.
D.The user can modify any database except 'prod-db'.
AnswerC

Correct. The user can modify all databases because ModifyDBInstance is allowed, but cannot delete 'prod-db' due to the explicit deny. For other databases, deletion is also denied implicitly.

Why this answer

The IAM policy allows DescribeDBInstances and ModifyDBInstance on all resources, but explicitly denies DeleteDBInstance on the database 'prod-db'. Since an explicit deny overrides any allow, the user cannot delete 'prod-db'. However, the policy does not allow DeleteDBInstance on any database, so the user cannot delete any database.

For 'prod-db', the user can still modify and describe it because the deny is only for the delete action. Thus, the user can modify 'prod-db' but cannot delete it.

Exam trap

The trap is that the explicit deny on DeleteDBInstance for 'prod-db' might be misinterpreted as also blocking ModifyDBInstance for that database, but it only affects the delete action.

267
MCQeasy

A company has an RDS for SQL Server DB instance that stores sensitive data. The database administrator needs to ensure that all connections to the database use SSL/TLS encryption. What should the administrator do?

A.Configure the security group to only allow traffic from specific IP addresses.
B.Set the 'rds.force_ssl' parameter to 1 in the DB parameter group.
C.Enable AWS CloudTrail to monitor connections.
D.Delete the DB instance and create a new one with encryption enabled.
AnswerB

This forces all connections to use SSL.

Why this answer

Setting 'rds.force_ssl' to 1 in the DB parameter group forces all connections to the RDS for SQL Server DB instance to use SSL/TLS encryption. Option A is incorrect because security group rules control network access, not encryption. Option C is incorrect because AWS CloudTrail logs API calls, not database connections.

Option D is incorrect because deleting and recreating the instance would not, by itself, enforce SSL; encryption at rest is separate from SSL enforcement.

268
Multi-Selectmedium

A company is designing a security strategy for an Amazon RDS for MySQL instance that stores Personally Identifiable Information (PII). Which TWO measures should be implemented to protect the data at rest?

Select 2 answers
A.Enable automatic backups with encryption.
B.Enable Amazon GuardDuty to monitor for suspicious activity.
C.Enable deletion protection on the DB instance.
D.Enable encryption at rest using AWS KMS.
E.Enable encryption in transit using SSL/TLS.
AnswersA, D

Automatic backups with encryption ensure that backup data is encrypted at rest, providing protection for stored backups.

Why this answer

Options A and D are correct. Option A: Enabling automatic backups with encryption ensures that backup data is encrypted at rest. Option D: Enabling encryption at rest using AWS KMS encrypts the underlying storage of the DB instance.

Option B is wrong because Amazon GuardDuty is a threat detection service, not for data at rest protection. Option C is wrong because deletion protection prevents accidental deletion but does not protect data at rest. Option E is wrong because encryption in transit (SSL/TLS) protects data in motion, not at rest.

269
MCQhard

A company is using Amazon Aurora MySQL-Compatible Edition. The security team requires that all connections to the database use SSL/TLS. The application currently connects using a standard JDBC connection string without SSL. What changes are needed to enforce SSL connections?

A.Modify the DB cluster parameter group to set require_secure_transport to ON.
B.Modify the DB cluster parameter group to set require_secure_transport to ON and update the application connection string to use SSL parameters.
C.Modify the security group to only allow traffic on port 3306 with the SSL flag.
D.Create an IAM role that requires SSL for database access and assign it to the application.
AnswerB

This enforces SSL and ensures the application uses it.

Why this answer

To enforce SSL for all connections to an Amazon Aurora MySQL database, you must modify the DB cluster parameter group to set require_secure_transport to ON, which rejects non-SSL connections. Additionally, the application's JDBC connection string must be updated to include SSL parameters (e.g., useSSL=true) so that the application initiates an SSL connection. Option A is incomplete because modifying the parameter group alone does not enforce SSL on existing connections if the application does not use SSL.

Option C is incorrect because security groups do not have an SSL flag; they control network access based on IP and port. Option D is incorrect because IAM roles do not enforce SSL encryption; they handle authentication and authorization.

270
MCQmedium

A company is using Amazon DynamoDB to store customer session data. The security team requires that all data is encrypted at rest using a customer-managed KMS key, and that access to the key is restricted to specific IAM roles. The company also wants to ensure that DynamoDB Accelerator (DAX) cluster is encrypted. Which steps should be taken to meet these requirements?

A.Create the DynamoDB table with encryption using a customer-managed KMS key. Create the DAX cluster and enable encryption at rest using the same KMS key.
B.Create the DynamoDB table without encryption, then use the AWS CLI to enable encryption after creation.
C.Create the DynamoDB table with default encryption, and create the DAX cluster with a separate customer-managed KMS key.
D.Create the DynamoDB table with encryption using a customer-managed key, and enable encryption in transit on the DAX cluster using TLS.
AnswerA

Correct. DynamoDB tables support encryption at rest with a customer-managed KMS key at creation. DAX clusters can also be encrypted at rest using the same or a different KMS key.

Why this answer

DynamoDB tables can be encrypted at rest with a customer-managed KMS key at creation, and DAX clusters also support encryption at rest using the same or a different KMS key, meeting the requirement. Option B is wrong because DynamoDB encryption cannot be enabled after table creation; it must be specified at creation. Option C is wrong because it uses default encryption (AWS managed key) for the table, not a customer-managed key.

Option D is wrong because it refers to encryption in transit (TLS) for DAX, but the requirement is for encryption at rest; DAX encryption at rest is not addressed.

271
Multi-Selectmedium

A company is running an Amazon RDS for MySQL DB instance in a VPC. The security team requires that all connections to the database use SSL/TLS. Which combination of steps should be taken to enforce this? (Choose two.)

Select 2 answers
A.Create a new DB subnet group that isolates the DB instance in a private subnet without internet access.
B.Update the security group for the DB instance to deny inbound traffic on port 3306 from sources that do not have SSL.
C.Require database users to connect using the --ssl-ca parameter with the RDS certificate.
D.Modify the DB parameter group associated with the DB instance, setting the 'rds.force_ssl' parameter to 1.
E.Modify the DB option group associated with the DB instance, enabling the SSL option.
AnswersC, D

This ensures the client verifies the server certificate, which is necessary for SSL connections.

Why this answer

To enforce SSL on RDS MySQL, you set the rds.force_ssl parameter to 1 in the DB parameter group and require users to connect using the --ssl-ca option. The option group is for features like Oracle TDE, not SSL enforcement. Security group rules control network access, not encryption enforcement.

Option E is unnecessary if you set the parameter.

272
MCQeasy

A developer is configuring an Amazon RDS for PostgreSQL DB instance. The application connects using IAM database authentication. Which setting must be enabled on the DB instance for IAM authentication to work?

A.Set the database port to 5432.
B.Set the 'rds.force_ssl' parameter to 1.
C.Ensure the DB instance is publicly accessible.
D.Change the master username to 'iam_user'.
AnswerB

Correct. The 'rds.force_ssl' parameter must be set to 1 to enforce TLS, which is required for IAM database authentication.

Why this answer

IAM database authentication for Amazon RDS PostgreSQL requires an encrypted connection to protect the authentication token. Setting the 'rds.force_ssl' parameter to 1 enforces TLS/SSL connections between the client and the database, which is a prerequisite for IAM authentication. Option A is incorrect because the port (default 5432) does not need to change for IAM.

Option C is incorrect because the DB instance can be private within a VPC; IAM authentication works over private or public connections as long as TLS is enforced. Option D is incorrect because the master username is not changed; IAM authentication uses database users that are mapped to IAM identities.

273
MCQeasy

A company is using Amazon RDS for MySQL. They want to audit all database logins and failed login attempts. Which option should they enable?

A.Set the parameter log_queries_not_using_indexes = 'ON' in the DB parameter group.
B.Set the parameter audit_log = 'ON' in the DB parameter group.
C.Set the parameter general_log = 'ON' in the DB parameter group.
D.Set the parameter slow_query_log = 'ON' in the DB parameter group.
AnswerB

The audit log captures connection events, including successful and failed logins.

Why this answer

Setting the parameter audit_log = 'ON' enables audit logging for MySQL, which logs connections and disconnections, including failed login attempts. Option A is wrong because log_queries_not_using_indexes logs queries that do not use indexes, not login attempts. Option C is wrong because general_log logs all queries, not just logins.

Option D is wrong because slow_query_log logs only slow queries.

274
MCQeasy

A company is using Amazon RDS for Oracle and wants to integrate with AWS CloudTrail to log database API calls. Which action is necessary?

A.Enable CloudTrail for the RDS instance.
B.Create a VPC endpoint for CloudTrail.
C.Configure Oracle Fine-Grained Auditing (FGA).
D.Install the pgAudit extension.
AnswerA

CloudTrail already logs RDS API calls; no special setup needed.

Why this answer

AWS CloudTrail is the service that logs API calls made to AWS services, including Amazon RDS. To capture database API calls (e.g., CreateDBInstance, ModifyDBInstance) for an RDS for Oracle instance, you must enable CloudTrail for the RDS instance by creating a trail that covers the RDS service. This logs management events at the AWS control plane level, not the database engine level.

Exam trap

The trap here is confusing AWS-level API logging (CloudTrail) with database engine-level auditing (FGA, pgAudit), leading candidates to select database-specific auditing tools instead of the correct AWS service for logging control plane API calls.

How to eliminate wrong answers

Option B is wrong because a VPC endpoint for CloudTrail is used to privately connect your VPC to CloudTrail without using the public internet, but it is not required to log RDS API calls; CloudTrail works over the public AWS API endpoints by default. Option C is wrong because Oracle Fine-Grained Auditing (FGA) is a database-level auditing feature that logs SQL operations within the Oracle database engine, not AWS API calls to the RDS service. Option D is wrong because the pgAudit extension is used for PostgreSQL databases to log database-level activity, not for Oracle RDS instances or AWS API logging.

275
MCQmedium

Refer to the exhibit. An IAM policy is attached to a user. The user attempts to delete a DB instance named 'prod-db'. What will happen?

A.The delete will succeed because the Allow statement grants modify permission.
B.The delete will succeed because the resource is 'prod-db' which does not match the deny pattern.
C.The delete will fail because of the explicit Deny statement.
D.The delete will succeed only if the user has MFA enabled.
AnswerC

Explicit deny overrides any allow.

Why this answer

The Deny statement explicitly denies delete on any instance matching 'prod-*'. Since an explicit deny overrides any allow, the delete will fail. Therefore, the correct answer is C.

Option A is incorrect because the deny overrides the allow. Option B is incorrect because the resource 'prod-db' does match the deny pattern 'prod-*'. Option D is incorrect because the policy does not require MFA in this context, and even with MFA, the explicit deny would still apply.

276
MCQeasy

A company is using Amazon DynamoDB and wants to ensure that only authorized users can access a specific table. Which AWS service should be used to manage access control?

A.AWS CloudHSM.
B.AWS Key Management Service (KMS).
C.Amazon VPC security groups.
D.AWS Identity and Access Management (IAM).
AnswerD

Correct. IAM allows you to create policies that define who can access which DynamoDB tables and what actions they can perform.

Why this answer

AWS Identity and Access Management (IAM) is the service used to manage access control for DynamoDB tables by creating policies that grant or deny permissions. Option A (CloudHSM) provides hardware security modules for encryption keys, not access control. Option B (KMS) manages encryption keys but does not handle access control.

Option C (VPC security groups) control network traffic at the instance level, not database-level access control.

277
Multi-Selecthard

A company is migrating an on-premises Oracle database to Amazon RDS for Oracle. The database contains sensitive personally identifiable information (PII). The security team requires that the data be encrypted in transit between the application and the RDS instance, and also encrypted at rest using a key managed by the company. Which THREE actions should the company take? (Choose THREE.)

Select 3 answers
A.Configure the RDS instance to require SSL/TLS connections.
B.Modify the DB parameter group to set the 'rds.force_ssl' parameter to 1.
C.Enable encryption at rest for the RDS instance at launch time.
D.Enable Transparent Data Encryption (TDE) using CloudHSM.
E.Create a customer managed key (CMK) in AWS KMS.
AnswersA, C, E

SSL/TLS encrypts data in transit.

Why this answer

Options A, C, and E are correct. Option A: Configuring the RDS instance to require SSL/TLS encrypts data in transit, meeting the encryption-in-transit requirement. Option C: Enabling encryption at rest for the RDS instance at launch time allows use of AWS KMS for encryption, satisfying the at-rest encryption requirement.

Option E: Creating a customer managed key (CMK) in AWS KMS enables the company to manage the encryption key, meeting the requirement for a key managed by the company. Option B is incorrect because setting rds.force_ssl to 1 in the DB parameter group is a step within configuring SSL/TLS, but the primary action is option A; moreover, the correct method to enforce SSL for Oracle RDS involves using the option group with the SSL option, not just the parameter group. Option D is incorrect because Transparent Data Encryption (TDE) using CloudHSM is not required; the at-rest encryption requirement is already fulfilled by enabling RDS encryption with a CMK (options C and E), and TDE with CloudHSM adds unnecessary complexity and potential licensing issues.

278
MCQhard

A financial company uses Amazon DynamoDB to store customer transaction data. The compliance team requires that all data be encrypted at rest using a customer-managed AWS KMS key. Additionally, they need to ensure that the key is used only for DynamoDB and no other AWS service. How can the company meet these requirements?

A.Use a KMS key with no key policy, and rely on IAM policies to restrict access to only DynamoDB.
B.Use an AWS Organizations service control policy (SCP) to deny all AWS services except DynamoDB from using the KMS key.
C.Create a KMS key with a key policy that includes a condition such as "kms:ViaService": "dynamodb.amazonaws.com" to restrict usage to DynamoDB.
D.Create a KMS key with a key policy that allows DynamoDB to use the key, and attach an IAM policy to deny all other services.
AnswerC

This condition ensures the key can only be used through DynamoDB, preventing other services.

Why this answer

A KMS key policy can use the 'kms:ViaService' condition key to restrict usage of the key to requests that originate from DynamoDB (dynamodb.amazonaws.com). This ensures the key is used only for DynamoDB and no other AWS service. Option A is incorrect because IAM policies alone cannot restrict key usage if the key policy allows all principals; the key policy must explicitly enforce the restriction.

Option B is incorrect because AWS Organizations SCPs do not control KMS key permissions; they control permissions for IAM entities. Option D is incorrect because IAM policies cannot prevent other services from using the key if the key policy allows them; the key policy itself must include the restriction.

279
MCQeasy

A company is using Amazon RDS for PostgreSQL to store application data. The security team wants to ensure that database audit logs are stored securely and cannot be modified after creation. Which AWS service should be used to meet this requirement?

A.AWS Key Management Service (KMS)
B.AWS CloudTrail
C.Amazon S3
D.Amazon CloudWatch Logs
AnswerD

CloudWatch Logs can store audit logs with encryption and access controls.

Why this answer

Amazon RDS for PostgreSQL can publish database audit logs to Amazon CloudWatch Logs. CloudWatch Logs provides immutability through IAM policies that prevent log modification and deletion, combined with log group encryption using AWS KMS. Option D is correct.

Option A (AWS KMS) is wrong because KMS manages encryption keys, not log storage. Option B (AWS CloudTrail) is wrong because CloudTrail records API activity, not database audit logs. Option C (Amazon S3) can store logs, but enabling immutability requires additional configuration like S3 Object Lock, making CloudWatch Logs the more straightforward and recommended service for this requirement.

280
MCQeasy

A company is using Amazon RDS for PostgreSQL. The security team wants to ensure that all connections to the database are encrypted in transit. Currently, applications connect using the PostgreSQL native encryption (SSL/TLS). What is the MOST secure way to enforce encrypted connections?

A.Configure the security group to only allow traffic on port 5432 from trusted IP addresses.
B.Enable the 'rds.force_ssl' parameter in the DB parameter group and restart the instance.
C.Use a custom database port that is not commonly used, such as 5433, to avoid unencrypted traffic.
D.Modify the DB parameter group to set 'ssl' to 'on' and 'require_ssl' to 'on', then reboot the instance.
AnswerB

Correct. Setting 'rds.force_ssl' (commonly referred to as 'force_ssl') to 1 in the DB parameter group and rebooting enforces SSL connections.

Why this answer

In Amazon RDS for PostgreSQL, the parameter to enforce SSL is 'rds.force_ssl' (often abbreviated as 'force_ssl'). Setting this parameter to 1 in the DB parameter group and rebooting the instance forces all connections to use SSL/TLS. Option A is incorrect because security groups control network access but do not enforce encryption.

Option C is incorrect because changing the port only obscures the port number, not enforce encryption. Option D is incorrect because 'require_ssl' is not a valid parameter in RDS PostgreSQL; the correct parameter is 'rds.force_ssl'.

Exam trap

Candidates often confuse the parameter 'require_ssl' (common in on-premises PostgreSQL) with the RDS-specific parameter 'rds.force_ssl'.

281
MCQhard

A company is using Amazon DynamoDB to store financial transactions. The security team requires that all access to the table be logged for auditing, and that any unauthorized access attempts trigger an immediate alert. The company has enabled AWS CloudTrail to log all DynamoDB API calls. However, the security team is concerned that CloudTrail logs may not capture all access patterns, such as queries that return no results. Which additional step should the company take to ensure comprehensive auditing and alerting?

A.Configure Amazon Inspector to assess the DynamoDB table for vulnerabilities.
B.Enable DynamoDB Accelerator (DAX) and configure it to log all read requests.
C.Create a CloudWatch Logs metric filter on the CloudTrail log group to detect unauthorized access attempts and set up a CloudWatch alarm.
D.Enable VPC Flow Logs on the subnet where DynamoDB endpoints are deployed.
AnswerC

CloudWatch Logs can analyze CloudTrail logs and trigger alarms based on patterns.

Why this answer

CloudWatch Logs can be used to monitor CloudTrail logs and trigger alerts on specific patterns like unauthorized access. CloudTrail logs all DynamoDB API calls, including queries that return no results. By creating a metric filter on the CloudTrail log group for unauthorized access patterns (e.g., AccessDenied exceptions) and setting a CloudWatch alarm, the company can get immediate alerts.

Option A (Amazon Inspector) is for vulnerability assessment, not access logging. Option B (DAX) is a caching layer and does not log all read requests; it only caches and can be configured for logging, but it does not replace CloudTrail for auditing. Option D (VPC Flow Logs) captures network traffic, not API call details.

282
MCQhard

An IAM policy is attached to a user. What is the effect of this policy on the user's ability to delete the DB instance named prod-db? The policy is: ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Deny", "Action": "rds:DeleteDBInstance", "Resource": "arn:aws:rds:us-east-1:123456789012:db:prod-db" }, { "Effect": "Allow", "Action": "rds:*", "Resource": "*" } ] } ```

A.The user can delete the DB instance only after creating a final snapshot.
B.The user can delete the DB instance because the Allow statement grants all actions.
C.The user cannot delete the DB instance because the Deny statement explicitly denies it.
D.The user can delete the DB instance because the Allow statement is broader and applies to all resources.
AnswerC

Assumes an explicit Deny statement, but without the policy, we cannot confirm whether a Deny exists.

Why this answer

In IAM policy evaluation, an explicit Deny overrides any Allow. The policy explicitly denies the `rds:DeleteDBInstance` action on the `prod-db` resource, so the user cannot delete the DB instance, regardless of the Allow statement granting all RDS actions.

283
MCQmedium

A company is migrating its on-premises Oracle database to Amazon RDS for Oracle. As part of the migration, they need to ensure that all sensitive data is encrypted at rest using AWS Key Management Service (AWS KMS). Which configuration step is required to achieve this?

A.Modify the existing DB instance to enable encryption.
B.Configure SSL/TLS on the DB instance to encrypt data at rest.
C.Use AWS CloudHSM to generate and store the encryption keys.
D.Create a new encrypted DB instance by enabling encryption and specifying a KMS key.
AnswerD

Creating a new encrypted RDS instance with a KMS key is the correct way to enable encryption at rest.

Why this answer

To encrypt an Amazon RDS for Oracle DB instance at rest using AWS KMS, you must enable encryption when creating the DB instance and specify a KMS key. Encryption cannot be added to an existing unencrypted DB instance directly; you must take a snapshot, create an encrypted copy, and restore it. Option A is incorrect because modifying an existing instance does not allow enabling encryption.

Option B is incorrect because SSL/TLS encrypts data in transit, not at rest. Option C is incorrect because while CloudHSM can be used, AWS KMS is the simpler and more common approach, and the question specifically mentions AWS KMS.

284
Multi-Selecteasy

A developer is building a serverless application that uses Amazon DynamoDB. The application needs to access the database from an AWS Lambda function. The security team mandates that the Lambda function should not use long-term AWS credentials. Which TWO steps should be taken to securely grant access? (Choose TWO.)

Select 2 answers
A.Hardcode the AWS access key ID and secret access key in the Lambda environment variables.
B.Create an IAM role with a policy that allows DynamoDB actions.
C.Configure the Lambda function to access the internet for authentication.
D.Store the database credentials in AWS Secrets Manager and retrieve them in the Lambda function.
E.Attach the IAM role to the Lambda function's execution role.
AnswersB, E

IAM role provides temporary credentials.

Why this answer

To securely grant an AWS Lambda function access to DynamoDB without using long-term credentials, you should create an IAM role that grants the necessary DynamoDB permissions (option B) and then attach that IAM role to the Lambda function's execution role (option E). This allows Lambda to obtain temporary credentials via the IAM role, eliminating the need for hardcoded credentials. Option A is incorrect because hardcoding credentials in environment variables is not secure and uses long-term credentials.

Option C is incorrect because the function does not need internet access for authentication; IAM roles provide temporary credentials internally. Option D is incorrect because while Secrets Manager can store credentials, it still requires managing secrets and may not align with the mandate to avoid long-term credentials; IAM roles are the preferred method.

285
Multi-Selecteasy

Which TWO AWS services can be used to centrally manage database credentials securely? (Choose two.)

Select 2 answers
A.AWS Secrets Manager
B.AWS CloudFormation
C.Amazon S3
D.AWS Identity and Access Management (IAM)
E.AWS Systems Manager Parameter Store
AnswersA, E

Managed service for secrets.

Why this answer

Options A and E are correct. AWS Secrets Manager is specifically designed to centrally manage secrets, including database credentials, with features like automatic rotation. AWS Systems Manager Parameter Store can also securely store secrets (e.g., using SecureString parameters).

Option B (AWS CloudFormation) is incorrect because it is an infrastructure-as-code service, not a secrets manager. Option C (Amazon S3) is incorrect because it is an object storage service, not designed for secret storage. Option D (AWS IAM) is incorrect because it manages access permissions and identities, not secrets.

286
Multi-Selecthard

A company is designing a secure strategy for managing Amazon RDS for Oracle encryption keys. They want to use AWS KMS with Customer Master Keys (CMKs) for encryption at rest. Which THREE best practices should they follow?

Select 3 answers
A.Grant the RDS service principal (rds.amazonaws.com) only the necessary KMS permissions to use the CMK.
B.Create separate KMS keys for different environments (e.g., production, development).
C.Disable key rotation to maintain consistent encryption across all snapshots.
D.Store the KMS CMK inside the Oracle database for faster encryption.
E.Enable automatic rotation of the KMS CMK annually.
AnswersA, B, E

Least privilege ensures that only RDS can use the key for encryption operations.

Why this answer

Options A, B, and E are correct. Using separate KMS keys for different environments provides isolation (option B), enabling automatic key rotation is a security best practice (option E), and granting least privilege access to KMS keys is fundamental (option A). Option C is incorrect because disabling key rotation is not recommended and can lead to security risks.

Option D is incorrect because storing the CMK inside the database is insecure and defeats the purpose of using KMS.

287
MCQmedium

A company is using an Amazon RDS for MySQL DB instance. The security team requires that all database connections be encrypted in transit. Which configuration step ensures this requirement is met?

A.Enable encryption at rest for the RDS instance.
B.Store the database password in AWS Secrets Manager.
C.Modify the network ACL to only allow traffic on port 3306.
D.Set the 'require_secure_transport' parameter to 1 in the DB parameter group.
AnswerD

This forces TLS connections.

Why this answer

Setting the 'require_secure_transport' parameter to 1 in the DB parameter group forces clients to use TLS/SSL for connections, ensuring encryption in transit. Option A is incorrect because enabling encryption at rest (RDS encryption) secures data on disk but does not enforce encryption of data in transit. Option B is incorrect because storing passwords in AWS Secrets Manager manages credentials but does not enforce encrypted connections.

Option C is incorrect because modifying a network ACL to allow traffic on port 3306 controls network access but does not enforce encryption of the data transmitted over that port.

288
MCQeasy

A company needs to encrypt data at rest for their Amazon Aurora PostgreSQL database. Which solution is the MOST secure and requires the least operational overhead?

A.Enable encryption at rest using AWS KMS when creating the Aurora cluster.
B.Use Amazon EBS encryption on the underlying volumes.
C.Encrypt the database after creation by modifying the DB instance.
D.Use client-side encryption in the application.
AnswerA

Enabling encryption at rest using AWS KMS during database creation is the simplest and most secure approach. Aurora handles encryption transparently.

Why this answer

Enabling encryption at rest using AWS KMS during database creation is the simplest and most secure approach. Option A is correct. Option B is wrong because EBS encryption only protects the underlying storage, not the Aurora database engine layer, and it adds operational overhead.

Option C is wrong because you cannot encrypt an existing unencrypted Aurora cluster directly; you must perform a manual snapshot and restore to a new encrypted cluster, which increases complexity. Option D is wrong because client-side encryption requires managing encryption keys in the application, increasing complexity and operational overhead.

289
MCQmedium

A company uses Amazon DynamoDB with AWS KMS customer managed keys for encryption at rest. The security team wants to audit who is using the KMS key to encrypt and decrypt data. Which AWS service should be used?

A.Amazon S3 access logs
B.AWS Config
C.AWS CloudTrail
D.Amazon CloudWatch Logs
AnswerC

AWS CloudTrail logs all KMS API calls, including Encrypt and Decrypt, enabling auditing of who used the KMS key.

Why this answer

AWS CloudTrail logs all KMS API calls, including Encrypt and Decrypt, enabling auditing of who used the KMS key. Amazon S3 access logs (option A) are for S3 bucket access, not KMS. AWS Config (option B) tracks resource configuration changes, not API calls.

Amazon CloudWatch Logs (option D) can store logs but does not capture KMS API calls by itself.

290
MCQhard

A company uses Amazon DynamoDB with a global secondary index (GSI) on a table that contains sensitive data. The security team requires that the GSI be encrypted with a different AWS KMS key than the base table. Can this be achieved, and if so, how?

A.Yes, by using a custom KMS key policy that differentiates between table and index.
B.Yes, by specifying a different KMS key ID when creating the GSI.
C.No, DynamoDB encrypts the entire table and all its indexes with the same KMS key.
D.No, but you can use a different KMS key for the table and then the GSI will automatically use a different key.
AnswerC

DynamoDB uses one KMS key for the table and all associated indexes.

Why this answer

DynamoDB encrypts all data at rest using a single KMS key per table. The base table and all of its GSIs are encrypted with the same key. It is not possible to use a different KMS key for a GSI.

Option A is wrong because the GSI cannot have a separate key. Option B is wrong because KMS key policies do not allow per-index encryption. Option D is wrong because the table and its GSIs always use the same key.

291
MCQmedium

A company is using Amazon DynamoDB to store sensitive customer data. They need to ensure that all data is encrypted at rest using a customer-managed AWS KMS key. The company also wants to rotate the KMS key every year. What is the simplest way to achieve key rotation?

A.Create a new KMS key every year and update the DynamoDB table to use the new key.
B.Manually rotate the key by deleting and recreating the KMS key each year.
C.Enable automatic key rotation in AWS KMS for the customer-managed key.
D.Import new key material into the existing KMS key every year.
AnswerC

Automatic rotation rotates the key material annually without manual intervention.

Why this answer

The simplest way to achieve annual key rotation for a customer-managed AWS KMS key used with DynamoDB is to enable automatic key rotation on the existing key. AWS KMS supports automatic rotation of customer-managed keys once per year when enabled, which can be done through the KMS console or API without any manual intervention or table modification. Option A is incorrect because creating a new key and updating the DynamoDB table requires manual effort and is more complex than enabling automatic rotation.

Option B is incorrect because deleting and recreating the key is disruptive and not simpler. Option D is incorrect because importing new key material does not provide automatic rotation and is not the simplest method.

292
MCQmedium

A database administrator runs the described command. What does the output indicate about the RDS instance?

A.The DB instance is not encrypted at rest.
B.The DB instance is in a failed state.
C.The DB instance is running PostgreSQL.
D.The DB instance is encrypted at rest using a KMS key.
AnswerA

StorageEncrypted is false.

Why this answer

The output shows 'StorageEncrypted: false' and 'KmsKeyId: null', which indicates the DB instance is not encrypted at rest. Option B is incorrect because the output does not indicate any failed state; it's a valid status showing encryption configuration. Option C is incorrect because the output does not mention the database engine type.

Option D is incorrect because an encrypted instance would show 'StorageEncrypted: true' and a non-null KmsKeyId.

293
Drag & Dropmedium

Arrange the steps to restore an Amazon RDS for MySQL DB instance to a new instance from a manual snapshot in the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4

Why this order

Restoring from a manual snapshot involves selecting the snapshot, configuring the new instance, and waiting for completion.

294
MCQhard

A financial services company uses Amazon RDS for MySQL to store sensitive customer data. The compliance team requires that all database administrators (DBAs) must authenticate using IAM database authentication, and no static database passwords should be used. A junior DBA has been granted the rds_iam role in the database. However, the junior DBA is unable to connect using the AWS CLI command: aws rds generate-db-auth-token --hostname mydb.xyz.us-east-1.rds.amazonaws.com --port 3306 --username jdba. The error message says 'Access denied'. What is the most likely cause?

A.The RDS instance does not have a resource-based policy that grants the junior DBA access.
B.The junior DBA is not using an SSL connection to the database.
C.The security group does not allow inbound traffic on port 3306 from the junior DBA's IP address.
D.The RDS instance does not have IAM database authentication enabled.
AnswerD

Without IAM DB auth enabled on the instance, the authentication token is not accepted.

Why this answer

For IAM database authentication to work, the RDS instance must have the 'IAM DB authentication' setting enabled. If it is not enabled, the authentication token generated by `generate-db-auth-token` will be rejected with an 'Access denied' error. Option A is incorrect because RDS does not use resource-based policies; IAM policies are attached to users/roles.

Option B is incorrect because SSL is required for IAM auth, but a missing SSL connection would result in a different error (e.g., 'SSL required'). Option C is incorrect because network issues would typically cause a timeout or connection refused, not an authentication error.

295
Multi-Selectmedium

A company has an Amazon DynamoDB table that stores user sessions. The security team wants to ensure that only authorized applications can read and write to the table, and that all access is logged. Which THREE steps should the company take to meet these requirements?

Select 3 answers
A.Enable AWS CloudTrail to log DynamoDB API calls.
B.Create an IAM role with a policy that allows only the required DynamoDB actions.
C.Use an interface VPC endpoint for DynamoDB with a VPC endpoint policy.
D.Encrypt the table using a customer-managed KMS key.
E.Enable DynamoDB Streams and process events with Lambda.
AnswersA, B, C

Logs all data plane and control plane operations.

Why this answer

Options A, B, and C are correct. IAM roles with least privilege restrict access. AWS CloudTrail logs API calls for auditing.

VPC endpoints ensure traffic stays within the AWS network and can be controlled via endpoint policies. Option D (encryption with KMS) is for data at rest encryption, not access control or logging. Option E (DynamoDB Streams) is for change data capture, not access control or logging.

296
Multi-Selectmedium

Which TWO actions can help protect an RDS database from SQL injection attacks? (Choose 2.)

Select 2 answers
A.Enable Multi-AZ for the RDS instance.
B.Enable encryption at rest using KMS.
C.Use parameterized SQL statements in the application.
D.Restrict network access using security groups.
E.Implement input validation and sanitization.
AnswersC, E

Parameterized queries separate SQL logic from data.

Why this answer

Parameterized SQL statements (also known as prepared statements) ensure that user input is treated strictly as data, not executable code, preventing SQL injection at the application layer. Option E is correct because input validation and sanitization filter out malicious characters or patterns before they reach the database, adding an extra layer of defense. Both measures are essential; network controls (security groups) and encryption do not prevent injection attacks.

Exam trap

The trap here is that candidates often confuse network-level controls (security groups) or encryption features with application-layer input validation, mistakenly believing that restricting access or encrypting data can prevent SQL injection, when in fact only proper query construction and input handling can stop the attack.

297
Multi-Selecthard

A company is designing a disaster recovery strategy for an Amazon RDS for SQL Server DB instance that contains sensitive financial data. The database must be encrypted at rest using a customer-managed AWS KMS key. The recovery point objective (RPO) is 5 minutes, and the recovery time objective (RTO) is 1 hour. Which THREE steps should be taken to meet these requirements?

Select 3 answers
A.Take a manual DB snapshot every hour.
B.Enable Multi-AZ deployment for automatic failover.
C.Store the KMS key in the secondary Region by creating a cross-Region KMS key replica.
D.Configure automated backups with a 5-minute backup interval.
E.Create a cross-Region read replica in a different AWS Region.
AnswersC, D, E

A cross-Region KMS key replica ensures the KMS key is available in the secondary region to encrypt the cross-region read replica, making this step necessary.

Why this answer

To achieve an RPO of 5 minutes and RTO of 1 hour across regions, you need automated backups with a 5-minute interval (D) so that transaction logs are backed up frequently. A cross-Region read replica (E) can be promoted quickly in the secondary region to meet the RTO. Since the database uses a customer-managed KMS key, you must create a cross-Region KMS key replica (C) in the secondary region so that the replica can be encrypted.

Multi-AZ (B) only provides high availability within a single region and does not support cross-region disaster recovery, so it does not help meet these RPO/RTO requirements.

Exam trap

Candidates often think Multi-AZ is required for disaster recovery across regions, but it only handles failure within a single region.

298
MCQmedium

A developer needs to connect to the RDS instance from an EC2 instance in the same VPC. The EC2 instance's security group allows outbound traffic to 0.0.0.0/0. The RDS security group inbound rules currently allow traffic from 0.0.0.0/0 on port 3306. After a security review, the company decides to restrict inbound traffic to the VPC only. Which inbound rule should be added to the RDS security group?

A.An inbound rule allowing traffic from the RDS endpoint address on port 3306.
B.An inbound rule allowing traffic from the EC2 instance's security group ID on port 3306.
C.An inbound rule allowing traffic from 10.0.0.0/8 on port 3306.
D.An inbound rule allowing traffic from the VPC CIDR (e.g., 10.0.0.0/16) on port 3306.
AnswerB

This restricts access to only the EC2 instances in that security group.

Why this answer

Referencing the EC2 instance's security group ID in the RDS inbound rule is the most secure and specific method to restrict access to only that EC2 instance within the VPC. Option A is incorrect because the RDS endpoint is a DNS name for the database instance, not a source IP or security group. Option C is too broad, allowing any traffic from the 10.0.0.0/8 range, which may include subnets outside the VPC.

Option D is less specific than using the security group ID and could permit access from any resource within the VPC CIDR, whereas the security group approach provides granular control.

299
MCQhard

A company is using Amazon Aurora MySQL-Compatible Edition. The security team wants to ensure that database credentials are not stored in application configuration files. They decide to use AWS Secrets Manager to manage credentials. The application is hosted on Amazon EC2 instances that have an IAM role attached. What is the most secure way to grant the application access to the secret?

A.Grant the IAM role attached to the EC2 instance permissions to read the secret, and use the Secrets Manager API to retrieve it at runtime.
B.Store the secret in the application code and rotate it periodically.
C.Attach a resource-based policy to the EC2 instance allowing access to the secret.
D.Store the secret in an encrypted S3 bucket and have the application download it at startup.
AnswerA

This is the most secure approach because the secret is never stored on the instance; it is retrieved on demand via API.

Why this answer

The most secure approach is to grant the EC2 IAM role permission to read the secret using an IAM policy attached to the role, and then have the application call the Secrets Manager API to retrieve the secret at runtime. This avoids storing secrets in code or configuration files. Option B is wrong because storing the secret in application code is insecure.

Option C is wrong because resource-based policies are not attached to EC2 instances; IAM roles are the correct mechanism. Option D is wrong because storing secrets in an S3 bucket introduces additional complexity and potential exposure; using Secrets Manager with IAM roles is more secure.

300
MCQmedium

A company stores sensitive data in an Amazon S3 bucket that is accessed by an Amazon Redshift cluster. The security team requires that the data in transit between Redshift and S3 be encrypted. Which configuration ensures this?

A.Enable server-side encryption (SSE-S3) on the S3 bucket.
B.Ensure that the Redshift cluster has SSL enabled, which encrypts data in transit by default for COPY/UNLOAD operations to S3.
C.Configure a VPC endpoint for S3.
D.Use client-side encryption on the data before uploading to S3.
AnswerB

Redshift uses SSL for data transfer to S3 by default.

Why this answer

Redshift automatically uses SSL encryption for data in transit when moving data to and from S3 using COPY/UNLOAD commands. Option A is incorrect because server-side encryption (SSE-S3) encrypts data at rest, not in transit. Option C is incorrect because client-side encryption encrypts data before sending, but Redshift handles this automatically with SSL.

Option D is incorrect because VPC endpoints do not encrypt data in transit; they provide private connectivity.

← PreviousPage 4 of 5 · 310 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Db Security questions.