1.IAM Multiple
1.IAM Multiple
A. A group of roles
B. An application or service
C. An entity representing a person or service needing credentials
D. A temporary access key
Answer: C
Explanation:
An IAM user is an identity created for an individual person or service that
interacts with AWS. Each user has long-term credentials such as a username
and password or access keys.
A. IAM Users
B. IAM Groups
C. IAM Policies
D. IAM Roles
Answer: D
Explanation:
IAM roles are used to delegate access to users or services and provide
temporary credentials. They are not associated with a specific user or group.
A. To manage passwords
B. To allow or deny permissions to AWS resources
C. To track billing
D. To create EC2 instances
Answer: B
Explanation:
IAM policies are JSON documents that define permissions to allow or deny
access to AWS services and resources. They are attached to users, groups, or
roles.
A. Managed Policy
B. Inline Policy
C. Resource Policy
D. Group Policy
Answer: D
Explanation:
There is no specific "Group Policy" in IAM. Policies are either managed
(AWS-managed or customer-managed) or inline. Resource-based policies are
attached to AWS resources like S3 buckets.
Answer: B
Explanation:
Federation allows users from external identity providers (like Active Directory,
Google, or SAML-based providers) to access AWS resources without creating
IAM users.
Answer: C
Explanation:
IAM Groups allow administrators to assign permissions to multiple users at once.
Any permissions assigned to a group apply to all users in that group.
Answer: C
Explanation:
By default, new IAM users have no permissions. You must explicitly attach
policies to grant access.
8. Which of the following is a best practice for using IAM roles instead of IAM users?
A. For long-term database access
B. For third-party SaaS integration
C. For applications running on EC2 that access AWS resources
D. For assigning passwords to developers
Answer: C
Explanation:
IAM roles are recommended for EC2 applications to grant temporary and secure
access to AWS resources without embedding credentials.
Answer: A
Explanation:
AWS Security Token Service (STS) provides temporary credentials for IAM
roles and federated users.
Answer: C
Explanation:
Inline policies are directly attached to a single user, group, or role, making
them entity-specific. Managed policies can be reused across multiple entities.
11. You want to allow an external identity provider to assume an IAM role in your AWS account.
What must you configure?
A. IAM Group
B. SAML 2.0 Federation
C. EC2 instance profile
D. IAM Access Analyzer
Answer: B
Explanation:
To allow access from an external identity provider (like Azure AD or Okta), you
configure SAML 2.0-based Federation with IAM roles that federated users
can assume.
12. What happens if you attach both an allow and a deny policy to an IAM role for the same action?
Answer: C
Explanation:
In IAM, explicit deny always overrides allow. If there's a deny statement, it
takes precedence regardless of allow permissions.
13. Which IAM feature allows EC2 instances to automatically obtain temporary credentials to
access AWS services?
Answer: C
Explanation:
Instance Profiles are containers for IAM roles that EC2 instances can assume
to access AWS services with temporary credentials.
14. Which service is used for fine-grained access control on specific AWS resources like individual
S3 buckets or DynamoDB tables?
Answer: B
Explanation:
Resource-based policies are attached directly to resources like S3, Lambda,
etc., and allow for fine-grained permissions.
15. You need to allow an IAM user to create EC2 instances but prevent deletion. What should you
use?
A. IAM Group
B. Permissions Boundary
C. Managed Policy
D. Custom Policy with Action Allow and Deny
Answer: D
Explanation:
You would write a custom JSON policy that allows ec2:RunInstances but
explicitly denies ec2:TerminateInstances. Fine-grained control is possible using
allow/deny actions.
16. Which of the following can be used to limit the maximum permissions a user or role can have?
A. IAM Group
B. Inline Policy
C. Permissions Boundary
D. SAML Trust Policy
Answer: C
Explanation:
A Permissions Boundary is an advanced feature that defines the maximum
permissions a role or user can get, even if their attached policies allow more.
17. Which IAM policy type can be used across multiple accounts using AWS Organizations?
A. Inline Policy
B. Permissions Boundary
C. SCP (Service Control Policy)
D. Resource Policy
Answer: C
Explanation:
Service Control Policies (SCPs) are used with AWS Organizations to
define permission guardrails across multiple AWS accounts.
18. Which method is most secure for accessing AWS programmatically from an on-premises
environment?
Answer: B
Explanation:
Assuming an IAM role using STS (Security Token Service) is secure
because it provides temporary credentials, reducing long-term exposure.
19. Which type of IAM policy is best for reusability and centralized management?
A. Inline Policy
B. Managed Policy
C. Resource Policy
D. Instance Profile
Answer: B
Explanation:
Managed policies (AWS-managed or customer-managed) are best for
reusability, as they can be attached to multiple users, groups, or roles.
20. What is the main benefit of using IAM roles over IAM users for applications?
Answer: C
Explanation:
IAM roles provide temporary credentials via STS, which is more secure for
applications than long-term user access keys.
1. Your company wants to allow temporary access to a third-party vendor to access an S3 bucket for
7 days. What’s the most secure and scalable way to do this?
✅ Answer: C
Explanation: Creating an IAM role and using STS AssumeRole for the vendor
is secure and allows temporary credentials with limited scope.
2. A developer hardcoded their AWS access keys in application code. What is the recommended
best practice to fix this issue?
✅ Answer: C
Explanation: The best practice is to use IAM roles with AWS services like
EC2/Lambda to avoid storing long-term credentials.
3. You want to enforce that no user in your AWS Organization can delete S3 buckets. What should
you use?
A. IAM Policy
B. Permissions Boundary
C. SCP
D. Resource Policy
✅ Answer: C
Explanation: Service Control Policies (SCPs) are used in AWS
Organizations to restrict actions across accounts, even if IAM allows it.
4. An IAM user was given full EC2 permissions, but is unable to terminate instances. What could
be the issue?
✅ Answer: D
Explanation: Any explicit deny in IAM, group policies, or SCPs will override
any allow. You must evaluate all policy layers.
5. You are designing cross-account access. How do you allow users in Account A to assume a role
in Account B?
✅ Answer: B
Explanation: Use a trust policy in Account B’s role that allows users or roles
from Account A to assume it using STS.
6. A developer is able to list S3 buckets but not upload to any. The IAM policy allows "s3:*".
What could be the issue?
✅ Answer: D
Explanation: All 3 are possible. Bucket policies or boundaries can override
allow statements in IAM.
7. What is the correct method to give an EC2 instance access to read messages from an SQS queue?
A. Use access keys in user data
B. Attach inline policy to EC2
C. Use IAM role and instance profile with appropriate permissions
D. Set SQS to public
✅ Answer: C
Explanation: You should attach an IAM role with proper permissions to the
EC2 instance via instance profile.
8. How can you ensure that a Lambda function can access only DynamoDB and nothing else?
✅ Answer: D
Explanation: The best practice is to use a customer-managed policy with
least privilege and assign it to the Lambda’s role.
9. A user is getting AccessDenied when trying to assume a role in another AWS account.
What’s the likely cause?
✅ Answer: D
Explanation: Cross-account AssumeRole requires both a trust relationship
in the target account and explicit sts:AssumeRole permission in the source
account.
10. A policy contains both an allow and a deny statement for the same action. What will happen?
✅ Answer: B
Explanation: Explicit deny always overrides any allow in IAM policy
evaluation logic.
11. You want to delegate access to your AWS account to an external Active Directory–based
identity provider. What should you configure?
✅ Answer: B
Explanation: Use SAML 2.0 Federation with IAM roles and trust relationships
to allow users from external IdPs (like AD via ADFS) to assume roles in AWS.
12. You created a customer-managed IAM policy to allow s3:GetObject, but access is denied.
The S3 bucket also has a policy. What's the most likely reason?
✅ Answer: B
Explanation: If the S3 bucket policy has an explicit deny, it overrides the
IAM allow — both must permit access.
13. An engineer needs to test code that calls AWS APIs. You want to limit their access to AWS
resources only during office hours. What should you use?
A. Permissions Boundary
B. AWS Config
C. IAM Policy with Condition block using aws:CurrentTime
D. Role trust policy
✅ Answer: C
Explanation: Use the aws:CurrentTime condition key in an IAM policy to
restrict access based on time of day.
14. You notice multiple failed authentication attempts in CloudTrail for an IAM user. What is the
most immediate best practice response?
✅ Answer: B
Explanation: If you suspect access keys are compromised, the first step is to
rotate them (disable and create new ones), and then investigate further.
15. Your company requires that no IAM user should ever have permissions beyond read-only access
to AWS resources. What’s the best solution?
✅ Answer: C
Explanation: Use Permissions Boundaries to set a maximum limit on the
permissions any IAM user can get, even if other policies allow more.
16. An application deployed on EC2 needs to access an S3 bucket in another AWS account. What is
the best way to configure access?
A. Share S3 credentials
B. Copy bucket to local region
C. Use a cross-account IAM role and allow EC2 to assume it
D. Make bucket public
✅ Answer: C
Explanation: Cross-account roles are the secure and recommended way to
allow access between accounts without exposing credentials.
17. You have multiple IAM roles that need the same permissions. What's the best practice for
managing this?
✅ Answer: B
Explanation: Use a customer-managed policy for reusability and consistent
permission management across roles or users.
18. What IAM feature is required to restrict a developer from accessing secrets in Secrets Manager
while still allowing S3 access?
A. Inline Policy
B. SCP
C. Resource-based Policy
D. Condition with NotAction
✅ Answer: A
Explanation: Use an inline policy (or managed policy) that explicitly allows
S3 actions and omits Secrets Manager. You can also add an explicit deny for
Secrets Manager if needed.
19. A federated user receives an "Access Denied" error when trying to access an S3 bucket. Their
role has correct permissions. What's the likely issue?
✅ Answer: B
Explanation: Even if the IAM role has the correct permissions, a bucket
policy can still deny access, especially if there's an explicit deny for
federated roles or unknown principals.
20. You want to enforce encryption at rest for all S3 bucket uploads using IAM. What should your
policy include?
A. s3:PutObject only
B. A Condition requiring s3:x-amz-server-side-encryption
C. Resource-based deny
D. CloudTrail metric filter
✅ Answer: B
Explanation: You can use a condition in the IAM or bucket policy to enforce
that uploads include the s3:x-amz-server-side-encryption header.
✅ Answer: B
Explanation: Permissions boundaries limit what a user or role can do, even
if an IAM policy allows the action. An explicit deny in a permissions boundary
will override any allow.
22. You want to allow access to an S3 bucket only from specific IP addresses. What IAM policy
feature should you use?
A. aws:UserAgent
B. aws:SourceIp condition
C. Resource-based bucket encryption
D. VPC endpoint policy
✅ Answer: B
Explanation: Use the aws:SourceIp condition key to restrict access to
specific IP addresses in IAM or resource policies.
23. A developer needs CLI access to AWS but only during office hours and from the corporate VPN
IP range. What is the best way to enforce this?
✅ Answer: A
Explanation: Use IAM policies with both aws:SourceIp and aws:CurrentTime
condition keys to restrict access to specific hours and IP ranges.
24. Which of the following can be attached directly to an S3 bucket to control access?
✅ Answer: C
Explanation: Resource-based policies (like bucket policies) can be directly
attached to resources such as S3 buckets to define who can access them.
25. Which IAM feature helps define the maximum allowable permissions a user or role can have,
regardless of attached policies?
A. Trust policy
B. Resource-based policy
C. Permissions boundary
D. Inline policy
✅ Answer: C
Explanation: Permissions boundaries act as a ceiling — no permission
outside the boundary is effective even if other policies grant it.
26. Which IAM feature is most appropriate for providing temporary cross-account access to a
consultant?
A. IAM group
B. IAM user with rotating access keys
C. IAM role with trust relationship and STS
D. Inline policy with condition
✅ Answer: C
Explanation: The most secure way is to set up an IAM role with a trust policy
allowing the consultant’s AWS account to assume it via STS.
27. You want to enforce that all users in your AWS Org can only access resources within a specific
region. What should you use?
A. Inline policy
B. SCP with aws:RequestedRegion condition
C. Resource-based policy
D. Tag policy
✅ Answer: B
Explanation: Use an SCP with a condition on aws:RequestedRegion to
enforce a regional boundary across all accounts in the organization.
28. You attached a managed policy to a role, but it’s not granting permissions as expected. What’s
the most likely reason?
✅ Answer: C
Explanation: A permissions boundary or SCP can restrict effective
permissions even if the policy allows them.
29. How can you ensure only users with MFA enabled can delete objects from an S3 bucket?
✅ Answer: B
Explanation: Enforce MFA by using the aws:MultiFactorAuthPresent
condition key in the S3 bucket policy or IAM policy for sensitive actions.
30. You want to prevent root account usage in your AWS accounts. What is the best enforcement
method?
31. An EC2 instance needs access to both DynamoDB and CloudWatch. What's the most secure
and manageable way to provide this access?
✅ Answer: C
Explanation: You can only assign one IAM role per EC2 instance, so the
correct approach is to attach a role with a policy that includes
permissions for both services.
32. A new developer was added to an IAM group with S3 access, but they still can't list any buckets.
What’s a likely cause?
✅ Answer: D
Explanation: All of these can block access. IAM group policy may not include
s3:ListBucket, the bucket policy may explicitly deny access, and some
resources might require MFA conditions.
33. A federated user successfully logs in via SAML but gets AccessDenied when accessing
EC2. What is most likely wrong?
✅ Answer: D
Explanation: For federated access to work, you need a correct trust policy
(allowing SAML principal) and a permissions policy granting the needed EC2
actions.
34. What IAM feature would you use to audit which permissions are being used by a role or user?
✅ Answer: D
Explanation: IAM Access Advisor helps you identify which permissions
were recently used, enabling least-privilege refinement.
35. Which IAM feature allows you to simulate whether a user or role has access to a specific
action?
A. Access Advisor
B. Permissions Boundary
C. IAM Policy Simulator
D. SAML Assertion Viewer
✅ Answer: C
Explanation: The IAM Policy Simulator lets you test and debug permission
issues by simulating requests and showing whether access would be allowed or
denied.
36. Which of the following IAM entities can never have policies attached to it?
A. IAM User
B. IAM Group
C. IAM Role
D. IAM Permissions Boundary
✅ Answer: D
Explanation: A permissions boundary is not an IAM entity, it’s a policy
attached to an IAM user or role. It doesn’t itself hold or attach policies.
37. You want to allow a Lambda function in Account A to access an RDS instance in Account B.
What should you do?
✅ Answer: C
Explanation: The secure and recommended approach is to set up a
cross-account role for Lambda to assume and enable VPC peering so the
function can reach RDS over private networking.
38. An IAM user with full permissions can’t perform actions in a newly created AWS Region. What
is the likely issue?
A. The region is disabled
B. Permissions are not region-specific
C. MFA is required in that region
D. IAM roles don’t support new regions
✅ Answer: A
Explanation: AWS allows you to enable or disable regions. By default,
newly created regions are disabled and need to be enabled by the account
admin.
39. Which of the following permissions models allows sharing access to AWS resources with
external AWS accounts without IAM user creation?
A. Resource-based policies
B. IAM groups
C. SAML Federation
D. Session policies
✅ Answer: A
Explanation: Resource-based policies (e.g., on S3, Lambda, etc.) allow you
to grant access to external accounts directly, without needing IAM users or
roles in the target account.
40. A company mandates that no IAM users be created and only short-lived credentials should be
used. What setup meets this requirement?
✅ Answer: C
Explanation: To comply with short-lived credentials only, use IAM roles
with STS, and integrate with identity federation (like SAML or OIDC) — no
IAM users needed.
1. You’ve created a CI/CD pipeline using AWS CodePipeline that deploys Lambda functions. How
should you securely allow deployment stages to update Lambda functions?
✅ Answer: C
Explanation: CodePipeline needs an IAM service role with permissions to
perform actions like lambda:UpdateFunctionCode. Never use access keys for
service-to-service access.
2. Your application runs on ECS Fargate and needs to write to CloudWatch Logs. What's the best
way to give this permission?
✅ Answer: B
Explanation: For Fargate tasks, you define a task execution role, which
the container uses to call AWS APIs (like writing to CloudWatch Logs).
3. A role’s trust policy allows EC2 to assume it, but no instances can assume the role. What could
be the problem?
✅ Answer: B
Explanation: Trust policy alone isn't enough. You must attach the role to
the EC2 instance via an instance profile.
4. Which IAM policy element allows you to grant access only if a specific tag is present on the
resource?
A. Action
B. Effect
C. Condition
D. Principal
✅ Answer: C
Explanation: Use the Condition block in IAM policies with keys like
aws:TagKeys or aws:RequestTag to enforce tag-based access controls.
5. A developer assumes a role via STS. How can you further restrict what they can do during that
session?
6. Which IAM policy condition ensures actions are only permitted from your corporate IP range?
A. aws:VpcSourceIp
B. aws:SourceVpc
C. aws:SourceIp
D. ip:AllowList
✅ Answer: C
Explanation: Use the aws:SourceIp condition key in policies to allow/deny
access based on the caller’s IP address or CIDR block.
7. You’ve set up an SCP that denies ec2:*. However, a user in the account can still stop EC2
instances. Why?
✅ Answer: C
Explanation: SCPs must be attached to the correct accounts or OUs. If the
SCP is not attached to the account where the user resides, it has no effect.
✅ Answer: C
Explanation: Service-linked roles are IAM roles created and managed by
AWS that allow services like ECS, Auto Scaling, or Lex to access
resources on your behalf.
9. How would you allow access to s3:PutObject but only when the uploaded object is
encrypted with SSE-KMS?
✅ Answer: B
Explanation: Add a Condition block to enforce SSE-KMS encryption during
PutObject operations.
10. You granted federated users access to assume a role. They still receive "Access Denied" errors.
What might be missing?
A. MFA device
B. Session duration
C. Trust policy for the identity provider
D. SCP granting access
✅ Answer: C
Explanation: Federated users need a trust relationship configured
between the role and the IdP (e.g., SAML). Without it, the AssumeRole call
fails.
11. You need to allow a Lambda function to publish to an SNS topic in another account. What is the
best approach?
✅ Answer: B
Explanation: When crossing AWS accounts, the SNS topic must have a
resource-based policy allowing the Lambda role’s ARN to publish to it.
12. A new SCP was attached to an OU, but no changes occurred in IAM behavior. What is most
likely wrong?
✅ Answer: D
Explanation: SCPs are deny-by-default, so if you don't explicitly allow
actions and no other SCP allows them, nothing will be permitted — including no
change to current behavior.
13. A user is allowed s3:* in their IAM policy, but still can’t delete an object in a bucket. What
could be wrong?
A. Object is owned by a different AWS account
B. Bucket has versioning
C. MFA is not enabled
D. SCP is missing
✅ Answer: A
Explanation: Even with s3:*, if the object was uploaded by another
account and ownership isn’t transferred, the user may not have
permission to delete it.
14. How can you allow an IAM user to assume a role only for read-only access to CloudWatch
Logs, regardless of other policies?
✅ Answer: B
Explanation: Session policies specified during the AssumeRole API call can
further restrict what the assumed session can do — perfect for enforcing
read-only limits.
15. Which IAM feature allows you to grant access to AWS Management Console without creating
IAM users?
A. SAML federation
B. Inline policy
C. AWS CLI
D. IAM groups
✅ Answer: A
Explanation: SAML-based federation lets users from external identity
providers (e.g., Okta, Azure AD) access the console without IAM user
creation.
16. You want to enforce that only users from your corporate email domain can assume a role. What
should you use?
A. SCP
B. aws:PrincipalTag
C. aws:PrincipalOrgID
D. aws:PrincipalEmail in a policy condition
✅ Answer: D
Explanation: Use the aws:PrincipalEmail condition key (with SAML federation
or OIDC) to restrict access based on the email domain.
17. Which of the following allows you to restrict IAM access based on the VPC from which the
request is made?
A. aws:VpcSourceIp
B. aws:SourceVpc
C. aws:VpcID
D. IAM does not support VPC-based conditions
✅ Answer: B
Explanation: Use the aws:SourceVpc condition key in IAM policies to restrict
access to requests originating from a specific VPC (works with VPC endpoints).
18. A developer created a role with s3:* permissions but can’t use it in an EC2 instance. What's
likely missing?
✅ Answer: B
Explanation: For EC2 to assume a role, the role’s trust policy must
explicitly allow ec2.amazonaws.com as a principal.
19. You want to ensure that users cannot attach custom policies that allow access to restricted
services. What should you use?
✅ Answer: A
Explanation: Use an SCP to deny iam:AttachUserPolicy or restrict attaching
policies that include specific services.
20. You want to give an external app access to an S3 bucket for 24 hours. What is the best way to
do this securely?
✅ Answer: B
Explanation: Use STS AssumeRole to issue temporary credentials, valid
for up to 12 hours by default, and extendable to 24 hours using SAML or role
chaining.
IAM & Security Practice Exam — Encryption with KMS, SSE, and TLS
1. You want to ensure that all objects uploaded to an S3 bucket are encrypted using SSE-KMS.
How can you enforce this?
✅ Answer: B
Explanation: The S3 bucket policy can be configured to enforce that objects
are uploaded with SSE-KMS encryption by adding a condition like
"s3:x-amz-server-side-encryption": "aws:kms".
2. A Lambda function needs to read data from an encrypted S3 bucket with SSE-KMS. Which IAM
permission should be included in the Lambda execution role?
A. s3:GetObject
B. kms:Decrypt
C. s3:ListBucket
D. s3:PutObject
✅ Answer: B
Explanation: For reading from an SSE-KMS encrypted bucket, the Lambda
execution role needs permission to decrypt the object, i.e., kms:Decrypt, in
addition to s3:GetObject.
3. You are required to use SSE-S3 encryption for all objects in an S3 bucket. Which of the
following is true?
✅ Answer: C
Explanation: SSE-S3 encryption uses Amazon S3's default encryption,
and when you configure it, any objects uploaded without specifying encryption
will be encrypted using SSE-S3 by default. You don’t need to provide a KMS key
ID for SSE-S3.
4. What is the primary difference between SSE-KMS and SSE-S3 encryption in Amazon S3?
A. SSE-S3 uses a customer-managed key, and SSE-KMS uses a default AWS key
B. SSE-KMS allows for key rotation, while SSE-S3 does not
C. SSE-KMS can only be used with IAM roles, while SSE-S3 works with IAM users
D. There is no difference between the two; they are interchangeable
✅ Answer: B
Explanation: SSE-KMS provides key management features like automatic
key rotation, which SSE-S3 does not. SSE-S3 uses Amazon's default
S3-managed keys.
5. Which AWS service allows you to create, store, and manage encryption keys for your
applications across AWS services?
A. CloudHSM
B. IAM
C. AWS KMS
D. AWS Certificate Manager
✅ Answer: C
Explanation: AWS KMS (Key Management Service) is designed to create,
store, and manage encryption keys for use in many AWS services, including
S3, EBS, and RDS.
6. Your team needs to transmit sensitive data over the internet, and you want to ensure the data is
encrypted in transit. Which protocol should you use?
A. SSH
B. TLS
C. IPsec
D. VPN
✅ Answer: B
Explanation: TLS (Transport Layer Security) is a cryptographic protocol
designed to provide secure communication over a computer network,
commonly used in HTTPS for encrypting data in transit.
7. You’ve created a KMS key for encrypting data at rest in an S3 bucket. How do you ensure only
authorized users can use this key?
✅ Answer: B
Explanation: IAM policies on roles or users control who can use a specific
KMS key. You can define the kms:Encrypt and kms:Decrypt permissions to
control access.
8. A client connects to your website using HTTPS. What encryption is used to secure the traffic?
A. SSE-S3
B. TLS
C. AWS KMS
D. IPsec
✅ Answer: B
Explanation: TLS (Transport Layer Security) is used to secure HTTP traffic
(HTTPS), ensuring the integrity and confidentiality of data during transit.
9. You want to configure S3 to automatically encrypt new objects using a custom KMS key. Which
of the following actions do you need to perform?
✅ Answer: B
Explanation: You can enable bucket-level encryption with KMS and specify
your custom KMS key ID for server-side encryption of objects uploaded to
the bucket.
10. You are tasked with setting up encryption in transit for a web application. Which AWS service
should you use to manage certificates and encryption for SSL/TLS?
A. AWS KMS
B. AWS Certificate Manager (ACM)
C. CloudHSM
D. AWS Shield
✅ Answer: B
Explanation: AWS Certificate Manager (ACM) helps manage SSL/TLS
certificates, enabling secure communications over HTTPS.
11. You want to ensure that all data in your S3 bucket is encrypted with your KMS key, but you
also need to allow the S3 service to use the key for encryption and decryption. What must you do?
12. You want to encrypt data in transit between your EC2 instances using an encrypted connection.
Which AWS service will you use?
A. VPC Peering
B. SSL/TLS
C. KMS
D. S3 encryption
✅ Answer: B
Explanation: SSL/TLS provides encryption for data in transit, ensuring
secure communication between EC2 instances or other systems.
13. Which of the following is a correct configuration for ensuring that your RDS database is
encrypted at rest with a customer-managed KMS key?
✅ Answer: A
Explanation: You must set the RDS instance’s encryption option to SSE-KMS
during its creation to ensure that it is encrypted at rest with a
customer-managed KMS key.
14. You want to encrypt an object in Amazon S3 with a specific KMS key using server-side
encryption. What must you do?
✅ Answer: B
Explanation: For server-side encryption with KMS (SSE-KMS), specify the
x-amz-server-side-encryption header in the upload request and provide the
key ID.
15. Your application needs to securely connect to an RDS instance over the internet. What is the
best practice for securing this communication?
✅ Answer: C
Explanation: TLS should be used to secure connections to your RDS
instance over the internet. AWS RDS supports SSL/TLS for encrypted
communication.
16. What action must be performed to rotate your KMS keys automatically?
✅ Answer: B
Explanation: You can enable automatic key rotation for a KMS key, which
will automatically rotate the key every year to enhance security.
17. Which of the following best practices should you follow when storing sensitive data in Amazon
S3?
✅ Answer: A
Explanation: For sensitive data, the best practice is to use SSE-KMS to
encrypt data at rest, along with SSL/TLS to protect data in transit.
Versioning and access controls are also important.
18. How do you encrypt data in transit between an EC2 instance and an S3 bucket?
✅ Answer: A
Explanation: SSL/TLS encrypts data in transit between EC2 and S3. SSE-S3
only handles data at rest in S3 and doesn’t affect transit encryption.
19. When using SSE-KMS, who is responsible for managing the encryption keys?
A. AWS
B. You (the customer)
C. Only IAM roles
D. The EC2 instance role
✅ Answer: B
Explanation: When using SSE-KMS, you as the customer are responsible for
managing the KMS keys and ensuring that they have the correct IAM
policies and key policies attached.
20. How can you restrict which users or roles can access your KMS keys in a specific AWS
account?
✅ Answer: B
Explanation: The KMS key policy defines who can access the KMS key and
under what conditions. You can specify which IAM users or roles have
permissions to use the key.