Courseiva

CCNA Data Security and Governance Questions

75 of 318 questions · Page 4/5 · Data Security and Governance · Answers revealed

226
MCQmedium

A company uses Amazon S3 to store log files. The security team notices that some objects are being accessed from an unexpected AWS account. The data engineer needs to identify which specific IAM user or role is accessing the objects. Which AWS service should be used to get this information?

A.AWS Trusted Advisor
B.Amazon S3 server access logs
C.AWS CloudTrail
D.AWS Config
AnswerC

CloudTrail logs API calls and can be used to trace S3 access to specific IAM users or roles.

Why this answer

AWS CloudTrail records API calls including S3 object-level operations. It logs who made the call, from which account, and other details. S3 server access logs provide similar info but are log files themselves, not a queryable service.

Config is for resource configuration tracking. Trusted Advisor gives best practice checks.

227
MCQeasy

A data engineer needs to restrict access to an Amazon S3 bucket so that only objects encrypted with a specific AWS KMS key can be uploaded. Which S3 bucket policy condition should be used?

A.s3:x-amz-server-side-encryption-aws-kms-key-id
B.kms:ViaService
C.s3:x-amz-server-side-encryption
D.kms:EncryptionContext
AnswerA

This condition key allows you to specify a required KMS key ID for server-side encryption.

Why this answer

The correct condition is s3:x-amz-server-side-encryption-aws-kms-key-id (option A). This condition key allows you to require that objects uploaded to the S3 bucket are encrypted with a specific AWS KMS key by checking the key ID used in the encryption header. Option B (kms:ViaService) restricts KMS key usage to specific AWS services but does not enforce a key ID on S3 objects.

Option C (s3:x-amz-server-side-encryption) only checks whether server-side encryption is enabled, not the specific key. Option D (kms:EncryptionContext) is used to enforce encryption context, not the key ID.

228
MCQhard

Refer to the exhibit. A data engineer runs the AWS CLI command shown to encrypt a file using AWS KMS. The command succeeds. Later, the engineer tries to decrypt the file using the same key but without providing an encryption context. The decryption fails. What is the most likely reason?

A.The KMS key policy does not allow decryption.
B.The KMS key has been disabled.
C.The plaintext file was corrupted.
D.The encryption context must be provided during decryption.
AnswerD

KMS uses encryption context as AAD; it must match exactly.

Why this answer

When encrypting data with AWS KMS, an encryption context can be provided as additional authenticated data (AAD). This context must be supplied during decryption; otherwise, decryption fails. The command succeeded during encryption, so the key is not disabled (B is wrong) and the key policy is not the issue (A is wrong).

File corruption would cause a different error (C is wrong).

229
Multi-Selecteasy

A company wants to ensure that an IAM user can only launch Amazon EC2 instances of a specific instance type. Which THREE IAM policy elements are required to define this permission? (Choose THREE.)

Select 3 answers
A.Action
B.Principal
C.Effect
D.Resource
E.Condition
AnswersA, C, D

Correct: The Action element specifies which AWS service actions are allowed or denied (e.g., ec2:RunInstances).

Why this answer

To define a permission in an IAM policy, the required elements are Effect (allow/deny), Action (e.g., ec2:RunInstances), and Resource (e.g., '*'). While a Condition can further restrict the permission (e.g., to a specific instance type), it is not mandatory. Therefore, the three required elements are Effect, Action, and Resource.

230
MCQhard

A data engineer is designing a system to handle sensitive customer data in Amazon RDS for PostgreSQL. The compliance team requires that the data be encrypted at rest and that encryption keys be rotated every 90 days. Which solution meets these requirements?

A.Use AWS CloudHSM to store the encryption key and create a custom key rotation Lambda function
B.Enable RDS encryption with a customer managed KMS key, enable automatic key rotation, and manually rotate the key every 90 days
C.Enable Transparent Data Encryption (TDE) on the RDS instance
D.Enable RDS encryption with a customer managed KMS key and enable automatic key rotation
AnswerB

Manual rotation every 90 days satisfies the requirement.

Why this answer

Amazon RDS for PostgreSQL encryption at rest uses AWS KMS with customer managed keys. Automatic key rotation in KMS rotates the key annually, but the requirement is every 90 days. Therefore, manual key rotation must be performed every 90 days in addition to enabling automatic key rotation.

Option A is incorrect because AWS CloudHSM is not directly integrated with RDS for encryption at rest; RDS encryption uses KMS. Option C is incorrect because Transparent Data Encryption (TDE) is not supported for Amazon RDS PostgreSQL; RDS uses KMS for encryption. Option D is incorrect because KMS automatic key rotation alone rotates keys only once per year, not every 90 days as required.

231
MCQhard

A company uses AWS Lake Formation to manage permissions on a data lake. A data engineer creates a table in the Data Catalog and grants SELECT permission to a group of analysts. The analysts report they can see the table but get an AccessDenied error when querying it with Amazon Athena. What is the most likely cause?

A.The analysts' IAM role does not have permission to call the Athena API.
B.The table is not registered with Lake Formation as a resource.
C.The Athena workgroup is configured with a per-query result location that the analysts cannot write to.
D.The S3 bucket policy does not allow the analysts' IAM role.
AnswerA

Lake Formation grants database permissions, but IAM must allow Athena actions.

Why this answer

The analysts can see the table in the Data Catalog but receive an AccessDenied error when querying with Athena. This indicates that Lake Formation has granted SELECT permission on the table, so the table is visible and the permission exists. The error occurs when Athena attempts to run the query, meaning the IAM role used by Athena (which is the analysts' role or a service role) lacks permission to call the Athena API (e.g., StartQueryExecution, GetQueryResults).

Lake Formation permissions cover Data Catalog and S3 access, but do not grant IAM permissions for Athena itself. Therefore, Option A is the most likely cause. Option B is incorrect because the table is visible, so it is registered.

Option C is incorrect because the workgroup result location issue would produce a different error (e.g., insufficient permissions on S3). Option D is incorrect because Lake Formation manages S3 access via registered locations, and if the table is registered, the bucket policy is overridden by Lake Formation permissions.

232
MCQmedium

Refer to the exhibit. A data engineer applies this S3 bucket policy to an S3 bucket. What is the effect of this policy?

A.Allows access only from specific IP addresses.
B.Allows only HTTPS requests to get and put objects, and denies HTTP requests.
C.Allows only GetObject actions over HTTPS.
D.Allows anonymous access to get and put objects over HTTP.
AnswerB

The condition enforces secure transport.

Why this answer

The bucket policy allows GetObject and PutObject actions only when the request uses HTTPS, and explicitly denies all S3 actions when the request uses HTTP due to the condition `aws:SecureTransport=false`. Therefore, only HTTPS requests for Get and Put are permitted. Option A is incorrect because the policy does not restrict by IP addresses.

Option C is incorrect because both Get and Put are allowed over HTTPS, not just Get. Option D is incorrect because the policy does not grant anonymous access; it requires secure transport and does not allow HTTP.

233
MCQeasy

A company needs to centralize audit logs from multiple AWS accounts into a single S3 bucket. Which service should be used to aggregate these logs?

A.AWS Config
B.Amazon Kinesis Data Firehose
C.AWS CloudTrail
D.Amazon CloudWatch Logs
AnswerC

CloudTrail supports multi-account trail that aggregates logs into a single S3 bucket.

Why this answer

AWS CloudTrail can be configured to deliver logs from multiple accounts to a single S3 bucket using a trail in the management account. Option C is correct.

234
MCQeasy

A data engineer needs to ensure that data in transit between an Amazon RDS for PostgreSQL database and an application is encrypted. Which configuration should be used?

A.Use VPC peering to connect the application to the database
B.Enable SSL/TLS for the database connection
C.Enable encryption at rest for the RDS instance
D.Use IAM database authentication
AnswerB

Enabling SSL/TLS encrypts the connection between the application and the database, securing data in transit.

Why this answer

Enabling SSL/TLS for the database connection encrypts the data in transit between the application and the RDS PostgreSQL instance, ensuring confidentiality. Option A (VPC peering) provides network connectivity but does not encrypt traffic. Option C (encryption at rest) protects data stored on disk, not in transit.

Option D (IAM database authentication) controls access but does not encrypt the connection.

235
MCQmedium

A company wants to enable automatic encryption for all new objects written to an S3 bucket. The bucket has existing objects that are unencrypted. Which solution meets these requirements with the least operational overhead?

A.Configure a lifecycle policy to transition objects to a new bucket with encryption
B.Enable default encryption on the bucket using SSE-S3
C.Use S3 server-side encryption with S3 managed keys (SSE-S3) and apply a bucket policy that denies writes without encryption
D.Use S3 Batch Operations to copy existing objects with SSE-S3
AnswerB

Correct: Bucket default encryption using SSE-S3 automatically encrypts all new objects without any extra configuration or overhead.

Why this answer

Enabling default encryption on the bucket using SSE-S3 automatically encrypts all new objects written to the bucket, with minimal operational overhead. Option A is incorrect because lifecycle policies do not encrypt objects; they manage transitions and deletions. Option C is redundant since bucket default encryption already denies unencrypted writes via policy, but the policy itself is additional overhead and not automatic.

Option D is incorrect because S3 Batch Operations require manual initiation and only encrypt existing objects, not new ones automatically.

236
MCQeasy

A company wants to ensure that only encrypted connections are used when data is transferred to S3. Which policy condition should be used in an S3 bucket policy?

A.Condition: { Null: { s3:x-amz-server-side-encryption: true } }
B.Condition: { StringEquals: { s3:signatureversion: ["AWS4-HMAC-SHA256"] } }
C.Condition: { StringNotEquals: { aws:SourceIp: ["0.0.0.0/0"] } }
D.Condition: { Bool: { aws:SecureTransport: false } }
AnswerD

Denying requests where SecureTransport is false enforces HTTPS.

Why this answer

The condition `aws:SecureTransport: false` is used to deny requests that are not sent over SSL/TLS, ensuring encrypted connections for data transfer to S3. Option A (`s3:x-amz-server-side-encryption`) controls encryption at rest, not in transit. Option B (`s3:signatureversion`) checks the signature version used for request authentication, not encryption.

Option C (`aws:SourceIp`) filters by source IP address, which is unrelated to encryption.

237
MCQmedium

Refer to the exhibit. The S3 bucket policy above is applied to the bucket "example-bucket". An IAM user attempts to upload an object to the bucket without specifying any encryption header. What is the outcome?

A.The upload succeeds but the object is not encrypted
B.The upload fails because GetObject requires encryption
C.The object is uploaded successfully with SSE-S3 encryption by default
D.The upload fails with an Access Denied error
AnswerD

The Deny statement blocks the upload.

Why this answer

The Deny statement in the bucket policy denies PutObject if the encryption header is not AES256. Since the user did not specify any encryption header, the condition StringNotEquals 'AES256' evaluates to true, causing the request to be denied with an Access Denied error. Option A is wrong because the Deny overrides the Allow.

Option B is wrong because the Deny applies to PutObject, not GetObject. Option C is wrong because the Deny is conditional on encryption header, not default encryption.

238
Multi-Selectmedium

A company needs to securely store and manage database credentials used by a data pipeline. Which AWS services can be used to store and rotate secrets automatically? (Choose TWO.)

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

Correct. Systems Manager Parameter Store can store secrets and, with the Advanced tier, can automate rotation via custom Lambda functions.

Why this answer

AWS Systems Manager Parameter Store (A) can securely store secrets and, when using the Advanced tier, supports automatic rotation via AWS Lambda. AWS Secrets Manager (E) provides native automatic rotation for database credentials and other secrets. B (IAM) is for identity and access management, not secret storage.

C (KMS) manages encryption keys, not secrets. D (CloudHSM) provides hardware security modules for key management, not secret storage. Therefore, the correct answers are A and E.

239
MCQmedium

A company uses Amazon EMR to process large datasets stored in Amazon S3. The data is encrypted at rest using SSE-S3. The security team now requires that all data at rest be encrypted with customer-managed KMS keys (SSE-KMS). The data engineer needs to migrate existing data to use SSE-KMS without downtime. The engineer plans to use S3 Batch Operations to copy objects in place. However, the Batch Operations job fails with a KMS access denied error. The engineer has confirmed that the Batch Operations service role has the necessary KMS permissions. What is the most likely cause?

A.The KMS key policy does not allow the S3 service to use the key.
B.The Batch Operations job is using the wrong IAM role.
C.The source objects are encrypted with SSE-S3, which cannot be copied to SSE-KMS.
D.The Batch Operations service role is missing the kms:GenerateDataKey permission for the destination KMS key.
AnswerD

Batch Operations needs to generate a new data key for the destination.

Why this answer

Batch Operations uses a service role that must have kms:Decrypt permission for the source objects and kms:GenerateDataKey for the destination. The source objects are encrypted with SSE-S3, which does not use KMS, so the service role does not need kms:Decrypt for source. However, the error indicates KMS access denied, likely because the service role does not have kms:GenerateDataKey for the destination KMS key.

Option A is wrong because the service role is used. Option B is wrong because the source objects are SSE-S3. Option C is wrong because KMS key policy is for the destination key.

240
MCQmedium

The IAM policy shown in the exhibit is attached to a user. The user tries to upload an object to my-bucket using the AWS CLI without specifying encryption. What will happen?

A.The upload will succeed because the bucket has default encryption
B.The upload will succeed but the object will not be encrypted
C.The upload will fail because a KMS key is required
D.The upload will fail with an access denied error
AnswerD

The condition requires the encryption header to be present.

Why this answer

The IAM policy allows s3:PutObject only if the request includes the encryption header x-amz-server-side-encryption with value AES256. Since the user does not specify any encryption, the condition is not met, and the request is denied with an access denied error. Option A is wrong because the condition is not optional.

Option B is wrong because default encryption applies only when the policy does not explicitly require a header; here the policy enforces the header. Option C is wrong because the policy does not require a KMS key; it requires AES256 encryption, which is SSE-S3.

241
MCQeasy

A data engineer needs to ensure that data stored in Amazon S3 is automatically deleted after 30 days. Which S3 feature should be used?

A.S3 Lifecycle policy
B.S3 MFA Delete
C.S3 Versioning
D.S3 Object Lock
AnswerA

Lifecycle policies can expire objects after 30 days.

Why this answer

S3 Lifecycle policies can automatically delete objects after a specified time period, such as 30 days. Option B (MFA Delete) requires multi-factor authentication for deletion but does not automate deletion. Option C (Versioning) keeps multiple versions but does not delete.

Option D (Object Lock) prevents deletion or modification but does not schedule automatic deletion.

242
Multi-Selectmedium

A data engineer is designing a data lake on S3 with fine-grained access control using AWS Lake Formation. Which FOUR permissions can be managed by Lake Formation?

Select 4 answers
A.SELECT on a table
B.INSERT on a table
C.DESCRIBE on a table
D.ALTER TABLE on a table
E.DELETE on a table
AnswersA, B, C, E

Correct: Lake Formation supports SELECT permission on tables.

Why this answer

AWS Lake Formation supports fine-grained permissions including SELECT, INSERT, DESCRIBE, and DELETE on tables. ALTER TABLE is not a Lake Formation permission; it is managed by other services like IAM. Therefore, the correct answers are A, B, C, and E.

Exam trap

Candidates often assume DELETE is not managed by Lake Formation, but DELETE is indeed a supported permission for data lake tables.

243
MCQhard

A company stores PII in an S3 bucket. The security team wants to use Amazon Macie to discover sensitive data. After enabling Macie, they notice that no sensitive data findings are generated. The S3 bucket is in the same account. What is the most likely reason?

A.The bucket policy blocks access from Macie's service principal.
B.Macie is not configured with cross-account access to the bucket.
C.The S3 bucket is in a different AWS Region than the Macie session.
D.The S3 objects have private ACLs that prevent Macie from reading them.
AnswerC

Macie only analyzes data in the same Region.

Why this answer

Macie only scans buckets in the same AWS Region as the Macie session. If the bucket is in a different region, Macie cannot discover sensitive data in it. Option A is incorrect because Macie uses service-linked roles, not the bucket policy, to access buckets in the same account.

Option B is incorrect because Macie does not require cross-account access for buckets in the same account. Option D is incorrect because Macie can read objects regardless of ACLs as long as the appropriate IAM permissions are granted.

244
MCQeasy

A company uses S3 to store sensitive customer data. To prevent accidental public access, a data engineer needs to ensure that all S3 buckets block public access at the account level. Which AWS service should be used to enforce this policy?

A.Enable S3 Block Public Access at the account level in the management account
B.Create an IAM policy that denies s3:PutBucketPolicy
C.Use an SCP in AWS Organizations to deny s3:PutBucketPublicAccessBlock
D.Set up AWS Config rules to automatically remediate public buckets
AnswerC

SCPs can enforce that no account can disable block public access, covering all accounts.

Why this answer

AWS Organizations with SCPs can centrally control permissions across all accounts, including blocking public access to S3 buckets. Option A is wrong because IAM policies are per-identity and not account-wide. Option B is wrong because S3 Block Public Access settings exist per bucket or account, but to enforce across all accounts, Organizations is needed.

Option D is wrong because AWS Config can detect non-compliance but not enforce. Option C is correct.

245
MCQhard

Refer to the exhibit. A data engineer attached this S3 bucket policy to the bucket 'example-bucket'. What is the effect of this policy?

A.It allows all PutObject requests that do not use encryption
B.It denies PutObject requests that do not use SSE-S3
C.It denies all PutObject requests unless they use SSE-KMS
D.It denies all PutObject requests from anonymous users
AnswerB

Ly states that the policy denies PutObject requests that do not use SSE-S3. This matches the policy's condition.

Why this answer

The bucket policy denies PutObject requests that do not include the x-amz-server-side-encryption header with value AES256 (SSE-S3). This means any PutObject request without SSE-S3 encryption is denied. Therefore, the correct answer is B.

246
MCQhard

A healthcare company stores patient records in an S3 bucket encrypted with SSE-S3. The data engineering team uses AWS Glue ETL jobs to process this data and load it into an Amazon Redshift cluster for analytics. Recently, the security team mandated that all sensitive data must be encrypted at rest using customer-managed keys (CMK) in AWS KMS, and that the keys must be rotated automatically every year. The team updated the S3 bucket to use SSE-KMS with a CMK and enabled automatic key rotation. However, after the change, the Glue ETL jobs that read from the S3 bucket started failing with 'Access Denied' errors. The Glue job uses an IAM role named 'GlueETLRole' that has the following permissions: s3:GetObject on the bucket, kms:Decrypt and kms:GenerateDataKey on the CMK, and all necessary Glue permissions. The Redshift cluster is also encrypted with a different CMK, and the Glue role has kms:Decrypt on that key as well. What is the most likely cause of the failure?

A.The KMS key policy for the CMK used for S3 encryption does not grant 'GlueETLRole' permission to use the key.
B.The IAM role 'GlueETLRole' does not have kms:Decrypt permission on the CMK used for S3 encryption.
C.The Glue job requires kms:Encrypt permission to read encrypted data from S3.
D.The S3 VPC endpoint policy does not allow the Glue job to access the KMS key.
AnswerA

The key policy must allow the IAM role to use the key.

Why this answer

The issue is that while the IAM role 'GlueETLRole' has the necessary KMS permissions (kms:Decrypt and kms:GenerateDataKey) via IAM policies, the key policy for the CMK used for S3 encryption must also explicitly grant the role (or the principal) permission to use the key. Without this key policy grant, the role's IAM permissions are insufficient, resulting in 'Access Denied' errors. Option A correctly identifies this as the most likely cause.

247
MCQmedium

A company needs to automate the detection of sensitive data in Amazon S3 and generate reports. Which AWS service should be used?

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

Macie discovers sensitive data in S3.

Why this answer

Amazon Macie is the correct service for automating detection of sensitive data in S3 and generating reports. It uses machine learning to discover and classify sensitive data. Amazon Inspector is for vulnerability management, not sensitive data detection.

Amazon GuardDuty is for threat detection. AWS Config is for resource compliance and configuration auditing.

248
MCQmedium

Refer to the exhibit. A data engineer runs this AWS CLI command to execute an Athena query. What is the purpose of the EncryptionConfiguration parameter?

A.It encrypts the query string in transit
B.It encrypts the data in the source table
C.It enables client-side encryption for the query output
D.It encrypts the query results stored in Amazon S3 at rest
AnswerD

The parameter defines encryption for the result set in S3.

Why this answer

The EncryptionConfiguration parameter in Athena specifies how the query results stored in S3 are encrypted at rest. SSE_S3 means server-side encryption with S3-managed keys. It does not encrypt the query itself, data in transit, or the source data.

249
MCQhard

A company uses Amazon EMR to process data stored in S3 with server-side encryption using AWS KMS. The EMR cluster fails with a "403 Access Denied" error when reading data from S3. The IAM role for the EMR cluster has s3:GetObject and kms:Decrypt permissions. What is the most likely issue?

A.The EC2 instance profile does not have kms:Decrypt permission
B.The S3 bucket policy denies access to the EMR cluster's IAM role
C.The EMRFS consistent view is not enabled
D.The EMR cluster is using an incorrect KMS key ID
AnswerA

The instance profile must have KMS decrypt permission.

Why this answer

Although the IAM role assigned to the EMR cluster has s3:GetObject and kms:Decrypt permissions, the EC2 instances themselves run under an instance profile (an IAM role for EC2). For S3 objects encrypted with SSE-KMS, the EC2 instance performing the read must have kms:Decrypt permission. If the instance profile lacks this permission, the request is denied with a 403 error.

Option B is less likely because a bucket policy denying access would be explicit and typically not the first thing to check. Option C (EMRFS consistent view) does not affect S3 access permissions. Option D (incorrect KMS key ID) would cause a different error (e.g., 400 Bad Request or access denied for specific keys), but the primary cause is the missing kms:Decrypt on the instance profile.

250
MCQhard

A company has an S3 bucket policy that allows access to a specific IAM role. However, an administrator notices that requests from that role are being denied. The bucket is encrypted with AES-256. What is the MOST likely reason for the denial?

A.The IAM role does not have s3:Decrypt permission on the bucket.
B.The bucket policy has an explicit deny statement that overrides the allow.
C.The bucket policy allows access, but the VPC endpoint policy denies the action.
D.The S3 Block Public Access settings are blocking the request.
AnswerC

A VPC endpoint policy can restrict actions even if the bucket policy allows them.

Why this answer

The most likely reason for the denial is that the VPC endpoint policy denies the action. Even if the bucket policy allows access to the IAM role, the VPC endpoint policy can explicitly deny the action, which overrides the bucket policy. Option A is incorrect because AES-256 encryption does not require additional permissions like s3:Decrypt.

Option B is incorrect because the question indicates the bucket policy allows access, not denies. Option D is incorrect because S3 Block Public Access settings only apply to public access, not to requests from an IAM role.

251
MCQeasy

A data engineer needs to encrypt data in transit between an Amazon RDS for MySQL instance and an application. Which solution should be used?

A.Enable encryption at rest using AWS KMS
B.Use SSL/TLS to connect to the RDS instance
C.Store the data in Amazon S3 with server-side encryption
D.Use AWS CloudHSM to generate and store encryption keys
AnswerB

SSL/TLS encrypts data in transit between client and database.

Why this answer

SSL/TLS is used to encrypt data in transit between clients and RDS. Option A is wrong because KMS encrypts data at rest, not in transit. Option C is wrong because S3 is not involved in this scenario.

Option D is wrong because CloudHSM provides hardware security modules for key storage, not encryption in transit.

252
Multi-Selecthard

A financial services company needs to share sensitive customer data with a third-party analytics firm. The data resides in an S3 bucket encrypted with an AWS KMS customer managed key. The third party has their own AWS account. Which combination of steps is required to securely share the data? (Choose TWO.)

Select 2 answers
A.Share the KMS key material with the third party
B.Update the KMS key policy to include the third-party account as a principal with kms:Decrypt permission
C.Create an IAM role in the third-party account that can be assumed by the data owner
D.Grant the third-party account access to the KMS key management
E.Configure an S3 bucket policy that grants the third-party account access to the objects
AnswersB, E

Correct. The KMS key policy must include the third-party account as a principal with kms:Decrypt permission to enable decryption of the data.

Why this answer

To share encrypted data cross-account, you must grant the third-party account access to both the S3 objects and the KMS key. Option B is correct: the KMS key policy must include the third-party account as a principal with kms:Decrypt permission to allow decryption. Option E is correct: the S3 bucket policy must grant the third-party account access to the objects (e.g., s3:GetObject).

Option A is wrong because sharing the key material is insecure and not necessary; instead, you grant decrypt permissions via the key policy. Option C is wrong: the IAM role should be created in the data owner's account, not the third-party's, and the third-party would assume that role; however, this alone does not provide KMS decrypt access. Option D is wrong because the third party does not need key management permissions (e.g., kms:PutKeyPolicy); only decrypt is needed.

253
MCQeasy

A data engineer needs to ensure that all data in an S3 bucket is encrypted at rest. The bucket contains objects uploaded by various applications. What is the simplest method to enforce encryption for all new objects?

A.Enable S3 Block Public Access to block public access to the bucket.
B.Enable default encryption on the S3 bucket using S3-Managed Keys (SSE-S3).
C.Enable S3 Object Lock on the bucket.
D.Configure an S3 bucket policy that denies PutObject requests without the x-amz-server-side-encryption header.
AnswerD

A bucket policy can conditionally deny uploads that lack the required encryption header, enforcing encryption for all new objects.

Why this answer

An S3 bucket policy can deny PutObject requests that do not include the x-amz-server-side-encryption header, thereby enforcing encryption for all new objects. Option A is wrong because S3 Block Public Access does not enforce encryption. Option B is wrong because default encryption applies only if the upload request does not specify encryption headers; it does not enforce encryption for requests that specify 'None'.

Option C is wrong because S3 Object Lock prevents deletion but does not enforce encryption.

254
MCQhard

A company has an AWS Glue ETL job that reads from an RDS MySQL instance and writes to S3. The security team requires that the connection to RDS be encrypted and that credentials be rotated automatically. Which configuration should be used?

A.Store the database password in an encrypted parameter in Systems Manager Parameter Store and enable SSL for the connection.
B.Use IAM database authentication for RDS and store credentials in Glue connection properties.
C.Store the password in a text file in an encrypted S3 bucket and use SSL.
D.Store the password in AWS Secrets Manager with automatic rotation enabled and configure Glue to use SSL for the connection.
AnswerD

Secrets Manager supports rotation and Glue can use SSL.

Why this answer

AWS Secrets Manager provides automatic rotation of RDS credentials, and AWS Glue can be configured to use SSL for an encrypted connection to RDS MySQL. Option A (Systems Manager Parameter Store) stores encrypted parameters but does not natively support automatic rotation of RDS credentials. Option B (IAM database authentication) provides authentication but does not encrypt the connection itself; SSL is still required for encryption.

Option C (encrypted S3 bucket) is not a service designed for dynamic credential management and lacks automatic rotation.

255
MCQhard

A company uses AWS KMS to encrypt data in Amazon S3 and RDS. They need to ensure that encryption keys are automatically rotated every year. Which KMS key type supports automatic annual rotation?

A.AWS owned keys
B.AWS managed keys (aws/xxx)
C.Customer managed keys
D.Custom key stores
AnswerB

Correct. AWS managed keys have automatic annual rotation enabled by default, providing seamless compliance with rotation policies.

Why this answer

AWS managed keys (AWS-managed KMS keys) have automatic rotation enabled by default every year, making option B correct. AWS owned keys are not visible to the customer and cannot be managed. Customer managed keys require explicit enabling of rotation, so they are not automatically rotated.

Custom key stores do not support automatic rotation. Therefore, only AWS managed keys provide automatic annual rotation without additional configuration.

Exam trap

Candidates may confuse customer managed keys with AWS managed keys and think that all KMS keys support automatic rotation equally. However, only AWS managed keys have automatic rotation enabled by default; customer managed keys require manual activation.

256
MCQhard

A data engineer is troubleshooting an ETL job that reads from an S3 bucket encrypted with SSE-KMS. The job is failing with an error indicating that the IAM role does not have permission to decrypt the data. What is the most likely missing permission?

A.kms:GenerateDataKey
B.s3:ListBucket
C.kms:Decrypt
D.s3:GetObject
AnswerC

To read SSE-KMS encrypted objects, the role must have kms:Decrypt permission on the KMS key.

Why this answer

Kms:Decrypt. When an S3 object is encrypted with SSE-KMS, the IAM role must have the kms:Decrypt permission to decrypt the object before reading it. Option A (kms:GenerateDataKey) is used for encryption, not decryption, so it is incorrect.

Option B (s3:ListBucket) only allows listing objects in the bucket, not reading or decrypting them. Option D (s3:GetObject) allows reading the object, but without kms:Decrypt, the encrypted object cannot be decrypted, so the read fails.

257
MCQeasy

A company wants to audit all changes to IAM policies in their AWS account. Which AWS service should be used to record these changes for compliance purposes?

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

CloudTrail records API calls made in the account, including IAM policy changes.

Why this answer

AWS CloudTrail records API calls, including IAM policy changes. AWS Config records resource configurations but not all API calls. CloudWatch Logs can store logs but does not record API calls itself.

S3 is the destination for logs, not the recording service.

258
MCQeasy

A data engineer needs to audit all changes to IAM policies in an AWS account. Which AWS service should be used?

A.AWS CloudTrail
B.AWS Config
C.AWS Organizations
D.Amazon CloudWatch Logs
AnswerA

CloudTrail records all API activity for auditing.

Why this answer

WS CloudTrail because it records API calls made in the account, including changes to IAM policies. AWS Config tracks resource configuration changes, not API calls. AWS Organizations is for multi-account management.

Amazon CloudWatch Logs is for log storage and monitoring, not auditing API calls.

259
MCQeasy

A data engineer needs to ensure that data in an S3 bucket is encrypted at rest. The bucket policy includes a condition that denies PutObject requests if the object is not encrypted. Which S3 encryption feature does this enforce?

A.S3 Object Lock
B.S3 MFA Delete
C.S3 Default Encryption
D.S3 Bucket Policy
AnswerD

Bucket policy can deny uploads if encryption is not set.

Why this answer

S3 bucket policies can require server-side encryption by denying PutObject without encryption headers. Option C (default encryption) is a bucket-level setting that automatically encrypts objects, but it does not enforce encryption via policy. Option A (object lock) prevents deletion.

Option B (MFA delete) requires multi-factor authentication.

260
MCQeasy

A company uses Amazon S3 to store sensitive customer data. The security policy requires that all objects in the bucket be encrypted at rest using server-side encryption with a customer-managed KMS key. The data engineer has enabled default encryption on the bucket using SSE-KMS with the required KMS key. However, a security scan reveals that some objects in the bucket are not encrypted with the KMS key. The objects were uploaded before the default encryption was enabled. The data engineer needs to ensure that all objects are encrypted with the KMS key without disrupting ongoing data access. What should the data engineer do?

A.Use the AWS CLI to copy the objects to themselves with the --sse-kms-key-id parameter.
B.Modify the bucket policy to deny access to objects not encrypted with the KMS key.
C.Delete the unencrypted objects and re-upload them with encryption.
D.Use S3 Batch Operations with a Lambda function to apply SSE-KMS encryption to all existing objects using the KMS key.
AnswerD

S3 Batch Operations with a Lambda function can re-encrypt all existing objects using SSE-KMS with the required KMS key, without disrupting data access.

Why this answer

S3 Batch Operations can apply SSE-KMS encryption to existing objects without disrupting access. It uses a Lambda function to re-encrypt each object with the specified KMS key. Option A is wrong because copying objects to themselves with the --sse-kms-key-id parameter does not work - it requires a full copy to a new location and back.

Option B is wrong because the bucket policy only prevents new unencrypted uploads, it does not fix existing objects. Option C is wrong because deleting and re-uploading disrupts access and is inefficient.

261
Multi-Selectmedium

A company is building a data lake on AWS and must encrypt data at rest. Which services can provide server-side encryption for data stored in Amazon S3? (Choose TWO.)

Select 2 answers
A.SSE-S3
B.SSL/TLS
C.AWS SDK client-side encryption
D.AWS CloudHSM
E.SSE-KMS
AnswersA, E

Server-side encryption with S3 managed keys.

Why this answer

SSE-S3 (Option A) and SSE-KMS (Option E) are the two server-side encryption options for Amazon S3. SSE-S3 uses Amazon-managed keys, while SSE-KMS uses AWS KMS-managed keys. Option B (SSL/TLS) is encryption in transit, not at rest.

Option C (AWS SDK client-side encryption) encrypts data before it reaches S3, so it is client-side, not server-side. Option D (AWS CloudHSM) is a hardware security module for managing keys, but it is not a direct server-side encryption option for S3; S3 does not natively integrate with CloudHSM for SSE.

262
MCQhard

Refer to the exhibit. A data engineer runs a CLI command to decrypt a file and receives an access denied error. The IAM user 'DataEngineer' has the following policy attached: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "kms:Decrypt", "Resource": "*" } ] } What is the most likely cause of the error?

A.The CLI command is missing the --encryption-context parameter.
B.The key policy does not grant the IAM user permission to decrypt.
C.The key is an AWS managed key and cannot be used for decryption.
D.The IAM policy does not allow kms:Decrypt on the specific key.
AnswerB

Key policy is separate from IAM policy; it must explicitly allow the user.

Why this answer

Even though the IAM policy grants kms:Decrypt on all resources, the key policy is a separate access control mechanism. The error indicates that the key policy does not include the IAM user as a principal allowed to decrypt. Therefore, option B is correct.

Option A is incorrect because missing the --encryption-context parameter would cause a different error, not an access denied. Option C is incorrect because AWS managed keys can be used for decryption if the key policy grants permission; the key type is not the issue. Option D is incorrect because the IAM policy does allow kms:Decrypt on all keys; the problem is the key policy, not the IAM policy.

263
MCQeasy

A company uses AWS Glue to process data. The security team requires that all data in transit between AWS Glue and Amazon S3 be encrypted using TLS. Which configuration should be used?

A.Enable S3 server-side encryption and use HTTPS endpoints
B.Configure a bucket policy to require aws:SecureTransport
C.Enable default encryption on the S3 bucket using SSE-KMS
D.Use an S3 VPC endpoint
AnswerA

Glue uses HTTPS, which includes TLS.

Why this answer

AWS Glue uses TLS for data in transit by default. Option B is wrong because S3 default encryption is for at-rest. Option C is wrong because VPC endpoints use AWS PrivateLink but don't enforce encryption.

Option D is wrong because it's not required for TLS.

264
MCQmedium

A financial services company uses AWS Glue ETL jobs to process sensitive customer data stored in Amazon S3. The data is encrypted at rest with SSE-KMS using a customer-managed key. Recently, the security team discovered that the Glue job's IAM role has an overly permissive policy that allows the 'kms:Decrypt' action for all KMS keys in the account. The company wants to follow the principle of least privilege. The Glue job runs on a schedule and reads from a specific S3 bucket. The security team needs to update the IAM policy to restrict KMS decryption to only the specific key used for that bucket. What should they do?

A.Update the policy to allow 'kms:Decrypt' with a resource of 'arn:aws:kms:us-east-1:123456789012:key/*' to cover all keys in the account.
B.Update the policy to allow 'kms:Decrypt' with a resource of '*' to ensure the job can always decrypt data.
C.Update the policy to allow 'kms:Decrypt' only for the specific KMS key ARN used by the S3 bucket containing the customer data.
D.Remove the 'kms:Decrypt' action from the policy and rely on S3 bucket policies to grant decryption permissions.
AnswerC

Correct. To follow least privilege, the IAM role should only have 'kms:Decrypt' permission on the exact ARN of the KMS key used to encrypt the S3 bucket.

Why this answer

To follow least privilege, the IAM role for the Glue job should only have access to decrypt using the specific KMS key that encrypts the S3 bucket containing the customer data. This is done by allowing 'kms:Decrypt' with a resource set to the exact ARN of that key, not a wildcard or all keys. Option A is incorrect because using a wildcard in the key ARN (key/*) still grants access to all keys under that key hierarchy, which is overly permissive.

Option B is incorrect because allowing 'kms:Decrypt' with resource '*' would grant access to all keys in the account, violating least privilege. Option D is incorrect because removing 'kms:Decrypt' from the IAM policy would prevent the Glue job from decrypting the data; the job's IAM role needs the permission, and relying solely on S3 bucket policies cannot grant decryption permissions cross-account or for IAM roles.

265
MCQmedium

A data engineer needs to allow an IAM user to rotate the secret in AWS Secrets Manager for an RDS database. Which IAM action should be included in the policy?

A.secretsmanager:RotateSecret
B.secretsmanager:PutSecretValue
C.secretsmanager:UpdateSecret
D.secretsmanager:GetSecretValue
AnswerA

This action allows rotating the secret.

Why this answer

The secretsmanager:RotateSecret action allows the user to initiate rotation of a secret. Option A is correct. secretsmanager:GetSecretValue only retrieves the secret value, not rotate it.

266
MCQeasy

A data engineer needs to ensure that an Amazon S3 bucket containing sensitive customer data is encrypted at rest. Which AWS service can be used to manage the encryption keys?

A.AWS Certificate Manager
B.AWS Secrets Manager
C.AWS CloudHSM
D.AWS Key Management Service (KMS)
AnswerD

KMS is the managed service for creating and controlling encryption keys used by S3 SSE-KMS.

Why this answer

AWS KMS is the service for managing encryption keys. S3 SSE-S3 uses S3-managed keys, while SSE-C uses customer-provided keys. CloudHSM is a hardware security module but not directly used for S3 encryption key management.

267
MCQmedium

Refer to the exhibit. The exhibit shows output from AWS CLI commands. Which key can be used to enable automatic annual rotation?

A.The second key (5678efgh-...)
B.Both keys
C.Neither key
D.The first key (1234abcd-...)
AnswerD

Customer managed keys can have automatic rotation enabled.

Why this answer

(the first key) is correct because automatic annual rotation is only configurable for customer managed keys. The first key is customer managed, allowing the user to enable or disable automatic rotation with a specified frequency (e.g., annually). The second key is AWS managed, which rotates automatically every three years without user configuration, so its rotation cannot be enabled or disabled by the user.

Options A and B are incorrect because the second key (AWS managed) does not support user-controlled automatic rotation, and both keys cannot have rotation configured independently. Option C is incorrect because the first key (customer managed) does support automatic annual rotation.

268
Multi-Selectmedium

A company is using AWS Lake Formation to manage permissions on a data lake. Which of the following are valid ways to grant access to a user or role? (Choose THREE.)

Select 3 answers
A.Grant permissions to a SAML or SCIM group
B.Grant permissions using tag-based access control (LF-Tags)
C.Grant permissions to an IAM user or role
D.Grant permissions to an AWS Organizations unit
E.Grant permissions via an S3 bucket policy
AnswersA, B, C

Lake Formation can integrate with SAML/SCIM for group-based access.

Why this answer

Options A, B, and C are correct. Lake Formation can grant permissions directly to IAM users/roles (C), to SAML/SCIM groups (A), and via tag-based access control using LF-Tags (B). Option D is incorrect because AWS Organizations units manage accounts, not individual permissions.

Option E is incorrect because S3 bucket policies are separate from Lake Formation and cannot be used to grant Lake Formation permissions.

Exam trap

Tag-based access control (LF-Tags) is a valid method in Lake Formation, similar to IAM resource tags, but it is specific to Lake Formation.

269
MCQmedium

A data engineer is troubleshooting an Amazon Redshift cluster that is not responding to queries. The engineer suspects that the cluster may have been accidentally deleted. Which AWS service should be used to investigate the deletion?

A.AWS Config
B.AWS CloudTrail
C.Amazon CloudWatch Logs
D.AWS Trusted Advisor
AnswerB

CloudTrail logs API calls like DeleteCluster.

Why this answer

AWS CloudTrail records API calls made to the AWS environment. To investigate if an Amazon Redshift cluster was accidentally deleted, you would use CloudTrail to review the DeleteCluster API call, including who made the call and when. AWS Config tracks resource configuration changes and can show that a cluster was deleted, but it does not directly record API calls; CloudTrail is the primary service for auditing API activity.

Amazon CloudWatch Logs stores log data from applications and services, not API calls. AWS Trusted Advisor provides best practice recommendations, not deletion history.

270
Multi-Selecthard

A company is using AWS KMS with customer-managed keys to encrypt data in Amazon RDS. The security team wants to ensure that the key can be rotated automatically every year. Which THREE steps are required to achieve automatic key rotation?

Select 3 answers
A.Migrate the key to AWS CloudHSM.
B.Enable automatic key rotation in the KMS key configuration.
C.Use a symmetric KMS key.
D.Configure the RDS instance to use the KMS key for encryption.
E.Create a new KMS key and configure RDS to use it.
AnswersB, C, D

This is required to rotate the key automatically.

Why this answer

Options B, C, and D are correct. To enable automatic rotation for a customer-managed KMS key, you must enable rotation via the KMS console or API (B), ensure the key is a symmetric key (C) as asymmetric keys do not support automatic rotation, and configure the RDS instance to use the key (D) for encryption. Option A is incorrect because rotation can be enabled for existing keys.

Option E is incorrect because CloudHSM is not involved.

271
MCQhard

A data engineer is troubleshooting an AWS Lake Formation permissions issue. A user is able to query an Amazon Athena table but cannot see the underlying S3 data in the AWS Glue Data Catalog. The user has been granted SELECT permission on the table in Lake Formation. What is the most likely cause?

A.The user does not have DESCRIBE permission on the table in Lake Formation.
B.The data location is not registered with Lake Formation.
C.The S3 bucket policy does not grant the user access.
D.The user does not have the aws:SourceArn condition in the IAM policy.
AnswerA

SELECT permission allows querying but not viewing the table metadata; DESCRIBE is needed to see the table in the catalog.

Why this answer

In AWS Lake Formation, the ability to query a table via Athena (which requires SELECT permission) is separate from the ability to view the table's metadata in the Glue Data Catalog. To see the underlying S3 data location or table properties in the catalog, a user needs DESCRIBE permission on the table. Without DESCRIBE, the table appears invisible in the Glue console or API, even though SELECT queries succeed.

Exam trap

The trap here is that candidates assume SELECT permission is sufficient for all table interactions, overlooking that Lake Formation separates metadata visibility (DESCRIBE) from data access (SELECT).

How to eliminate wrong answers

Option B is wrong because registering the data location with Lake Formation is a prerequisite for granting permissions, but the user can already query the table, so the location must be registered. Option C is wrong because if the S3 bucket policy were blocking access, the Athena query would fail, not just the catalog visibility. Option D is wrong because the aws:SourceArn condition is a security best practice for cross-account access, but its absence does not cause the described symptom of a missing table in the catalog.

272
MCQmedium

A data engineer needs to share an S3 bucket with another AWS account. They want to ensure that the objects in the bucket remain encrypted with SSE-KMS using a customer managed key. What additional step is required for cross-account access?

A.Modify the KMS key policy to grant the target account kms:Decrypt permission
B.Add an IAM policy in the target account to allow kms:Decrypt
C.Disable SSE-KMS encryption on the bucket
D.Add a bucket policy that grants the target account s3:GetObject
AnswerA

The KMS key policy must allow the target account to use the key for decryption.

Why this answer

When using SSE-KMS with a customer managed key, cross-account access requires the KMS key policy to grant the target account's IAM role or user the necessary KMS permissions (kms:Decrypt, and optionally kms:GenerateDataKey). The S3 bucket policy must also grant s3:GetObject, and the target account's IAM policy must allow kms:Decrypt. However, the key policy is the additional step specific to KMS that is not covered by S3 policies alone.

Without it, the target account cannot use the key. Option A is correct because modifying the key policy is essential. Option B is insufficient because the target account's IAM policy cannot override the key policy.

Option C is unnecessary and breaks encryption. Option D provides S3 access but not KMS access.

273
MCQeasy

A data engineer runs the command shown to check the encryption configuration of an S3 bucket. The output shows SSEAlgorithm: AES256. What does this mean?

A.The bucket uses SSE-S3 with Amazon S3-managed keys
B.The bucket uses SSE-KMS with a customer-managed key
C.The bucket uses SSE-C with customer-provided keys
D.The bucket does not have encryption enabled
AnswerA

AES256 indicates SSE-S3.

Why this answer

AES256 refers to SSE-S3, where Amazon S3 manages the encryption keys using AES-256. Option B (SSE-KMS) would show 'aws:kms'. Option C (SSE-C) would require the customer to provide keys.

Option D (no encryption) is incorrect because encryption is enabled.

274
MCQmedium

Refer to the exhibit. A data engineer queries AWS CloudTrail to investigate a PutObject event. What does the exhibit reveal about the object sensitive.csv?

A.The upload failed due to encryption mismatch.
B.The object was uploaded with server-side encryption using AWS KMS.
C.The object was not encrypted at rest.
D.The object was encrypted with SSE-S3.
AnswerB

x-amz-server-side-encryption: aws:kms indicates SSE-KMS.

Why this answer

The CloudTrail event contains `x-amz-server-side-encryption: aws:kms`, which confirms the object was uploaded with server-side encryption using AWS KMS (SSE-KMS). Option A is incorrect because the event shows a successful upload, not a failure. Option C is incorrect because the event indicates encryption was applied.

Option D is incorrect because SSE-S3 would show `AES256`, not `aws:kms`.

275
MCQmedium

A data engineer is configuring an S3 bucket for storing sensitive customer data. The bucket must be encrypted at rest using an AWS Key Management Service (KMS) key that is managed by the data engineering team. The team wants to ensure that only users with explicit permission can decrypt the data. Which S3 encryption option should be used?

A.SSE-KMS
B.Client-side encryption
C.SSE-S3
D.SSE-C
AnswerA

SSE-KMS uses a customer-managed KMS key, allowing fine-grained access control.

Why this answer

SSE-KMS is the correct option because it uses a customer-managed AWS KMS key, allowing the data engineering team to control access and permissions for decryption. Client-side encryption is not an S3 server-side encryption option and does not use KMS. SSE-S3 uses Amazon S3-managed keys, which do not provide customer-controlled access.

SSE-C requires the customer to manage their own encryption keys and does not use KMS, nor does it allow the same level of access control as a CMK.

276
MCQmedium

A data engineer is designing a data lake on S3 with sensitive data. The security policy mandates that data must be encrypted at rest and in transit, and that an inventory of all objects must be maintained for compliance. Which actions should be taken?

A.Enforce HTTPS via bucket policy, enable default SSE-S3 encryption, and enable S3 Inventory.
B.Use SSE-KMS encryption and enable CloudTrail for S3 events.
C.Enable S3 default encryption using SSE-S3 and enable S3 Inventory.
D.Enforce HTTPS using bucket policy and enable S3 Server Access Logging.
AnswerA

Covers in-transit, at-rest encryption, and inventory.

Why this answer

It covers all requirements: encryption in transit (HTTPS enforcement via bucket policy), encryption at rest (default SSE-S3), and compliance inventory (S3 Inventory). Option B uses SSE-KMS which is not required and lacks inventory. Option C includes at-rest encryption and inventory but misses in-transit encryption.

Option D includes in-transit encryption but lacks at-rest encryption and compliance inventory.

277
MCQmedium

A company uses Amazon RDS for MySQL to store application data. The security team requires that all database credentials be rotated automatically every 90 days. The data engineer needs to implement a solution that minimizes operational overhead. The database credentials are stored in AWS Secrets Manager. The application retrieves the credentials at startup and caches them for the duration of the session. The application is deployed on Amazon ECS with Fargate. Which solution should the data engineer implement to meet the rotation requirement with minimal overhead?

A.Store the credentials in AWS Systems Manager Parameter Store and use a scheduled job to update the password.
B.Use Secrets Manager's automatic rotation feature with a custom Lambda function that updates the RDS password.
C.Create a scheduled Lambda function that updates the password in Secrets Manager and manually updates the application configuration.
D.Configure IAM database authentication for the RDS instance and update the application to use IAM credentials.
AnswerB

Secrets Manager can rotate secrets automatically with a Lambda.

Why this answer

Secrets Manager's automatic rotation feature, combined with a custom Lambda function to update the RDS password, provides a fully automated, low-overhead solution. Option A is incorrect because Parameter Store does not natively support automatic rotation and would require additional automation. Option C is incorrect because it involves manual steps to update the application configuration, increasing operational overhead.

Option D is incorrect because IAM database authentication does not rotate credentials automatically and would require significant application changes.

278
MCQeasy

A company has an S3 bucket that stores logs for compliance. The compliance team requires that objects are retained for 7 years and cannot be deleted or overwritten. Which S3 feature should be used?

A.Enable S3 Object Lock with retention mode COMPLIANCE and a retention period of 7 years
B.Enable MFA Delete on the bucket
C.Configure an S3 bucket policy that denies delete and overwrite actions
D.Enable S3 Versioning and configure a lifecycle policy to expire objects after 7 years
AnswerA

Object Lock with COMPLIANCE mode ensures objects cannot be deleted or overwritten for the retention period.

Why this answer

S3 Object Lock with retention mode COMPLIANCE prevents objects from being deleted or overwritten for the specified retention period. Versioning alone does not prevent deletion. MFA Delete prevents accidental deletion but not overwrite.

Lifecycle policies can expire objects but do not prevent deletion.

279
MCQmedium

A company is designing a data lake on AWS and must comply with GDPR requirements. The company needs to implement data masking for personally identifiable information (PII) columns in Amazon Redshift. Which feature should be used?

A.Use Amazon RDS Proxy to intercept queries
B.Amazon S3 Object Lambda to mask data on the fly
C.Create views in Redshift that apply masking functions
D.AWS Lake Formation row-level security
AnswerC

Redshift views can apply masking functions to hide PII.

Why this answer

Amazon Redshift supports dynamic data masking through views that apply masking functions, such as using CASE statements or custom masking functions to obfuscate PII columns. Option A is incorrect because Amazon RDS Proxy is a connection proxy for RDS databases and does not provide data masking capabilities for Redshift. Option B is incorrect because Amazon S3 Object Lambda is used to transform data in S3, not to mask data in Redshift queries.

Option D is incorrect because AWS Lake Formation row-level security filters rows based on permissions but does not mask or obfuscate column values; it is for access control, not data masking.

280
MCQmedium

A financial services company uses Amazon Athena to query a data lake in S3. The data lake contains sensitive financial transactions. The security team has implemented row-level security using views in AWS Glue Data Catalog. Each view is defined with a WHERE clause that filters rows based on the user's IAM role using a custom tag. However, when a data analyst runs a SELECT * FROM view_name in Athena, the query returns all rows, ignoring the row-level filter. The analyst's IAM role has the tag 'department=analytics'. The view was created with a filter condition 'department = current_user_department()', where current_user_department() is a user-defined function that extracts the department tag from the caller's IAM role. The function is defined in the Glue Data Catalog. What is the most likely reason the filter is not applied?

A.The user-defined function current_user_department() is not registered in the Glue Data Catalog.
B.Athena does not support user-defined functions in views.
C.The IAM role does not have the tag 'department=analytics'.
D.The view is not defined with the filter condition properly; the function current_user_department() may not be invoked correctly in the view definition.
AnswerD

The function must be used in the view's SELECT statement.

Why this answer

The most likely reason is that the user-defined function current_user_department() is not invoked correctly in the view definition. In Athena, views store the SQL logic, and when queried, the filter condition is evaluated. If the function is not registered properly or is not supported in view filters, the query may ignore it.

Option A is incorrect because the function is already defined in the Glue Data Catalog. Option B is incorrect because Athena does support user-defined functions in views. Option C is incorrect because the analyst's role does have the tag.

281
MCQhard

A data engineer is troubleshooting an issue where an IAM role used by AWS Glue cannot read data from an S3 bucket encrypted with SSE-KMS. The bucket policy allows the role to perform s3:GetObject. What additional permission is needed?

A.s3:GetObjectVersion
B.kms:Decrypt on the KMS key
C.s3:GetObjectAcl
D.kms:GenerateDataKey on the KMS key
AnswerB

The role must be able to decrypt the S3 object.

Why this answer

For SSE-KMS, the IAM role needs kms:Decrypt permission on the KMS key to read encrypted objects. Option A (s3:GetObjectVersion) is not required because the bucket policy already allows s3:GetObject; versioning is not relevant here. Option C (s3:GetObjectAcl) is for access control lists, not encryption.

Option D (kms:GenerateDataKey) is used for encrypting new objects, not reading existing ones. Therefore, the correct answer is B.

282
MCQmedium

A data engineer needs to allow a Lambda function to read data from an S3 bucket in the same account. The Lambda function's execution role has the required permissions, but access is denied. The S3 bucket has a bucket policy that explicitly denies access to any principal that is not from the organization. What is the most likely issue?

A.The Lambda execution role is not part of the AWS organization.
B.The Lambda function is in a VPC without an S3 VPC endpoint.
C.The S3 bucket is in a different AWS account.
D.The Lambda function does not have kms:Decrypt permission.
AnswerA

The bucket policy explicitly denies access to principals not in the organization, so the Lambda role must be part of the organization.

Why this answer

The bucket policy explicitly denies access to any principal that is not from the AWS organization. Since the Lambda execution role is not part of the organization, the explicit deny overrides any allow permissions granted to the role. Option B is incorrect because the VPC endpoint policy is not mentioned in the scenario.

Option C is incorrect because the bucket is in the same account. Option D is incorrect because KMS permissions are not relevant to this access denial.

283
MCQmedium

A data engineer is configuring an S3 bucket policy to allow cross-account access for a partner account to read objects. The bucket is encrypted with SSE-KMS using a customer-managed key. What additional configuration is needed to allow the partner account to decrypt the objects?

A.Add a bucket policy that grants the partner account s3:GetObject
B.Create a VPC endpoint for S3 and add it to the bucket policy
C.Update the KMS key policy to grant the partner account kms:Decrypt permission
D.Add a bucket policy that grants s3:GetObject and s3:GetEncryptionConfiguration
AnswerC

The KMS key policy must allow the partner account to use the key for decryption.

Why this answer

For cross-account access with SSE-KMS, the KMS key policy must grant the partner account access to use the key. The bucket policy alone is insufficient. The partner account does not need VPC endpoints, and the bucket policy for decryption is not needed.

The partner account does not need access to the S3 bucket's encryption configuration.

284
MCQhard

Refer to the exhibit. A data engineer runs the commands shown. What can be determined about the key with ID 1234abcd-12ab-34cd-56ef-1234567890ab?

A.It is pending deletion.
B.It was created in us-west-2.
C.It is a customer managed key.
D.It is an AWS managed key.
AnswerD

KeyManager: AWS means it's AWS managed.

Why this answer

The command output shows that the key's KeyManager is 'AWS', indicating it is an AWS managed key, which corresponds to option D. Option A is incorrect because the key state is 'Enabled', not 'PendingDeletion'. Option B is incorrect because the ARN does not specify a region; the key was created in us-east-1 by default.

Option C is incorrect because AWS managed keys have KeyManager set to 'AWS', not 'CUSTOMER'.

285
MCQhard

A company uses AWS Lake Formation to manage permissions on a data lake in S3. A data analyst reports that queries using Amazon Athena return zero rows for a table that the analyst has been granted SELECT permission on. The table is registered in Lake Formation and uses a partition projection. What is the most likely cause?

A.The table is not registered as a resource in Lake Formation
B.The analyst does not have DESCRIBE permission on the table
C.The analyst lacks GetObject and ListBucket permissions on the underlying S3 location
D.The table uses server-side encryption with KMS and the analyst lacks kms:Decrypt permission
AnswerC

Lake Formation grants metadata permissions, but S3 permissions are still needed for partition projection.

Why this answer

When a table in Lake Formation uses partition projection, Athena bypasses the Glue Data Catalog for partition discovery and directly accesses the S3 location. This requires explicit S3 permissions (GetObject and ListBucket) on the underlying data, which Lake Formation does not automatically grant. The analyst likely can see the table metadata but cannot read the data, resulting in zero rows.

Option A is incorrect because the table is registered in Lake Formation (otherwise it wouldn't appear in Athena). Option B is incorrect because DESCRIBE permission is not required for SELECT queries; SELECT alone should suffice. Option D is incorrect because encryption permission issues would cause an error message, not a silent return of zero rows.

286
Multi-Selecteasy

A company must comply with a regulation that requires logging all access to sensitive data stored in Amazon S3. Which AWS services can be used to capture and store access logs? (Choose TWO.)

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

CloudTrail logs S3 API calls.

Why this answer

Options C and D are correct. AWS CloudTrail can be configured to log API calls to S3, including data events for object-level access. Amazon S3 server access logs provide detailed records of requests made to an S3 bucket.

Option A is wrong because AWS Config records configuration changes, not data access logs. Option B is wrong because Amazon CloudWatch Logs can store logs but does not generate S3 access logs directly. Option E is wrong because VPC Flow Logs capture IP traffic metadata, not S3 object-level access.

287
MCQeasy

A company uses Amazon QuickSight for data visualization. The data engineer needs to ensure that users can only see data relevant to their department. The data is stored in Amazon S3 and is accessed via SPICE. The engineer has created datasets in QuickSight and wants to implement row-level security (RLS). The dataset contains a column 'Department' that indicates which department a row belongs to. The engineer has configured RLS rules using a separate permissions dataset. However, users report that they can see all rows, not just their department's rows. What is the most likely reason?

A.The RLS permissions dataset is not correctly configured to map users to department values.
B.The 'Department' column is not included in the dataset.
C.The users have been granted admin access to the QuickSight dashboard.
D.The SPICE dataset does not support row-level security.
AnswerA

Correct. The permissions dataset likely has incorrect or incomplete mappings, causing RLS to not apply.

Why this answer

The most likely reason because the RLS permissions dataset must correctly map each user to the specific department values they are allowed to see. If this mapping is misconfigured or missing, QuickSight will default to showing all rows, making the RLS ineffective. The 'Department' column is present in the dataset (Option B is false).

Admin access to the dashboard does not bypass RLS at the dataset level (Option C is false). SPICE datasets fully support row-level security (Option D is false).

288
MCQhard

A company uses AWS Lake Formation to manage data lake permissions. A data engineer notices that a user can query tables in Athena even though the user does not have SELECT permission on the table in Lake Formation. What could be the cause?

A.The user is using Redshift Spectrum
B.The user has S3 permissions to read the underlying data
C.The user has an IAM policy that allows Athena access
D.The IAMAllowedPrincipals group has been granted Super permission on the database
AnswerD

The IAMAllowedPrincipals group bypasses Lake Formation permissions and allows IAM users to access tables directly.

Why this answer

The IAMAllowedPrincipals group is a special group in Lake Formation that, when granted permissions (such as Super), allows IAM users and roles to bypass Lake Formation permissions and access data directly via services like Athena. This is a common misconfiguration that leads to unintended data access. Option A is incorrect because Redshift Spectrum uses its own permissions, not Athena.

Option B is incorrect because S3 permissions allow reading the underlying data but not querying via Athena without proper Lake Formation grants. Option C is incorrect because an IAM policy granting Athena access does not override Lake Formation permissions; the IAMAllowedPrincipals group is the key bypass mechanism.

289
MCQhard

A company uses Redshift for analytics. The security team requires that all queries be logged and that any access to sensitive columns be blocked for non-admin users. Which combination of features should the data engineer implement?

A.Enable Redshift audit logging and create views that expose only non-sensitive columns, granting access to views.
B.Use Redshift row-level security and enable CloudTrail logging.
C.Enable CloudWatch Logs for Redshift and use IAM conditions to block sensitive columns.
D.Enable Redshift audit logging and use IAM policies to restrict column access.
AnswerA

Views can restrict column access, and audit logging captures queries.

Why this answer

Redshift audit logging captures all queries, and creating views that expose only non-sensitive columns with access granted to those views enforces column-level access control for non-admin users. Option B is incorrect because row-level security is not supported in Redshift, and CloudTrail logging alone does not block access. Option C is incorrect because CloudWatch Logs do not control access; they only provide monitoring.

Option D is incorrect because IAM policies cannot restrict access to specific columns in Redshift.

290
MCQmedium

Refer to the exhibit. Exhibit: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::123456789012:role/DataEngineer" }, "Action": [ "kms:Decrypt", "kms:ReEncrypt*" ], "Resource": "*" } ] } A data engineer tries to encrypt data using the KMS key associated with this key policy and receives an access denied error. What is the cause?

A.The principal is an IAM role, which is not allowed
B.There is an explicit deny in the policy
C.The Resource element is set to "*", which is invalid for KMS key policies
D.The policy does not include kms:Encrypt action
AnswerD

Encrypt action is missing.

Why this answer

The key policy grants Decrypt and ReEncrypt* actions, but not Encrypt. Therefore, the DataEngineer role does not have permission to encrypt data using this key. Option A is incorrect because IAM roles can be used as principals in key policies.

Option B is incorrect because there is no explicit deny statement in the policy. Option C is incorrect because "Resource": "*" is valid in KMS key policies and refers to the current key.

291
MCQeasy

A company wants to ensure that all S3 buckets are encrypted using server-side encryption. Which AWS service can be used to automatically remediate non-compliant buckets?

A.AWS CloudTrail
B.Amazon Inspector
C.AWS Trusted Advisor
D.AWS Config
AnswerD

AWS Config can evaluate compliance and automatically remediate resources.

Why this answer

AWS Config can use managed rules like s3-bucket-server-side-encryption-enabled to check compliance and trigger auto-remediation via SSM Automation or Lambda. Option D is correct.

292
MCQeasy

A data engineer is configuring AWS Glue jobs to access data stored in Amazon S3. The data is encrypted using server-side encryption with AWS KMS (SSE-KMS). The Glue job needs to read and write data to the S3 bucket. Which IAM policy statement should be added to the Glue job's IAM role to allow it to use the KMS key?

A.{"Effect":"Allow","Action":["kms:Decrypt"],"Resource":"*"}
B.{"Effect":"Allow","Action":["kms:Decrypt","kms:GenerateDataKey"],"Resource":"*"}
C.{"Effect":"Allow","Action":["kms:Decrypt","kms:ReEncrypt"],"Resource":"*"}
D.{"Effect":"Allow","Action":["kms:Decrypt","kms:Encrypt"],"Resource":"*"}
AnswerB

These actions allow reading (Decrypt) and writing (GenerateDataKey) encrypted data.

Why this answer

To read and write data encrypted with SSE-KMS, AWS Glue needs both `kms:Decrypt` (to read existing encrypted data) and `kms:GenerateDataKey` (to create a new data key for writing encrypted data). `kms:GenerateDataKey` is required because S3 uses a data key to encrypt objects, and the caller must generate that key via KMS. Option B correctly includes both actions, allowing the Glue job to perform read and write operations on the SSE-KMS encrypted bucket.

Exam trap

The trap here is that candidates often assume `kms:Encrypt` is needed for writing encrypted data, but S3 SSE-KMS actually requires `kms:GenerateDataKey` because the encryption is done with a derived data key, not by calling `kms:Encrypt` directly.

How to eliminate wrong answers

Option A is wrong because it only grants `kms:Decrypt`, which allows reading encrypted data but not writing new encrypted objects; writing requires `kms:GenerateDataKey` to create the encryption key. Option C is wrong because `kms:ReEncrypt` is used for re-encrypting data under a different KMS key, which is not needed for standard S3 read/write operations with SSE-KMS. Option D is wrong because `kms:Encrypt` is used to encrypt plaintext data directly with a KMS key, but S3 SSE-KMS requires `kms:GenerateDataKey` (not `kms:Encrypt`) to obtain a data key for object-level encryption.

293
MCQeasy

A media company stores video files in an Amazon S3 bucket. The bucket policy allows access only from a specific VPC. The company has enabled S3 Server Access Logs to monitor access. Recently, the security team found that some requests were coming from an IP address outside the allowed VPC. They suspect that the bucket policy may have an incorrect condition. What should they check first?

A.Verify that the bucket policy uses the 'aws:SourceVpc' condition key with the correct VPC ID.
B.Review the S3 Server Access Logs to identify the source IP addresses.
C.Ensure that the IAM role used by the application has the correct permissions.
D.Check if the bucket policy allows public access.
AnswerA

The 'aws:SourceVpc' condition key restricts access to requests originating from the specified VPC.

Why this answer

The `aws:SourceVpc` condition key is specifically designed to restrict access to requests originating from a specific VPC. If the bucket policy uses `aws:SourceVpce` (for VPC endpoints) or has an incorrect VPC ID, it may allow unintended access. Therefore, verifying the condition key and its value is the first troubleshooting step.

Option B is incorrect: while reviewing Server Access Logs can help identify suspicious IPs, the immediate issue is the bucket policy condition misconfiguration; logs are for detection, not root cause verification. Option C is incorrect: IAM role permissions are separate from the bucket policy's condition-based restriction; even with correct IAM permissions, the bucket policy condition could be misconfigured. Option D is incorrect: checking for public access is relevant but not the first step since the policy already uses a VPC-based condition; the specific condition key is the likely problem.

294
MCQmedium

A data engineer needs to ensure that an S3 bucket is encrypted at rest using AWS KMS. The bucket policy must allow only a specific IAM role to access the bucket and enforce encryption in transit. Which combination of bucket policy statements should be used?

A.Use kms:ViaService: s3.*.amazonaws.com and aws:SecureTransport: true
B.Use s3:x-amz-server-side-encryption: AES256 and aws:SecureTransport: true
C.Use s3:x-amz-server-side-encryption-aws-kms-key-id and aws:SourceIp
D.Use kms:EncryptionContext: service:s3 and aws:SecureTransport: true
AnswerA

This enforces KMS encryption via S3 and TLS.

Why this answer

Option A uses the kms:ViaService condition key to restrict the use of the KMS key to requests that come through Amazon S3 (s3.*.amazonaws.com) and the aws:SecureTransport condition to enforce encryption in transit. This ensures that only requests made via S3 and using HTTPS/TLS are allowed to use the key. Option B uses s3:x-amz-server-side-encryption: AES256, which enforces SSE-S3 (AES-256) encryption, not KMS encryption.

Option C uses s3:x-amz-server-side-encryption-aws-kms-key-id, which requires a specific KMS key ID, but the aws:SourceIp condition does not enforce encryption in transit. Option D uses kms:EncryptionContext, which can be used to enforce KMS encryption but does not include the aws:SecureTransport condition, so encryption in transit is not enforced.

295
MCQhard

A company uses AWS Glue to process data from Amazon S3. The data contains personally identifiable information (PII). The data engineer needs to automatically detect and mask PII fields before the data is loaded into Amazon Redshift. Which combination of AWS services should be used?

A.Amazon Macie and AWS Glue
B.Amazon CloudWatch Logs and AWS Lambda
C.Amazon S3 Object Lambda and AWS Glue
D.AWS IAM Access Analyzer and AWS Glue
AnswerA

Macie detects PII, Glue can mask it in the ETL job before writing to Redshift.

Why this answer

Amazon Macie discovers sensitive data, and then AWS Glue can apply transformations to mask the PII before loading into Redshift. CloudWatch Logs is for monitoring, not detection. IAM Access Analyzer is for analyzing resource policies.

S3 Object Lambda can redact data during retrieval but not during Glue ETL.

296
Multi-Selectmedium

A healthcare company stores sensitive patient data in an S3 bucket (bucket name: patient-data-prod). The security team requires that all data be encrypted in transit and at rest, and that access be logged for auditing. The company currently uses S3 default encryption with SSE-S3. An external auditor finds that some objects have been uploaded without encryption because the default encryption setting was not applied to objects uploaded before the setting was enabled. The company wants to prevent any future unencrypted uploads and ensure all existing objects are encrypted. Which combination of actions should the data engineer take? (Choose TWO.)

Select 2 answers
A.Use S3 Batch Operations to copy all existing objects in place with the 'Copy' operation to apply default encryption.
B.Enable S3 Object Ownership and set the bucket ACL to private.
C.Enable S3 default encryption on the bucket.
D.Create a bucket policy that denies s3:PutObject if the x-amz-server-side-encryption-aws-kms-key-id is not present.
E.Create a bucket policy that denies s3:PutObject if the x-amz-server-side-encryption header is not set to 'AES256'.
AnswersA, E

Use S3 Batch Operations with the 'Copy' operation to copy objects in place, which applies the bucket's default encryption setting to each object.

Why this answer

To prevent future unencrypted uploads, the bucket policy must deny PutObject requests that do not include the x-amz-server-side-encryption header set to 'AES256' (Option E). This ensures all new objects are encrypted with SSE-S3. To encrypt existing objects that were uploaded before default encryption was enabled, S3 Batch Operations can perform a copy in place to apply default encryption (Option A).

Option C alone would not apply to existing objects. Option B is unrelated, and Option D references KMS, which is not needed since SSE-S3 uses AES256. Therefore, the correct combination is Options A and E.

297
MCQmedium

A gaming company uses Amazon Redshift for analytics. The Redshift cluster stores user data that must be encrypted at rest using a customer-managed KMS key. The company has enabled audit logging using AWS CloudTrail. The security team wants to ensure that any attempt to disable or delete the KMS key is immediately detected and triggers an automated response. They have set up a CloudWatch Events rule that triggers an SNS notification when the KMS key is scheduled for deletion. However, they also want to prevent the key from being deleted accidentally. What should they do?

A.Enable automatic key rotation for the KMS key to ensure that even if the key is deleted, the data remains encrypted.
B.Add a statement to the KMS key policy that denies 'kms:ScheduleKeyDeletion' for all principals except the root user.
C.Attach an IAM policy to the Redshift cluster role that denies 'kms:ScheduleKeyDeletion'.
D.Set up a CloudTrail trail to monitor for 'ScheduleKeyDeletion' events and send an alert to the security team.
AnswerB

This prevents any IAM user or role from scheduling key deletion.

Why this answer

Adding a statement to the KMS key policy that denies 'kms:ScheduleKeyDeletion' for all principals except the root user explicitly prevents any user (including IAM users with full admin permissions) from scheduling deletion of the key. This is the most direct and authoritative control to prevent accidental deletion. Option A is incorrect because automatic key rotation does not prevent the key from being deleted; it only changes the backing key material.

Option C is incorrect because an IAM policy attached to the Redshift cluster role does not affect permissions on the KMS key; the key policy is the authoritative control for actions on a customer-managed key. Option D is incorrect because CloudTrail monitoring only detects deletion events but does not prevent the deletion itself.

298
Multi-Selecteasy

A company is using AWS Glue to catalog data in S3. The security team wants to ensure that only authorized users can access the Glue Data Catalog and that data lineage is tracked. Which AWS services can be used together to meet these requirements? (Choose TWO.)

Select 2 answers
A.AWS CloudTrail
B.AWS Glue DataBrew
C.Amazon Athena
D.AWS Lake Formation
E.Amazon Kinesis
AnswersB, D

Provides data lineage tracking.

Why this answer

Options B and D are correct. AWS Lake Formation provides fine-grained access control for the Glue Data Catalog, and AWS Glue DataBrew offers data lineage visualization. Option A is incorrect because CloudTrail logs API calls but does not manage permissions or access control.

Option C is incorrect because Athena is a query service, not for access control or lineage. Option E is incorrect because Kinesis is for streaming data.

299
Multi-Selecthard

A company is using AWS Lake Formation to manage a data lake. The data engineer needs to set up fine-grained access control so that users can only see specific columns in a table based on their IAM role. Which THREE steps should the data engineer take?

Select 3 answers
A.Ensure that the users query the table through a service integrated with Lake Formation, such as Athena.
B.Grant the IAM role SELECT permission on the table with column-level restrictions.
C.Create a view in the Data Catalog that exposes only the required columns.
D.Define a Lake Formation data permissions policy that includes column-level filtering.
E.Attach an S3 bucket policy to restrict access to the underlying data.
AnswersA, B, D

Lake Formation enforces permissions when queries are run through integrated services.

Why this answer

Options A, B, and D are correct. Lake Formation column-level access requires defining the policy in Lake Formation, granting permissions to the IAM role, and the user must use Lake Formation-enabled services. Option C is wrong because S3 bucket policies are not used for column-level control.

Option E is wrong because the table must be registered with Lake Formation.

300
MCQhard

A data engineer is designing a solution to securely store and rotate database credentials used by an application. The credentials should be automatically rotated every 90 days. Which AWS service should be used?

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

Secrets Manager provides automatic rotation of secrets.

Why this answer

(AWS Secrets Manager) is correct because it can automatically rotate secrets, including database credentials, with built-in rotation support. Option B (AWS Systems Manager Parameter Store) can store secrets but lacks automatic rotation capability. Option C (AWS Key Management Service) manages encryption keys, not secrets.

Option D (AWS Identity and Access Management) manages users and roles, not credential rotation.

← PreviousPage 4 of 5 · 318 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Data Security and Governance questions.