Courseiva

CCNA Network Security Governance Questions

75 of 397 questions · Page 3/6 · Network Security Governance topic · Answers revealed

151
MCQhard

A company has a VPC with CIDR 10.0.0.0/16. They have public subnets (10.0.1.0/24, 10.0.2.0/24) and private subnets (10.0.3.0/24, 10.0.4.0/24) in two Availability Zones. An Internet Gateway is attached to the VPC, and a NAT Gateway is in public subnet 10.0.1.0/24. The private subnets route 0.0.0.0/0 to the NAT Gateway. The security team notices that instances in private subnet 10.0.3.0/24 can reach the internet, but instances in private subnet 10.0.4.0/24 cannot. Both private subnets have the same route table configuration. The network ACLs for both private subnets are set to allow all inbound and outbound traffic. What is the most likely cause of the issue?

A.The route table for the public subnet 10.0.1.0/24 does not have a route to the Internet Gateway.
B.The security group on the instances in private subnet 10.0.4.0/24 is blocking outbound traffic.
C.The network ACL for private subnet 10.0.4.0/24 is blocking outbound traffic.
D.The route table for private subnet 10.0.4.0/24 does not have a route to the NAT Gateway.
AnswerA

The NAT Gateway needs a route to the Internet Gateway through its subnet's route table.

Why this answer

The NAT Gateway is in the public subnet 10.0.1.0/24. For the NAT Gateway to reach the internet, the route table associated with that public subnet must have a default route (0.0.0.0/0) pointing to the Internet Gateway. Without this route, the NAT Gateway cannot forward traffic from private subnets to the internet.

Since both private subnets have the same route table configuration pointing to the NAT Gateway, the issue is isolated to the NAT Gateway's inability to reach the internet due to the missing route in the public subnet's route table. Options B, C, and D are incorrect: security groups and network ACLs are configured to allow traffic, and the private subnet route tables are correctly set to route to the NAT Gateway.

152
MCQhard

A company's security team notices that a VPC flow log record shows an outbound connection from a private EC2 instance to an IP address in a restricted country. The security group allows outbound 0.0.0.0/0 for TCP 443. The network ACL allows outbound traffic to 0.0.0.0/0 on ephemeral ports. The company uses AWS Network Firewall with a firewall policy that has a stateful rule group that denies traffic to the restricted country. The flow log shows the traffic was accepted. What is the most likely cause?

A.VPC Flow Logs are not capturing all traffic.
B.The subnet's route table does not have a route that sends traffic to the AWS Network Firewall endpoint.
C.The network ACL inbound rule blocks the return traffic.
D.The security group outbound rule is not configured correctly.
AnswerB

If the route table does not point to the firewall, traffic bypasses the firewall and the stateful rule is not evaluated.

Why this answer

AWS Network Firewall's stateful rules are only evaluated for traffic that is routed through the firewall endpoint. If the subnet's route table does not include a route directing traffic to the firewall endpoint, the traffic bypasses the firewall entirely, allowing the outbound connection even though the firewall policy denies it. Option A is incorrect because VPC Flow Logs capture all accepted and rejected traffic after security group and NACL evaluation.

Option C is incorrect because the network ACL allows outbound traffic on ephemeral ports, so inbound return traffic is permitted by the default ephemeral port rule. Option D is incorrect because the security group explicitly allows outbound HTTPS (TCP 443) to 0.0.0.0/0, which is permissive.

153
MCQmedium

A company is using AWS Transit Gateway to connect multiple VPCs. The security team wants to inspect all traffic between VPCs with a third-party firewall appliance deployed in a centralized inspection VPC. What is the MOST efficient way to route traffic to the inspection VPC?

A.Create VPC peering connections between all VPCs and route traffic through the inspection VPC.
B.Use AWS PrivateLink to route traffic through the inspection VPC.
C.Configure Transit Gateway route tables with a blackhole route for the inter-VPC traffic and a route pointing to the inspection VPC.
D.Attach a Network Load Balancer in each VPC and route traffic through it.
AnswerC

This allows traffic between VPCs to be forced through the inspection VPC for firewall inspection.

Why this answer

By configuring Transit Gateway route tables with a blackhole route for inter-VPC traffic and a more specific route pointing to the inspection VPC, traffic between VPCs is forced to go through the inspection VPC for firewall inspection. Option A is wrong because VPC peering does not support transitive routing and would require full mesh. Option B is wrong because AWS PrivateLink is used for private connectivity to services, not for routing traffic between VPCs.

Option D is wrong because a Network Load Balancer is not designed for traffic inspection and would add unnecessary complexity.

154
Multi-Selectmedium

A company is designing a network security architecture for a multi-account environment using AWS Organizations. Which TWO services can be used to centrally manage security policies across all accounts?

Select 2 answers
A.AWS Config
B.AWS CloudTrail
C.AWS Organizations Service Control Policies (SCPs)
D.AWS Firewall Manager
E.Amazon VPC
AnswersC, D

SCPs centrally control permissions across accounts.

Why this answer

AWS Firewall Manager provides centralized management of firewall rules (including AWS WAF, AWS Shield Advanced, and security groups) across all accounts in AWS Organizations. AWS Organizations Service Control Policies (SCPs) allow you to centrally define and enforce permission boundaries and security policies across all member accounts. In contrast, AWS Config and AWS CloudTrail operate per account and do not provide centralized policy management across multiple accounts.

Amazon VPC is a per-account networking service. Therefore, the correct answers are C (SCPs) and D (Firewall Manager).

155
Multi-Selecthard

Which THREE are valid methods to secure data in transit between a VPC and an on-premises network over the internet? (Choose three.)

Select 3 answers
A.VPC Endpoint (Gateway or Interface)
B.AWS Direct Connect with a VPN
C.AWS Client VPN
D.VPC Peering
E.AWS Site-to-Site VPN
AnswersB, C, E

Combines Direct Connect for reliability and VPN for encryption.

Why this answer

To secure data in transit between a VPC and an on-premises network over the internet, the valid methods are AWS Direct Connect with a VPN (B), AWS Client VPN (C), and AWS Site-to-Site VPN (E).

AWS Site‑to‑Site VPN creates an IPsec VPN tunnel over the internet between the VPC and the on‑premises network, encrypting all traffic.

AWS Client VPN is a managed service that allows individual clients to securely connect to the VPC over the internet using an OpenVPN tunnel.

AWS Direct Connect with a VPN combines a dedicated physical connection (Direct Connect) with an IPsec VPN to provide both low latency and encryption. While Direct Connect itself is not over the internet, the VPN layer secures the data in transit.

Option A (VPC Endpoint) is used to access AWS services privately within the VPC, not for on‑premises connectivity.

Option D (VPC Peering) connects VPCs, not on‑premises networks.

156
MCQhard

A company uses AWS Direct Connect to connect their on-premises network to AWS. They want to encrypt all traffic between their on-premises router and the AWS Direct Connect location. Which solution should they implement?

A.Use an IPsec VPN over the internet for additional encryption.
B.Use AWS PrivateLink to create a secure connection.
C.Enable MACsec on the Direct Connect connection.
D.Use TLS to encrypt the traffic at the application layer.
AnswerC

MACsec encrypts the Direct Connect link at Layer 2.

Why this answer

MACsec provides encryption at Layer 2 for Direct Connect. Option A is wrong because IPsec VPN over the internet is not over Direct Connect. Option B is wrong because TLS is for application layer.

Option D is wrong because AWS PrivateLink is for VPC endpoints.

157
Multi-Selecthard

A security engineer is designing a network security architecture for a hybrid cloud environment. The company has an AWS Direct Connect connection to its on-premises data center. They want to ensure that all traffic between on-premises and AWS is encrypted and that the encryption is enforced at the network layer. Which TWO solutions should the engineer consider?

Select 2 answers
A.Enable MACsec on the Direct Connect dedicated connection.
B.Set up an SSL VPN between on-premises and AWS.
C.Use VPC Peering to connect on-premises to AWS.
D.Configure an IPsec VPN over the Direct Connect virtual interface.
E.Use TLS encryption at the application layer.
AnswersA, D

MACsec provides Layer 2 encryption on the Direct Connect physical link.

Why this answer

(MACsec) is correct because it provides encryption at Layer 2 on the Direct Connect connection. Option D (IPsec VPN over Direct Connect) is correct because it creates an encrypted tunnel over the Direct Connect link. TLS is Layer 5+ and not network layer.

SSL VPN is not relevant. VPC Peering does not apply to on-premises.

158
MCQeasy

A company wants to restrict access to an S3 bucket so that only objects with server-side encryption using AWS KMS (SSE-KMS) can be uploaded. Which bucket policy condition should be used?

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

This condition enforces a specific KMS key ID for SSE-KMS.

Why this answer

S3:x-amz-server-side-encryption-aws-kms-key-id. This condition key in an S3 bucket policy allows you to enforce that objects must be encrypted with a specific AWS KMS key when the SSE-KMS header is used. Option A (kms:ViaService) is a condition key used in KMS key policies, not in S3 bucket policies; it controls which AWS services can use the KMS key.

Option B (s3:x-amz-server-side-encryption) checks the encryption header but cannot enforce a specific KMS key ID—it only checks for the value 'aws:kms' or 'AES256', but not the key ID. Option C (aws:SourceVpce) is used to restrict access to a specific VPC endpoint, not encryption settings. Therefore, only D provides the granularity to require a specific KMS key ID for SSE-KMS.

159
MCQeasy

A company wants to block outbound traffic from a VPC to the internet except through a NAT Gateway for updates to specific software repositories. Which AWS service should be used to control outbound traffic?

A.Security Groups
B.Route Tables
C.VPC Endpoints
D.Network ACLs
AnswerD

Network ACLs are stateless and can control outbound traffic at the subnet level.

Why this answer

Network ACLs can be attached to subnets to control inbound and outbound traffic at the subnet level, and can be used to block outbound internet traffic except through the NAT Gateway. Option A is wrong because Security Groups are stateful and cannot block outbound traffic based on destination IP ranges in a granular manner. Option B is wrong because Route Tables control routing, not filtering.

Option C is wrong because VPC Endpoints are for private connectivity to AWS services, not for controlling outbound internet traffic.

160
MCQhard

Refer to the exhibit. An IAM role ARN is shown. A security engineer wants to allow an EC2 instance to assume this role. What is required for the EC2 instance to successfully assume the role?

A.The trust policy must specify the EC2 instance's private IP address.
B.The role's trust policy must allow the EC2 service principal to assume the role, and the EC2 instance must be launched with an instance profile that includes this role.
C.The role's permissions policy must include an Allow for the EC2 instance's security group.
D.The EC2 instance must have a public IP address to access the IAM endpoint.
AnswerB

The trust policy grants the EC2 service permission to assume the role, and the instance profile associates the role with the instance.

Why this answer

To allow an EC2 instance to assume an IAM role, two conditions must be met: 1) The role's trust policy must allow the EC2 service principal (ec2.amazonaws.com) to assume the role, 2) The EC2 instance must be launched with an instance profile that includes that role. This is correctly described in option B. Option A is incorrect because the trust policy specifies the service principal, not an IP address.

Option C is incorrect because the permissions policy defines what the role can do, not who can assume it; the trust policy controls who can assume the role. Option D is incorrect because the EC2 instance can access the IAM endpoint via private IP as long as it has network connectivity (e.g., through a VPC endpoint or NAT), and a public IP is not required.

161
MCQmedium

A company uses AWS Organizations to manage multiple accounts. The security team wants to ensure that no VPC in any account can have an internet gateway attached. Which option meets this requirement?

A.Create an IAM policy that denies ec2:AttachInternetGateway and attach it to each account's admin role.
B.Use security groups to block traffic from internet gateways.
C.Apply a service control policy (SCP) that denies ec2:AttachInternetGateway at the root level.
D.Use network ACLs to block traffic from internet gateways.
AnswerC

SCPs centrally control permissions for all accounts in the organization and can deny the action.

Why this answer

A service control policy (SCP) applied at the root organizational unit (OU) level can deny the ec2:AttachInternetGateway action across all accounts in the organization. This centrally enforces the restriction. Option A is incorrect because IAM policies are applied per account and do not prevent the action if the user has permissions through other means.

Option B is incorrect because security groups control traffic at the instance level, not internet gateway attachments. Option D is incorrect because network ACLs control traffic at the subnet level, not internet gateway attachments.

162
MCQeasy

A company runs a web application on Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer (ALB) across multiple Availability Zones. The application uses a MySQL database on an RDS instance in a private subnet. Security compliance requires that all traffic between the ALB and EC2 instances must be encrypted. The security team finds that the ALB currently sends traffic to the EC2 instances using HTTP on port 80. The EC2 security group allows inbound HTTP traffic from the ALB security group. The team needs to implement encryption with minimal changes and without disrupting the application. Which solution meets these requirements?

A.Set up an AWS Client VPN endpoint and have the ALB send traffic through the VPN to the EC2 instances.
B.Deploy an internal ALB in front of the EC2 instances and configure it with an HTTPS listener. Route traffic from the public ALB to the internal ALB.
C.Modify the ALB listener to use HTTPS on port 443. Create a new target group with protocol HTTPS on port 443. Install a valid SSL/TLS certificate on each EC2 instance. Update the EC2 security group to allow inbound HTTPS from the ALB security group.
D.Replace the ALB with a Network Load Balancer (NLB) and use TLS listeners to the EC2 instances.
AnswerC

This encrypts traffic between ALB and EC2 with minimal changes.

Why this answer

It directly modifies the existing ALB to use an HTTPS listener on port 443, creates a new target group with HTTPS on port 443, and requires installing a valid SSL/TLS certificate on each EC2 instance. This ensures all traffic between the ALB and EC2 instances is encrypted with TLS, meeting the security requirement with minimal changes and no disruption to the application. The EC2 security group update to allow inbound HTTPS from the ALB security group completes the configuration.

Exam trap

The trap here is that candidates may think simply changing the ALB listener to HTTPS is enough, but they overlook the requirement to create a new target group with HTTPS protocol and install certificates on the EC2 instances to encrypt the traffic between the ALB and the instances, not just the client-to-ALB leg.

How to eliminate wrong answers

Option A is wrong because introducing an AWS Client VPN endpoint adds unnecessary complexity, latency, and cost; it does not encrypt traffic between the ALB and EC2 instances natively and would disrupt the existing architecture. Option B is wrong because deploying an internal ALB in front of the EC2 instances creates an unnecessary hop and does not encrypt the traffic between the public ALB and the internal ALB unless that leg is also configured with HTTPS, which still requires changes to the EC2 instances and adds complexity. Option D is wrong because replacing the ALB with an NLB would require reconfiguring the entire load balancing setup, potentially disrupting the application, and NLBs do not support native HTTPS health checks or path-based routing that the application may rely on; TLS listeners on an NLB still require certificates on the EC2 instances, but the change is more invasive than modifying the existing ALB.

163
MCQmedium

A security engineer is designing a network firewall solution for a VPC with multiple subnets. The solution must inspect traffic between instances in the same VPC, including traffic within the same subnet. Which AWS service should be used?

A.Security Groups
B.VPC Flow Logs
C.AWS Network Firewall
D.AWS WAF
AnswerC

Provides stateful and stateless inspection for all VPC traffic.

Why this answer

(AWS Network Firewall) is correct because it is a managed service that can inspect traffic between subnets and within a subnet in a VPC, providing stateful and stateless rules for deep packet inspection. Option A (Security Groups) is wrong because they are stateful but cannot inspect traffic within the same subnet; they only allow or deny traffic based on rules. Option B (VPC Flow Logs) is wrong because they capture metadata about traffic but do not inspect packets.

Option D (AWS WAF) is wrong because it is designed for web application layer 7 inspection, not for general network traffic inspection.

164
Multi-Selectmedium

A company wants to implement a defense-in-depth strategy for a web application hosted on AWS. Which TWO services should they use to protect against common web exploits and DDoS attacks?

Select 2 answers
A.AWS WAF
B.AWS Shield Advanced
C.Amazon Inspector
D.AWS Network Firewall
E.Amazon GuardDuty
AnswersA, B

WAF protects against web exploits.

Why this answer

And B are correct: AWS WAF protects against common web exploits like SQL injection and cross-site scripting, and AWS Shield Advanced provides enhanced DDoS protection for web applications. Option C (Amazon Inspector) is a vulnerability management service that scans for software vulnerabilities and unintended network exposure, not inline protection. Option D (AWS Network Firewall) is a managed network firewall for filtering traffic at the VPC level, not specifically for web exploits.

Option E (Amazon GuardDuty) is a threat detection service that continuously monitors for malicious activity, but it does not provide inline prevention.

165
Multi-Selectmedium

Which TWO measures can be taken to protect an AWS account's root user credentials? (Choose two.)

Select 2 answers
A.Create an IAM user with administrative privileges and use that instead of the root user
B.Use the root user for daily administrative tasks
C.Delete the root user account after creating IAM users
D.Enable multi-factor authentication (MFA) on the root user
E.Store the root user credentials in a shared password manager
AnswersA, D

Best practice is to use IAM users for administration.

Why this answer

Options A and D are correct. Creating an IAM user with administrative privileges allows you to avoid using the root user for daily tasks, which is a best practice. Enabling MFA on the root user adds an extra layer of security.

Option B is incorrect because using the root user for daily administrative tasks increases risk and violates security best practices. Option C is incorrect because the root user cannot be deleted. Option E is incorrect because storing credentials in a shared password manager is insecure and not recommended.

166
MCQeasy

A company has a VPC with public and private subnets. The private subnets need to access the internet for software updates. Which AWS service should be used to provide internet access to instances in the private subnets without assigning public IP addresses?

A.NAT gateway in a public subnet.
B.Internet gateway attached to the VPC.
C.VPC Gateway Endpoint for Amazon S3.
D.Site-to-Site VPN connection.
AnswerA

NAT gateway enables outbound internet access for private instances.

Why this answer

A NAT gateway allows instances in private subnets to initiate outbound traffic to the internet. Option B is wrong because Internet Gateway alone does not provide NAT; it requires public IPs. Option C is wrong because VPN does not provide direct internet access.

Option D is wrong because VPC endpoint is for accessing AWS services.

167
MCQeasy

A company wants to allow a specific IP address range to access an EC2 instance in a private subnet using a bastion host. The bastion host is in a public subnet. Which security group configuration is correct?

A.Bastion security group: inbound SSH from the private instance security group. Private instance security group: inbound SSH from the bastion security group.
B.Bastion security group: inbound SSH from the private instance security group. Private instance security group: inbound SSH from the IP range.
C.Bastion security group: inbound SSH from the IP range. Private instance security group: inbound SSH from the IP range.
D.Bastion security group: inbound SSH from the IP range. Private instance security group: inbound SSH from the bastion security group.
AnswerD

This follows the principle of least privilege.

Why this answer

The bastion host, located in the public subnet, should allow inbound SSH from the specified IP address range (e.g., corporate network) because users initiate the connection from that range to the bastion. The private instance should only allow inbound SSH from the bastion host's security group, not directly from the IP range, to ensure that all access is mediated through the bastion. Option A is incorrect because the bastion should not allow SSH from the private instance; it's the other way around.

Option B is incorrect because the bastion should allow SSH from the IP range, not from the private instance. Option C is incorrect because the private instance should not allow SSH directly from the IP range, as it violates the principle of using a bastion.

168
Multi-Selecthard

A company has a VPC with multiple subnets and uses AWS Transit Gateway to connect to on-premises via AWS Direct Connect. They want to implement network segmentation so that certain VPCs can only communicate with specific on-premises networks. Which THREE components should they use? (Choose THREE.)

Select 3 answers
A.VPC peering connections
B.Direct Connect gateway
C.Transit Gateway association to Direct Connect gateway
D.Transit Gateway route tables
E.Site-to-Site VPN connection
AnswersB, C, D

Provides connectivity to on-premises networks.

Why this answer

Options B, C, and D are correct. The Direct Connect gateway (B) integrates Direct Connect with Transit Gateway. The Transit Gateway association to the Direct Connect gateway (C) enables routing between VPCs and on-premises networks.

Transit Gateway route tables (D) allow separate routing domains to segment traffic. Option A (VPC peering) is not needed because Transit Gateway already handles inter-VPC routing. Option E (Site-to-Site VPN) is not required when using Direct Connect for connectivity.

169
MCQhard

A company is using AWS Organizations with multiple accounts. The security team needs to enforce that all S3 buckets across the organization are encrypted with AWS KMS. Which approach should be used to enforce this policy?

A.Configure each S3 bucket with a bucket policy that denies access if encryption is not used.
B.Apply a service control policy (SCP) at the root level that denies S3 bucket creation unless encryption is configured.
C.Use AWS Config rules to detect unencrypted S3 buckets and automatically remediate them.
D.Create an IAM policy that denies creating S3 buckets without encryption and attach it to all users.
AnswerB

SCPs can be applied to organizational units to centrally enforce policies across accounts.

Why this answer

A service control policy (SCP) can be applied to the root organizational unit in AWS Organizations to centrally deny creating or modifying S3 buckets without KMS encryption across all accounts. Option A is incorrect because bucket policies are per-bucket and cannot enforce encryption at the organizational level. Option C is incorrect because AWS Config rules detect non-compliance after the fact but do not prevent creation; they require additional remediation.

Option D is incorrect because IAM policies are account-specific and cannot be enforced across the entire organization.

170
Multi-Selectmedium

Which TWO features are provided by AWS Shield Advanced that are not available in AWS Shield Standard? (Choose 2)

Select 2 answers
A.Automatic web application firewall rule updates
B.DDoS cost protection
C.Access to detailed DDoS logs
D.24/7 access to the AWS DDoS Response Team
E.Network-layer DDoS protection
AnswersB, D

Shield Advanced offers protection against scaling charges due to DDoS.

Why this answer

Shield Advanced provides DDoS cost protection (option B) and 24/7 access to the AWS DDoS Response Team (option D). Option A is incorrect because automatic web application firewall rule updates are not a feature of Shield Advanced; AWS WAF can be integrated but rules are not automatically updated. Option C is incorrect because detailed DDoS logs are not a distinct feature of Shield Advanced; both Standard and Advanced provide access to AWS Shield logs.

Option E is incorrect because network-layer DDoS protection (e.g., SYN flood, UDP flood) is provided by both Shield Standard and Shield Advanced; Advanced adds application-layer protection and other benefits.

171
Multi-Selectmedium

Which TWO actions should be taken to secure an EC2 instance that is used as a bastion host? (Choose 2)

Select 2 answers
A.Use a security group that only allows necessary inbound ports
B.Use HTTPS instead of SSH for administration
C.Place the bastion host in a private subnet
D.Restrict inbound SSH access to a specific IP range using security group
E.Allow all inbound traffic on port 22 in the network ACL
AnswersA, D

Minimize attack surface.

Why this answer

A bastion host should only expose necessary inbound ports (typically TCP 22 for SSH) to minimize the attack surface. By using a security group that restricts inbound traffic to only required ports, you enforce the principle of least privilege at the network layer, preventing unauthorized access to other services that might be running on the instance.

Exam trap

AWS often tests the misconception that a bastion host should be placed in a private subnet for security, but the correct design requires it to be in a public subnet to serve as an entry point, with security group restrictions providing the necessary protection.

172
MCQeasy

A company has a VPC with public and private subnets. The public subnet hosts a web server that must be accessible from the internet. The private subnet hosts a database that should only be accessible from the web server. Which security group configuration should be used?

A.Database security group: inbound rule allowing traffic from the web server security group on the database port
B.Database security group: inbound rule allowing traffic from the VPC CIDR on the database port
C.Database security group: inbound rule allowing traffic from the web server's private IP on the database port
D.Database security group: inbound rule allowing traffic from 0.0.0.0/0 on the database port
AnswerA

This ensures only the web server can reach the database.

Why this answer

Security groups can reference other security groups as sources. Option A is correct because it allows traffic from the web server's security group, which ensures only the web server can access the database. Option B is wrong because it allows all traffic from the VPC CIDR, which is too permissive.

Option C is wrong because it allows traffic from a specific private IP, but that IP might change and is less flexible than using the security group. Option D is wrong because it allows traffic from 0.0.0.0/0, which permits inbound traffic from any IP address, making the database publicly accessible.

173
MCQhard

A company runs a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The security team needs to block a specific IP address range that has been launching DDoS attacks. The solution must be implemented at the network edge, before traffic reaches the ALB. What should the security team do?

A.Update the security group for the ALB to deny traffic from the IP range.
B.Create an AWS WAF web ACL with an IP set rule that blocks the IP range and attach it to the ALB.
C.Add a network ACL rule on the ALB's subnet to deny inbound traffic from the IP range.
D.Deploy Amazon CloudFront in front of the ALB and use AWS WAF to block the IP range at CloudFront.
AnswerB

WAF at the ALB blocks traffic before it reaches the backend.

Why this answer

AWS WAF web ACL attached to the ALB can filter traffic based on IP addresses. Option B is correct because WAF is deployed at the edge (ALB or CloudFront) and can block IP sets. Option A is wrong because security groups are stateful but work at the instance level, not at the edge.

Option C is wrong because NACLs are applied at the subnet level, but ALB is in a subnet, so traffic reaches the ALB first; NACL is stateless and less suitable for layer 7 filtering. Option D is wrong because CloudFront with WAF is also edge, but the question says 'before traffic reaches the ALB' and ALB is already in place; adding CloudFront changes the architecture.

174
MCQmedium

A company runs a web application on EC2 instances behind an Application Load Balancer. The security team requires that all traffic to the application be inspected by a third-party firewall appliance for compliance. The firewall appliance must be deployed in a separate VPC and must inspect traffic without introducing a single point of failure. Which architecture meets these requirements?

A.Configure the Application Load Balancer to send all traffic to the firewall appliance using Proxy Protocol v2.
B.Use AWS Direct Connect to route all traffic through the firewall appliance.
C.Use AWS Network Firewall to inspect traffic.
D.Deploy Gateway Load Balancer endpoints in the application VPC and attach them to the firewall appliance in the inspection VPC across multiple Availability Zones.
AnswerD

Gateway Load Balancer allows transparent inspection of traffic by third-party appliances and supports multi-AZ deployment.

Why this answer

Gateway Load Balancer endpoints in the application VPC allow traffic to be sent to a third-party firewall appliance deployed in a separate inspection VPC across multiple Availability Zones, providing high availability and traffic inspection. Option A is incorrect because Proxy Protocol v2, while used for preserving client IP, does not enable traffic inspection by a firewall. Option B is incorrect because AWS Direct Connect is a dedicated network connection to on-premises, not a mechanism for traffic inspection.

Option C is incorrect because AWS Network Firewall is a managed service that can inspect traffic, but it cannot be used to route traffic to a third-party firewall appliance in a separate VPC; it is itself the firewall.

175
MCQhard

A company uses AWS Site-to-Site VPN to connect its on-premises network to a VPC. The VPN tunnel is up, but traffic from on-premises cannot reach EC2 instances in the VPC. The EC2 instances have a security group that allows inbound ICMP from the on-premises CIDR. What is the most likely cause?

A.The security group rule is using the wrong protocol.
B.The VPN connection does not have static routes configured.
C.The subnet route table does not have a route for the on-premises CIDR pointing to the virtual private gateway.
D.The subnet is not associated with the main route table.
AnswerC

Without this route, traffic from on-premises cannot be routed to the subnet.

Why this answer

For traffic from on-premises to reach EC2 instances in the VPC via Site-to-Site VPN, the subnet route table must include a route for the on-premises CIDR block with the virtual private gateway (VGW) as the target. Option A is incorrect because ICMP is allowed. Option B is incorrect because static routes are not required on the VPN connection itself; routes are needed in the route table.

Option D is incorrect because subnet association with the main route table is not necessary; any custom route table works.

176
MCQmedium

A company uses AWS Organizations and has multiple VPCs in different accounts. They want to centrally manage network firewall rules for all VPCs using a single firewall policy. Which AWS service should they use?

A.AWS Firewall Manager
B.AWS WAF
C.AWS Network Firewall
D.AWS Shield Advanced
AnswerA

Centrally manages firewall policies across accounts.

Why this answer

AWS Firewall Manager allows you to centrally manage firewall rules across accounts and VPCs. Option B is wrong because Network Firewall is a per-VPC service. Option C is wrong because Shield is for DDoS.

Option D is wrong because WAF is for web ACLs, not network firewalls.

177
MCQeasy

A company wants to centrally manage and enforce security policies across multiple AWS accounts and VPCs. They need to ensure that all VPCs have a specific set of rules, such as disabling public subnets. Which AWS service should be used?

A.AWS Organizations with Service Control Policies (SCPs)
B.AWS Identity and Access Management (IAM)
C.AWS Shield
D.AWS Config
AnswerA

SCPs allow central control over the maximum permissions for accounts, enabling enforcement of network policies.

Why this answer

AWS Organizations with Service Control Policies (SCPs) can centrally control permissions across accounts, allowing enforcement of rules like disabling public subnets. Option B is wrong because IAM is for users and roles, not for VPC-level controls. Option C is wrong because AWS Shield is for DDoS protection.

Option D is wrong because AWS Config evaluates resource configurations but does not enforce policies.

178
Multi-Selecthard

A company has a VPC with public and private subnets. They use a NAT Gateway in the public subnet to allow instances in the private subnet to access the internet. The security team wants to ensure that all outbound traffic from the private subnet is logged and inspected. Which THREE services should they use together to achieve this? (Choose THREE.)

Select 3 answers
A.VPC Flow Logs
B.AWS Direct Connect
C.AWS Network Firewall
D.Amazon Route 53 Resolver DNS Firewall
E.AWS Transit Gateway
AnswersA, C, D

Flow logs capture IP traffic information for logging.

179
MCQmedium

A security engineer is designing a network ACL for a public subnet. The subnet hosts a web server on port 443. Which inbound and outbound rules should be configured to allow HTTPS traffic from the internet? (Assume default deny all rule.)

A.Inbound: allow TCP 443 from 0.0.0.0/0; Outbound: allow TCP 1024-65535 to 0.0.0.0/0.
B.Inbound: allow TCP 443 from 0.0.0.0/0; Outbound: allow TCP 443 to 0.0.0.0/0.
C.Inbound: allow TCP 1024-65535 from 0.0.0.0/0; Outbound: allow TCP 443 to 0.0.0.0/0.
D.Inbound: allow TCP 443 from 0.0.0.0/0; Outbound: allow TCP 443 to 0.0.0.0/0 for responses.
AnswerA

This allows incoming HTTPS and outgoing return traffic on ephemeral ports.

Why this answer

NACLs are stateless, requiring explicit inbound and outbound rules. The inbound rule allows HTTPS (TCP 443) from the internet. The outbound rule allows return traffic on ephemeral ports (1024-65535) back to the internet.

Option B is wrong because the outbound rule only allows TCP 443, which is too restrictive for return traffic. Option C is wrong because the inbound rule only allows ephemeral ports, not HTTPS. Option D is wrong because it incorrectly states 'for responses' and the outbound rule is still too restrictive.

180
MCQeasy

A company wants to allow its developers to access Amazon RDS databases from their on-premises network without traversing the public internet. Which solution meets this requirement?

A.Use a NAT gateway in the VPC
B.Create a VPC endpoint for RDS
C.Configure VPC Peering between the on-premises network and the VPC
D.Establish an AWS Site-to-Site VPN connection
AnswerD

A VPN connection securely connects on-premises to the VPC, allowing private access to RDS.

Why this answer

An AWS Site-to-Site VPN connection establishes a secure, encrypted tunnel between the on-premises network and the Amazon VPC, allowing resources like RDS databases to be accessed privately without traversing the public internet. Option A is incorrect because a NAT gateway enables outbound internet traffic from a private subnet, not inbound private access from on-premises. Option B is incorrect because while Amazon RDS supports interface VPC endpoints, these endpoints are only accessible from within the VPC and do not provide connectivity from an on-premises network; a VPC endpoint alone does not meet the requirement.

Option C is incorrect because VPC Peering connects two VPCs within AWS, not an on-premises network to a VPC.

181
MCQhard

Refer to the exhibit. A network engineer reviews the NACL entries for a subnet. What is the effect of this NACL on inbound traffic?

A.Only SSH from the internal network and HTTPS from any IP are allowed.
B.All inbound traffic is allowed.
C.Only HTTPS traffic is allowed from any IP.
D.All inbound traffic is denied.
AnswerA

Inbound rules allow SSH from 10.0.0.0/16 and HTTPS from 0.0.0.0/0.

Why this answer

Inbound rules: Rule 100 allows SSH from 10.0.0.0/16 (internal network). Rule 200 allows HTTPS from 0.0.0.0/0 (any IP). Rule 300 (implicit deny) denies all other inbound traffic.

Therefore, only SSH from the internal network and HTTPS from any IP are allowed. Option B is incorrect because not all inbound traffic is allowed; SSH from external networks is denied. Option C is incorrect because HTTPS is allowed from anywhere.

Option D is incorrect because the NACL does not deny all traffic; it allows specific traffic.

182
Multi-Selectmedium

A company is designing a network security architecture for a multi-tier application. Which TWO of the following are best practices for implementing defense in depth?

Select 2 answers
A.Use network ACLs as stateful firewalls at the subnet level
B.Use security groups to control traffic between instances
C.Attach internet gateways to all subnets for high availability
D.Place web servers in public subnets and application servers in private subnets
E.Use the same security group for all tiers to simplify management
AnswersB, D

Security groups act as instance-level firewalls.

Why this answer

The correct answers are B and D. Security groups act as stateful, instance-level firewalls, making them a best practice for controlling traffic between instances (B). Placing web servers in public subnets and application servers in private subnets provides network segmentation, a key defense-in-depth principle (D).

Option A is incorrect because network ACLs are stateless, not stateful. Option C is incorrect because internet gateways should only be attached to public subnets, not all subnets. Option E is incorrect because using the same security group for all tiers reduces security boundaries.

183
MCQmedium

A company wants to use AWS Certificate Manager (ACM) to provide a TLS certificate for a website hosted on an ALB. The domain is example.com, and the certificate must be renewed automatically. Which type of certificate should be requested?

A.A private certificate issued by ACM Private CA
B.A self-signed certificate generated with OpenSSL
C.A certificate imported into ACM from a third-party CA
D.A public certificate issued by ACM with DNS validation
AnswerD

ACM handles renewal automatically.

Why this answer

ACM automatically renews public certificates if DNS validation is used. Option A is incorrect because private certificates issued by ACM Private CA are not trusted by public browsers. Option B is incorrect because self-signed certificates are not trusted by browsers and must be manually renewed.

Option C is incorrect because imported certificates from third-party CAs must be manually renewed.

184
Multi-Selecthard

A company wants to implement a defense-in-depth strategy for a web application hosted on AWS. Which THREE services should they combine to protect against common web attacks and network threats?

Select 3 answers
A.Amazon GuardDuty
B.AWS WAF
C.AWS Shield Advanced
D.AWS Direct Connect
E.AWS Certificate Manager (ACM)
AnswersA, B, C

GuardDuty provides intelligent threat detection by analyzing logs and network traffic.

Why this answer

A defense-in-depth strategy for web applications includes AWS WAF to protect against web exploits (e.g., SQL injection, cross-site scripting), AWS Shield Advanced for comprehensive DDoS protection, and Amazon GuardDuty for continuous threat detection using anomaly detection and threat intelligence. Option D (AWS Direct Connect) is for dedicated network connectivity, not security. Option E (AWS Certificate Manager) is for SSL/TLS certificate management, not direct attack protection.

185
MCQeasy

Refer to the exhibit. An EC2 instance is associated with the IAM role shown. Which action can the EC2 instance perform?

A.Read objects from any S3 bucket.
B.Write objects to any S3 bucket.
C.Delete objects from any S3 bucket.
D.Upload objects to any S3 bucket.
AnswerA

s3:Get* includes GetObject.

Why this answer

The policy allows s3:Get* and s3:List* actions, which include GetObject. Option B is wrong because PutObject is not allowed. Option C is wrong because DeleteObject is not allowed.

Option D is wrong because no write actions are allowed.

186
MCQhard

A company is using AWS Certificate Manager (ACM) to manage SSL/TLS certificates for an Application Load Balancer (ALB). The security team notices that an ACM-issued certificate is about to expire. How can they automate renewal?

A.Set a CloudWatch alarm to send a notification when the certificate is about to expire, then manually renew.
B.Manually remove the certificate from ACM and re-issue a new one.
C.Use AWS Certificate Manager's automatic renewal feature; no additional configuration is required if the certificate was issued by ACM.
D.Configure an AWS Lambda function to monitor certificate expiration and re-issue the certificate.
AnswerC

ACM automatically renews certificates it issued, provided the domain validation records are in place.

Why this answer

ACM automatically renews certificates issued by ACM if the domain is validated with DNS or email. No manual action is needed. Imported certificates must be manually renewed.

Removing and re-adding is not automatic. Lambda is unnecessary.

187
MCQmedium

A company is using AWS Transit Gateway to connect multiple VPCs and on-premises networks via AWS Direct Connect and VPN. They have a central inspection VPC that uses AWS Network Firewall to inspect traffic. The security team wants to ensure that all traffic between VPCs and between VPCs and on-premises is routed through the inspection VPC. They have created a transit gateway route table for each VPC and the Direct Connect/VPN attachments. They have configured the route tables to propagate routes from the inspection VPC's attachment. However, traffic is still bypassing the inspection VPC. What should the security team do to ensure traffic is inspected?

A.Enable route propagation for all attachments in the transit gateway route tables.
B.Create static routes in each VPC's transit gateway route table pointing to the inspection VPC attachment for all destination CIDRs, and remove any routes that point directly to other attachments.
C.Configure network ACLs in the inspection VPC to block traffic that does not come from the transit gateway.
D.Create VPC peering connections between all VPCs and the inspection VPC.
AnswerB

Static routes can force traffic to the inspection VPC.

Why this answer

Creating static routes in each VPC's transit gateway route table pointing to the inspection VPC attachment for all destination CIDRs, and removing any routes that point directly to other attachments, ensures that all traffic is sent to the inspection VPC. Without static routes, propagated routes from the inspection VPC attachment create routes to the inspection VPC, but other attachments may also propagate routes that allow direct communication, bypassing inspection. Option A is incorrect because enabling route propagation alone does not force traffic through the inspection VPC; it only adds routes automatically, but other routes (e.g., from Direct Connect or VPN attachments) can still allow direct paths.

Option C is incorrect because network ACLs in the inspection VPC control traffic to and from its subnets but do not influence routing decisions in the transit gateway; they cannot prevent traffic from bypassing the inspection VPC. Option D is incorrect because VPC peering connections bypass the transit gateway entirely, so traffic would not be inspected by the Network Firewall in the inspection VPC.

188
MCQhard

A company is migrating a legacy application to AWS. The application requires that all network traffic between two VPCs be inspected by a third-party firewall appliance. The firewall must be able to inspect traffic bidirectionally and automatically fail over if the appliance becomes unhealthy. Which architecture meets these requirements?

A.Use AWS Transit Gateway with a Network Load Balancer in front of multiple firewall appliances
B.Use VPC Peering between the two VPCs and route traffic through a firewall instance in one of the VPCs
C.Deploy a single firewall instance in a shared VPC and route all inter-VPC traffic through it
D.Use AWS PrivateLink to connect the VPCs and place the firewall in the consumer VPC
AnswerA

Transit Gateway enables centralized routing, and NLB provides health checks and failover.

Why this answer

AWS Transit Gateway with a Network Load Balancer (NLB) in front of multiple firewall appliances enables bidirectional traffic inspection and automatic failover. The NLB performs health checks and distributes traffic to healthy firewall instances, ensuring high availability. Option B is wrong because VPC Peering does not support a central inspection point; traffic flows directly between VPCs without passing through a firewall.

Option C is wrong because a single firewall instance is a single point of failure, lacking automatic failover. Option D is wrong because AWS PrivateLink uses VPC Endpoints for connectivity, which does not allow traffic inspection by a third-party firewall in the consumer VPC; it only allows one-way initiated connections.

189
MCQeasy

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

A.All requests are denied
B.Only HTTPS requests are allowed, and HTTP requests are denied
C.Only HTTP requests are allowed
D.All requests are allowed
AnswerB

The Deny effect blocks HTTP requests; HTTPS requests are implicitly allowed.

Why this answer

The bucket policy uses a Deny effect that blocks any request where SecureTransport is false, which corresponds to HTTP requests. Therefore, only HTTPS requests are allowed, and HTTP requests are denied. Option B is correct.

190
MCQmedium

Refer to the exhibit. A security engineer is reviewing this S3 bucket policy. The bucket contains sensitive data that should only be accessible from the corporate network (192.0.2.0/24). What is a potential security issue with this policy?

A.The condition should be applied to the Principal element
B.The Resource ARN is missing the bucket name
C.The policy does not require authentication; anonymous access is allowed from the specified IP range
D.The IP address range is not specific enough
AnswerC

The Principal is "*", which includes anonymous users.

Why this answer

The policy allows any principal (Principal: '*') to perform the s3:GetObject action under the condition that the request comes from the specified IP range. However, this condition only checks the IP address; it does not require authentication. If the bucket is publicly accessible (no bucket policy or ACL denying anonymous access), then unauthenticated requests from the allowed IP range would be allowed, which is a security issue.

Option A is wrong because the condition belongs on the Action element, not the Principal. Option B is wrong because the Resource ARN includes the bucket name correctly (arn:aws:s3:::example-bucket/*). Option D is wrong because the IP range is specific and appropriate for the requirement.

191
MCQhard

A company has a Direct Connect connection to AWS. They want to encrypt all traffic between their on-premises network and their VPC. Which solution meets this requirement?

A.Use MACsec on the Direct Connect connection.
B.Set up a VPN connection over the Direct Connect link using IPsec.
C.Enable encryption on the Direct Connect virtual interface.
D.Use TLS for all traffic between on-premises and AWS.
AnswerB

IPsec VPN over Direct Connect encrypts all traffic between the customer gateway and the VPC.

Why this answer

Direct Connect does not inherently encrypt traffic. To encrypt all traffic between on-premises and the VPC, you can establish an IPsec VPN tunnel over the Direct Connect link. This encrypts traffic at the network layer.

Option A is incorrect: MACsec provides physical-layer encryption but is not supported on all Direct Connect connections and does not encrypt all traffic end-to-end. Option C is incorrect: Direct Connect virtual interfaces do not provide encryption. Option D is incorrect: TLS is an application-layer protocol; it would require individual applications to support it and does not encrypt all traffic at the network layer.

192
MCQhard

An IAM policy is applied to a user. The user reports that they cannot run 'aws ec2 describe-instances --region eu-west-1' but can run the same command in us-east-1. What is the most likely reason?

A.The policy only applies to resources in us-east-1, so other regions are implicitly denied.
B.The policy condition uses StringEquals, which only allows requests from us-east-1.
C.The policy denies ec2:Describe* when the region is not us-east-1.
D.The policy allows ec2:Describe* in all regions, but the user lacks permissions in eu-west-1.
AnswerC

The condition denies requests to regions other than us-east-1.

Why this answer

The condition 'StringNotEquals' with 'aws:RequestedRegion' denies the action if the region is not us-east-1. Option A is wrong because the policy explicitly denies ec2:Describe* actions. Option B is wrong because the condition is StringNotEquals, not StringEquals.

Option D is wrong because the policy does not specify resource-level conditions.

193
MCQmedium

A company has an Amazon RDS for MySQL database in a private subnet. The database should only be accessible from a specific fleet of EC2 instances in the same VPC. Which combination of security controls should be used to meet this requirement?

A.Use a network ACL on the private subnet that allows MySQL traffic from the EC2 instances' IP addresses.
B.Set up a VPN connection between the EC2 instances and the RDS instance.
C.Use a security group for the RDS instance that allows inbound MySQL traffic from the security group of the EC2 instances.
D.Enable IAM database authentication for the RDS instance and require EC2 instances to use IAM credentials.
AnswerC

Security group rules can reference other security groups, providing instance-level access control.

Why this answer

A security group on the RDS instance that allows inbound MySQL traffic from the security group of the EC2 instances restricts access to only those instances that are members of that security group. Option A is incorrect because network ACLs are stateless and operate at the subnet level, requiring explicit inbound and outbound rules; they cannot reference security groups. Option B is incorrect because a VPN connection is used for connectivity to external networks, not for communication within the same VPC.

Option D is incorrect because IAM database authentication controls user authentication to the database, not network-level access from EC2 instances.

194
Multi-Selecteasy

A company is deploying a web application on EC2 instances behind an Application Load Balancer. The security team needs to protect the application from common web exploits like SQL injection and cross-site scripting. Which AWS service should be used?

Select 1 answer
A.AWS Shield Advanced
B.AWS WAF
C.AWS Network Firewall
D.Amazon GuardDuty
E.AWS Firewall Manager
AnswersB

AWS WAF integrates with Application Load Balancers to filter HTTP/HTTPS requests and can block common web exploits such as SQL injection and cross-site scripting. This directly addresses the security team's requirement.

Why this answer

AWS WAF (Option B) is the correct service because it integrates with Application Load Balancers to filter HTTP/HTTPS requests and can block common web exploits such as SQL injection and cross-site scripting. AWS Shield Advanced (Option A) provides enhanced DDoS protection, which does not mitigate web application layer attacks like SQL injection or XSS. AWS Network Firewall (Option C) operates at the network layer and is not designed for application-layer threats.

Amazon GuardDuty (Option D) is a threat detection service, not a prevention tool. AWS Firewall Manager (Option E) centralizes firewall rule management but does not directly protect against web exploits. Therefore, only Option B is correct for this requirement.

195
Multi-Selecteasy

Which TWO statements about AWS Key Management Service (KMS) are correct? (Choose two.)

Select 2 answers
A.Customer master keys (CMKs) can be automatically rotated every year.
B.KMS uses symmetric encryption only.
C.KMS can store encrypted data.
D.KMS is a regional service.
E.You cannot import your own key material into KMS.
AnswersA, D

AWS KMS can automatically rotate CMKs annually.

Why this answer

Options A and D are correct. AWS KMS allows automatic yearly rotation of customer master keys (CMKs) (A). KMS is a regional service, meaning CMKs are tied to a specific AWS Region (D).

Option B is incorrect because KMS supports both symmetric and asymmetric encryption. Option C is incorrect because KMS does not store encrypted data; it manages encryption keys. Option E is incorrect because you can import your own key material into KMS using the 'import key material' feature.

196
Multi-Selecteasy

A company needs to log all network traffic to and from EC2 instances for security analysis. Which TWO services can capture this data? (Choose 2)

Select 2 answers
A.AWS Config
B.VPC Flow Logs
C.AWS CloudTrail
D.Traffic Mirroring
E.Amazon CloudWatch Logs
AnswersB, D

VPC Flow Logs capture metadata about network traffic.

Why this answer

Options B and D are correct. VPC Flow Logs capture metadata (IP addresses, ports, protocols) about network traffic. Traffic Mirroring captures actual packet content for deep packet inspection.

Option A (AWS Config) is incorrect because it records configuration changes, not network traffic. Option C (AWS CloudTrail) is incorrect because it logs API calls, not network traffic. Option E (Amazon CloudWatch Logs) is incorrect because it is for log storage and monitoring, not for capturing network traffic.

197
MCQmedium

A security engineer needs to block traffic from a specific country from reaching an Application Load Balancer. Which AWS service should be used to accomplish this?

A.Network ACLs on the VPC subnet
B.Security groups associated with the ALB
C.Route 53 Resolver DNS Firewall
D.AWS WAF web ACL associated with the ALB
AnswerD

AWS WAF supports geo-match conditions to block traffic from specific countries.

Why this answer

AWS WAF can be associated with an Application Load Balancer to create web ACLs with geographic match conditions, enabling geo-blocking. Option A (Network ACLs) is incorrect because NACLs operate at the subnet level and do not support geo-blocking. Option B (Security groups) is incorrect because security groups do not support geo-blocking.

Option C (Route 53 Resolver DNS Firewall) is incorrect because it filters DNS queries, not HTTP traffic. Option D (AWS WAF web ACL associated with the ALB) is correct because WAF supports geographic match conditions to block traffic from specific countries.

198
MCQhard

A company attaches the above bucket policy to an S3 bucket. A user from the IP range 203.0.113.0/24 makes a request over HTTPS (TLS) to download an object from the bucket. Will the request succeed?

A.Yes, but only if the request also includes a valid AWS signature.
B.No, because the Allow statement is overridden by the Deny statement.
C.No, because the Deny statement denies all requests regardless of the condition.
D.Yes, because the request uses HTTPS and comes from the allowed IP range.
AnswerD

The Deny only blocks non-HTTPS requests, and the Allow permits the IP range.

Why this answer

The bucket policy includes an Allow statement that grants s3:GetObject access to requests coming from the IP range 203.0.113.0/24 over HTTPS (using the aws:SecureTransport condition). The Deny statement only denies requests that do not use HTTPS (i.e., aws:SecureTransport equals false), so a request from the allowed IP range using TLS is not affected by the Deny and is permitted by the Allow statement.

Exam trap

AWS often tests the nuance that an explicit Deny only applies when its conditions are fully satisfied, and candidates mistakenly assume any Deny statement automatically blocks all requests regardless of conditions.

How to eliminate wrong answers

Option A is wrong because the policy does not require a valid AWS signature; the Allow statement uses only IP address and HTTPS conditions, and anonymous requests from the allowed IP range over HTTPS are permitted without authentication. Option B is wrong because the Deny statement does not override the Allow statement for this request; the Deny only applies when aws:SecureTransport is false, which is not the case for an HTTPS request. Option C is wrong because the Deny statement does not deny all requests; it is conditional on the request not using HTTPS, so requests over HTTPS are not denied.

199
Multi-Selectmedium

A company is designing a multi-account AWS environment using AWS Organizations. They need to enforce that all new S3 buckets created across accounts have encryption enabled and block public access. Which TWO approaches meet these requirements? (Choose two.)

Select 2 answers
A.Apply a service control policy (SCP) to the root organizational unit that denies s3:PutBucketPublicAccessBlock and s3:PutBucketEncryption if the configuration does not meet requirements.
B.Use an S3 bucket policy that denies all principals unless encryption is enabled.
C.Create an AWS Config conformance pack with rules that check for encryption and public access, and auto-remediate non-compliant buckets.
D.Enable AWS CloudTrail to monitor bucket creation and send alerts to the security team.
E.Create an IAM role in each account that requires MFA for creating S3 buckets.
AnswersA, C

Correct: SCPs can deny non-compliant actions across accounts.

Why this answer

SCPs can be applied to the root OU to deny s3:PutBucketPublicAccessBlock and s3:PutBucketEncryption unless the bucket meets encryption and public access requirements, thus enforcing the policy organization-wide. Option C is correct because AWS Config conformance packs can include managed rules to detect buckets without encryption or with public access, and automatic remediation actions can be configured to fix non-compliant buckets. Option B is incorrect because an S3 bucket policy only applies to a single bucket and cannot enforce requirements across all buckets in all accounts; it also cannot prevent creation of buckets that don't meet the policy.

Option D is incorrect because CloudTrail only provides logging and alerting; it does not enforce or remediate. Option E is incorrect because an IAM role with MFA requirement does not enforce encryption or public access settings on buckets; it only controls who can create buckets.

200
MCQmedium

A company wants to ensure that all traffic to and from its Amazon EC2 instances in a VPC is inspected by a third-party security appliance. The instances are in private subnets and must maintain their private IP addresses. Which solution should be used?

A.Deploy a Transit Gateway with a site-to-site VPN to the appliance
B.Configure a Gateway Load Balancer and Gateway Load Balancer endpoints in the VPC
C.Use VPC Peering to connect to a central inspection VPC
D.Set up a Network Load Balancer in front of the instances
AnswerB

Gateway Load Balancer with GWLBe allows transparent inline inspection of traffic.

Why this answer

Gateway Load Balancer (GWLB) with Gateway Load Balancer endpoints (GWLBe) allows you to insert third-party appliances inline for traffic inspection without changing the instances' private IP addresses. The GWLB acts as a transparent layer between the VPC and the appliance, inspecting all traffic. Option A is incorrect because a Transit Gateway with a site-to-site VPN does not provide inline inspection without modifying the routing and IP addresses.

Option C is incorrect because VPC Peering does not inherently provide traffic inspection; you would still need to route traffic through an appliance. Option D is incorrect because a Network Load Balancer is designed for load balancing, not for inline inspection of all traffic.

201
MCQeasy

A company wants to securely connect an on-premises data center to a VPC in AWS. The connection must be encrypted and use the public internet. The company has a moderate volume of traffic and needs a quick setup. Which solution meets these requirements?

A.AWS Client VPN
B.AWS Transit Gateway
C.AWS Site-to-Site VPN
D.AWS Direct Connect
AnswerC

Site-to-Site VPN provides encrypted tunnels over the internet and can be set up quickly.

Why this answer

AWS Site-to-Site VPN creates an encrypted IPSec tunnel over the public internet and can be set up quickly. Option A is wrong because AWS Client VPN is for individual client connections, not site-to-site. Option B is wrong because AWS Transit Gateway is a network transit hub, not a connection method.

Option D is wrong because AWS Direct Connect provides a dedicated private connection, not over the public internet.

202
MCQhard

A company has a VPC with a public subnet and a private subnet. An EC2 instance in the private subnet needs to initiate outbound connections to the internet for software updates. The company wants to ensure that all outbound traffic goes through a single, highly available IP address for whitelisting purposes. Which solution should be used?

A.Launch a NAT instance in a public subnet and assign an Elastic IP. Configure the private subnet route table to point to the NAT instance.
B.Create an internet gateway and attach it to the private subnet, then configure the route table.
C.Create a VPC endpoint for Amazon S3 and route software update traffic through that endpoint.
D.Create a NAT gateway in each Availability Zone and assign the same Elastic IP to both.
AnswerA

Correct. A NAT instance with an Elastic IP provides a single IP for outbound traffic. It can be placed in a public subnet and configured as a route target for the private subnet, allowing instances to initiate outbound connections to the internet.

Why this answer

A NAT instance in a public subnet with an Elastic IP provides a single, stable IP address for outbound traffic from the private subnet. By configuring the private subnet route table to point to the NAT instance, all outbound internet traffic goes through that instance. While not inherently highly available across Availability Zones, the solution meets the core requirement of a single IP for whitelisting and can be made more resilient using Auto Scaling and instance recovery.

Exam trap

The question asks for a 'single, highly available IP address' for whitelisting. While NAT gateways offer high availability, they do not support sharing the same Elastic IP across multiple gateways. A NAT instance, though not fully highly available by default, can still serve as a single IP solution and may be improved with Auto Scaling.

203
MCQeasy

A company needs to block traffic from a specific IP address range in their VPC. Which component should be used?

A.Route table
B.Network ACL
C.Internet gateway
D.Security group
AnswerB

NACLs can deny traffic from specific IP ranges.

Why this answer

Network ACLs are stateless and can explicitly deny traffic from specific IP address ranges at the subnet level. Option A is wrong because route tables control the path of network traffic, not filtering. Option C is wrong because an internet gateway provides internet connectivity but does not filter traffic.

Option D is wrong because security groups are stateful and can only allow traffic, not deny specific IP ranges.

204
MCQmedium

A company wants to securely connect an on-premises data center to a VPC using AWS Site-to-Site VPN. The security team requires that all traffic between the on-premises network and the VPC be encrypted and that the VPN tunnel be highly available. Which design BEST meets these requirements?

A.Use AWS Direct Connect with a private VIF and enable encryption on the connection.
B.Create a single VPN tunnel with a virtual private gateway and enable encryption.
C.Create two VPN tunnels to the same virtual private gateway for redundancy.
D.Create a VPN connection with two tunnels, each terminating on a different virtual private gateway in the same VPC.
AnswerC

Correct. Creating two VPN tunnels to the same virtual private gateway provides redundancy for the tunnels. The virtual private gateway is a highly available service, so this design meets both encryption and high availability requirements.

Why this answer

AWS Direct Connect with a private VIF does not inherently encrypt traffic; a VPN overlay would be required, and a single Direct Connect connection is not highly available. Option B is incorrect because a single VPN tunnel provides encryption but not high availability; if the tunnel fails, connectivity is lost. Option C is correct because a VPN connection with two tunnels to the same virtual private gateway provides redundancy for the tunnels, and the virtual private gateway is a highly available service within a region.

Option D is incorrect because an AWS VPC can only have one virtual private gateway; you cannot attach two virtual private gateways to the same VPC. The recommended design for high availability is to use a single VPN connection with two tunnels (Option C) or multiple VPN connections to different VPCs.

Exam trap

Candidates may think that high availability requires multiple virtual private gateways, but AWS only allows one virtual private gateway per VPC. The correct approach is to use two tunnels to the same virtual private gateway for redundancy.

205
Multi-Selecteasy

A company wants to encrypt all data in transit between an Application Load Balancer (ALB) and its target EC2 instances. Which TWO actions should be taken?

Select 1 answer
A.Enable Client Certificate Authentication on the ALB
B.Configure the target group to use HTTPS as the protocol
C.Add a listener rule to forward traffic based on path
D.Configure the ALB listener to use HTTPS
E.Configure security groups to allow only HTTPS traffic
AnswersB

HTTPS target group ensures traffic from ALB to targets is encrypted.

Why this answer

To encrypt data in transit between an Application Load Balancer (ALB) and its target EC2 instances, only the target group protocol needs to be configured to use HTTPS (Option B). The ALB listener protocol (HTTPS) encrypts traffic between the client and the ALB, not between the ALB and targets, so Option D is not required for this specific goal. Option A is incorrect because Client Certificate Authentication is for mutual TLS between client and ALB.

Option C is incorrect because adding a listener rule based on path affects traffic routing, not encryption. Option E is incorrect because security group rules control access but do not encrypt traffic.

206
MCQmedium

A company is using AWS WAF to protect its web application. The security team notices that the WAF logs show a high number of requests from a specific IP address range that are being blocked by the SQL injection rule. However, the application team reports that legitimate users from that IP range are unable to access the application. Which action should the security team take to resolve this issue while maintaining security?

A.Disable the SQL injection rule for the specific IP range.
B.Increase the rate limit for the entire WAF.
C.Add the IP range to the allow list in the WAF.
D.Create a rate-based rule to limit requests from the IP range.
AnswerD

Creating a rate-based rule limits the request rate from the IP range, allowing legitimate traffic while still blocking excessive requests that may indicate an attack.

Why this answer

Creating a rate-based rule can limit the request rate from the specific IP range, allowing legitimate traffic while still blocking excessive requests that may be part of a SQL injection attempt. This maintains security by not outright allowing the IP range or disabling protections. Option A is wrong because disabling the SQL injection rule for the IP range removes protection against actual SQL injection attacks from that range.

Option B is wrong because increasing the rate limit for the entire WAF is not granular and may affect other traffic. Option C is wrong because adding the IP range to the allow list completely bypasses security, leaving the application vulnerable.

207
Multi-Selecthard

A company needs to ensure that all outbound internet traffic from a VPC goes through a centralized inspection appliance. The VPC has multiple subnets. Which THREE steps are required to implement this?

Select 2 answers
A.Configure security groups to allow outbound traffic from the instances
B.Launch a NAT gateway in a public subnet and associate it with an Elastic IP
C.Attach an Internet Gateway to the VPC and route all traffic to it
D.Create VPC endpoints for all required AWS services
E.Configure route tables in each private subnet to send 0.0.0.0/0 traffic to a NAT gateway in a public subnet
AnswersA, B

Correct: Security groups must allow outbound traffic from instances so that traffic can exit.

Why this answer

To ensure all outbound internet traffic goes through a centralized inspection appliance, the required steps are: configure security groups to allow outbound traffic (Option A) and launch a NAT gateway in a public subnet with an Elastic IP (Option B) to provide outbound connectivity. The third step, which is not listed among the options, is to route private subnet traffic to the inspection appliance rather than directly to the NAT gateway. Option E is incorrect because routing 0.0.0.0/0 to a NAT gateway would bypass the inspection appliance, failing the requirement.

208
Multi-Selecthard

A company is designing a multi-VPC architecture with AWS Transit Gateway. The security requirements include: (1) all inter-VPC traffic must be inspected by a central firewall, (2) traffic to the internet must egress through a centralized egress VPC, and (3) traffic to on-premises via Direct Connect must go through the same inspection firewall. Which THREE components are required to meet these requirements?

Select 3 answers
A.VPC peering connections between all VPCs
B.AWS Network Firewall in an inspection VPC
C.Virtual Private Gateway (VGW) attachment to the inspection VPC
D.NAT gateways in each VPC
E.AWS Transit Gateway with multiple route tables
AnswersB, C, E

Provides centralized traffic inspection.

Why this answer

The correct components are B, C, and E. Option B (AWS Network Firewall in an inspection VPC) provides the central firewall to inspect inter-VPC traffic. Option C (Virtual Private Gateway (VGW) attachment to the inspection VPC) enables on-premises Direct Connect traffic to be routed through the inspection VPC and firewall.

Option E (AWS Transit Gateway with multiple route tables) allows segmentation of traffic and ensures that inter-VPC traffic and traffic to/from on-premises is routed through the inspection VPC. Option A (VPC peering connections between all VPCs) is not needed because Transit Gateway provides the connectivity. Option D (NAT gateways in each VPC) is not required because internet egress is centralized through an egress VPC, not through individual NAT gateways.

209
MCQhard

A company has a VPC with a public subnet and a private subnet. An EC2 instance in the private subnet needs to access an S3 bucket. The security team wants to ensure that traffic to S3 does not traverse the internet. Which solution meets this requirement?

A.Create a VPC gateway endpoint for S3 and attach an endpoint policy that restricts access to the specific bucket
B.Establish a VPN connection to the on-premises network and route through it
C.Set up a NAT gateway in the public subnet and route private subnet traffic to it
D.Deploy a proxy server in the public subnet and configure the instance to use it
AnswerA

Traffic stays within AWS network.

Why this answer

A VPC gateway endpoint for S3 allows private subnet instances to access S3 without traversing the internet. Option B is wrong because a VPN connection is used to connect to on-premises networks, not to access S3 privately. Option C is wrong because a NAT gateway still routes traffic through the internet.

Option D is wrong because a proxy server also introduces internet connectivity.

210
MCQeasy

A company needs to provide temporary, limited-privilege credentials to users so they can access AWS resources from mobile apps. Which AWS service should they use?

A.AWS Key Management Service (KMS)
B.Amazon Cognito user pools
C.AWS Security Token Service (STS)
D.IAM user with access keys
AnswerC

STS provides temporary, limited-privilege credentials.

Why this answer

AWS Security Token Service (STS) enables you to request temporary, limited-privilege credentials for users, which is ideal for mobile apps. Option A (KMS) is used for encryption key management, not credential generation. Option B (Cognito user pools) provides user identity management but does not directly issue temporary AWS credentials.

Option D (IAM user with access keys) provides long-term credentials, not temporary.

211
MCQmedium

A company has an AWS Direct Connect connection and wants to ensure that all traffic from its VPC to an S3 bucket in another region stays within the AWS network. How should this be accomplished?

A.Create a VPC Gateway Endpoint for S3 in the source VPC
B.Create a VPC Interface Endpoint for S3 in the source VPC
C.Use a NAT gateway in the VPC and route traffic through the Direct Connect public VIF
D.Establish a VPN connection to the S3 bucket
AnswerC

Using a public VIF with Direct Connect allows traffic to S3 in any region via the AWS backbone, keeping it off the public internet.

Why this answer

To access an S3 bucket in another region from a VPC while keeping traffic on the AWS network, you can route traffic through a Direct Connect public virtual interface (VIF). A NAT gateway in the VPC can be used to route traffic from private subnets to the public VIF, which then connects to the S3 public endpoint across the AWS global backbone. This ensures traffic does not traverse the public internet.

Option A is incorrect because VPC Gateway Endpoints are regional and can only be used for S3 buckets in the same region. Option B is incorrect because VPC Interface Endpoints for S3 are region-specific and cannot be used to access S3 buckets in another region. Option D is incorrect because VPN connections cannot be established directly to S3 buckets.

212
Multi-Selectmedium

A company is designing a network security architecture for a VPC that hosts a multi-tier application. The security team wants to implement defense in depth. Which three layers of security should be configured?

Select 3 answers
A.Security groups
B.AWS WAF
C.AWS Identity and Access Management (IAM) policies
D.VPC Flow Logs
E.Network ACLs
AnswersA, B, E

Instance-level firewall.

Why this answer

Security groups act as virtual firewalls at the instance level, providing stateful filtering. Network ACLs provide stateless filtering at the subnet level, adding a perimeter layer. AWS WAF protects web applications at the application layer, guarding against common web exploits.

Together, these three layers (A, B, E) implement defense in depth for network security. IAM policies (C) are for identity and access management, not network filtering. VPC Flow Logs (D) are for monitoring traffic, not blocking it.

213
MCQeasy

A company needs to audit all changes to security groups in a VPC. Which AWS service should be used?

A.VPC Flow Logs
B.AWS Config
C.Amazon CloudWatch
D.AWS CloudTrail
AnswerD

CloudTrail records all API calls made in the account, including security group modifications.

Why this answer

AWS CloudTrail records API calls, including changes to security groups, and can be used for auditing. Option A is wrong because VPC Flow Logs capture network traffic, not API activity. Option B is wrong because AWS Config can track resource configuration changes but is not primarily for auditing API calls; it focuses on compliance and configuration history.

Option C is wrong because Amazon CloudWatch is for monitoring metrics and logs, not API activity.

214
MCQmedium

A company wants to audit all changes to security group rules in their AWS account. Which AWS service should be used to record these changes?

A.AWS CloudTrail
B.AWS Config
C.VPC Flow Logs
D.Amazon Inspector
AnswerA

CloudTrail records all API calls, including security group modifications.

Why this answer

AWS CloudTrail records API calls made in the AWS account, including calls to authorize security group rule changes (e.g., AuthorizeSecurityGroupIngress, RevokeSecurityGroupEgress). This makes it the appropriate service for auditing changes to security group rules. AWS Config (Option B) records resource configurations and can track changes, but it is not the primary service for API-level auditing.

VPC Flow Logs (Option C) capture network traffic metadata, not configuration changes. Amazon Inspector (Option D) is a vulnerability assessment service, not an audit service for changes.

215
MCQeasy

A company is using AWS WAF to protect a web application. They want to block requests that originate from known malicious IP addresses. Which WAF rule type should be used?

A.String match condition
B.Regex match condition
C.SQL injection match condition
D.IP set match condition
AnswerD

IP set match condition allows blocking or allowing requests based on source IP.

Why this answer

IP set match conditions are used to match the source IP address of a request against a list of IP addresses. Regex, string match, and SQL injection are for other attack types.

216
MCQhard

A company has a VPC with public and private subnets. An EC2 instance in the private subnet needs to download patches from the internet. The company wants to use a proxy server running on an EC2 instance in the public subnet. The security group for the proxy server must allow inbound HTTP/HTTPS from the instance in the private subnet. The security group for the private instance must allow outbound HTTP/HTTPS to the proxy server. However, the private instance cannot connect to the proxy. What is the most likely cause?

A.The security group for the private instance does not allow outbound traffic to the proxy server.
B.The network ACL for the private subnet blocks inbound traffic from the proxy.
C.The route table for the private subnet has a default route pointing to a NAT gateway instead of the proxy server.
D.The security group for the proxy server does not allow inbound traffic from the private instance's security group.
AnswerC

If the default route points to a NAT gateway, traffic to the internet goes through the NAT gateway instead of the proxy.

Why this answer

The route table for the private subnet likely has a default route pointing to a NAT gateway or internet gateway, causing traffic to bypass the proxy server. Even though security groups are configured correctly, routing decisions are made first. Traffic from the private instance to the proxy server would be directed to the default gateway (NAT/internet gateway) instead of the proxy's IP address.

Option A is incorrect: the security group for the private instance does allow outbound HTTP/HTTPS to the proxy. Option B is incorrect: network ACLs are stateless and must allow both inbound and outbound; but if they blocked inbound from the proxy, that would affect return traffic, not the initial connection. Option D is incorrect: the proxy's security group is configured to allow inbound from the private instance.

217
MCQhard

A company is setting up a cross-account VPC peering connection between VPC A (account 1) and VPC B (account 2). The security team wants to ensure that only specific TCP ports are allowed between the VPCs. They have configured the route tables and the VPC peering connection is active. Which additional configuration is required to enforce the port restriction?

A.Modify the network ACLs in both VPCs to allow inbound traffic only on the required ports.
B.Use network ACLs with stateful filtering to allow only the required ports.
C.Update the security groups in both VPCs to allow inbound traffic only on the required ports from the peered VPC's CIDR or security group.
D.Configure the route tables to deny traffic on all ports except the allowed ones.
AnswerC

Security groups can restrict traffic based on port and protocol at the instance level.

Why this answer

Security groups can reference security groups from peered VPCs across accounts when the VPC peering connection is active, allowing fine-grained control over specific TCP ports at the instance level. Option A is incorrect because modifying network ACLs is possible but they are stateless and apply at the subnet level, not instance level; also, network ACLs cannot reference security groups from peered VPCs. Option B is incorrect because network ACLs are stateless, not stateful; security groups are stateful.

Option D is incorrect because route tables control the path of traffic, not port-level filtering; they cannot deny traffic based on ports.

218
MCQeasy

A company has an S3 bucket that stores sensitive documents. They need to ensure that all objects in the bucket are encrypted at rest using server-side encryption with AWS KMS (SSE-KMS). Additionally, they want to prevent any uploads that do not specify the required KMS key. Which combination of bucket policy and default encryption should they implement?

A.Enable default encryption on the bucket with SSE-KMS using the required KMS key, and add a bucket policy that denies s3:PutObject unless the request includes the x-amz-server-side-encryption-aws-kms-key-id header with the required key ARN.
B.Enable default encryption with SSE-S3, and add a bucket policy that denies s3:PutObject unless the request uses the required KMS key.
C.Use a bucket policy that requires the kms:Encrypt permission for the required key, but do not enable default encryption.
D.Enable default encryption with SSE-KMS using the required key, and rely on IAM policies to enforce encryption, not bucket policies.
AnswerA

Default encryption ensures objects are encrypted if no header is provided. The bucket policy enforces that uploads must use the specific KMS key.

219
MCQmedium

A company uses AWS Certificate Manager (ACM) to provision SSL/TLS certificates for their Application Load Balancer (ALB). They want to ensure that the ALB only accepts connections using TLS 1.2 or higher. How should they configure this?

A.Use ACM to generate a certificate that only supports TLS 1.2.
B.Configure the ALB with an appropriate security policy that enforces TLS 1.2.
C.Configure the ALB to use a CloudFront distribution with a TLS policy.
D.Use AWS Route 53 to enforce TLS version at the DNS level.
AnswerB

ALB security policies allow specifying minimum TLS protocol version.

Why this answer

The Application Load Balancer supports security policies that allow you to enforce TLS 1.2 or higher. Option A is incorrect because ACM provides certificates but does not dictate the TLS version; that is determined by the load balancer's security policy. Option C is incorrect because while CloudFront can enforce TLS policies, it is an additional service and not required; the ALB itself can enforce TLS 1.2.

Option D is incorrect because Route 53 is a DNS service and does not handle TLS version enforcement.

220
MCQeasy

A company has a security group that allows inbound SSH (port 22) from 0.0.0.0/0. A security engineer needs to restrict access to only the company's public IP range (203.0.113.0/24). What is the correct way to modify the security group rule?

A.Edit the existing inbound rule and change the source CIDR to 203.0.113.0/24.
B.Add a new inbound rule allowing SSH from 203.0.113.0/24 and keep the existing rule.
C.Remove the security group rule and add a new rule to deny SSH from 0.0.0.0/0.
D.Create a network ACL that denies SSH from 0.0.0.0/0.
AnswerA

This restricts SSH access to the specified IP range.

Why this answer

The CIDR should be changed from 0.0.0.0/0 to 203.0.113.0/24. Option B is wrong because adding a second rule does not remove the open rule. Option C is wrong because security groups do not support deny rules; they are allow-only.

Option D is wrong because removing the rule and adding a new deny rule is not how security groups work; security groups are allow-only.

221
MCQeasy

A company wants to ensure that all IAM users have multi-factor authentication (MFA) enabled. Which AWS service can be used to enforce this policy?

A.AWS Organizations SCP
B.AWS Config
C.IAM policy with a condition for aws:MultiFactorAuthPresent
D.AWS CloudTrail
AnswerC

An IAM policy can require MFA for all actions.

Why this answer

An IAM policy with a condition that checks aws:MultiFactorAuthPresent can require MFA for API calls, enforcing MFA usage. Option A is wrong because AWS Organizations SCPs can enforce policies at the account level but cannot require MFA for individual IAM users without an accompanying IAM policy. Option B is wrong because AWS Config can detect non-compliance with MFA rules but cannot enforce the policy itself.

Option D is wrong because AWS CloudTrail is used for logging API activity, not for enforcement.

222
MCQhard

A company uses AWS Organizations with multiple accounts. The security team needs to enforce that all S3 buckets in the organization have block public access enabled. Which approach should be used?

A.Use AWS CloudTrail to monitor bucket creation and alert.
B.Use AWS Config rules to detect and remediate noncompliant buckets.
C.Apply a service control policy (SCP) that denies bucket creation without block public access.
D.Create an IAM role in each account that restricts bucket permissions.
AnswerC

SCPs can centrally enforce policies across all accounts.

Why this answer

A service control policy (SCP) can deny the s3:PutBucketPublicAccessBlock action or enforce the block public access settings across all accounts in the organization. Option A (CloudTrail) is incorrect because CloudTrail only logs API calls for auditing, it does not enforce compliance. Option B (AWS Config) is incorrect because although AWS Config can detect noncompliant buckets, it requires additional automation for remediation and is not a direct enforcement mechanism like an SCP.

Option D (IAM role) is incorrect because IAM roles grant permissions to principals and cannot enforce bucket-level settings across accounts; SCPs are the appropriate tool for organization-wide policy enforcement.

223
Multi-Selectmedium

A company has a VPC with a CIDR of 10.0.0.0/16. The VPC contains a public subnet (10.0.1.0/24) and a private subnet (10.0.2.0/24). An EC2 instance in the private subnet needs to access an S3 bucket. The company wants to use a VPC endpoint for S3. Which TWO configurations are required?

Select 2 answers
A.Assign a public IP address to the EC2 instance.
B.Create an endpoint policy that allows access to the S3 bucket.
C.Deploy a NAT gateway in the public subnet.
D.Add a route in the private subnet's route table pointing to the gateway endpoint.
E.Attach a security group to the gateway endpoint.
AnswersB, D

The endpoint policy controls which resources can be accessed via the endpoint.

Why this answer

To access S3 from a private subnet using a VPC endpoint, two configurations are required. First, an endpoint policy must be created (Option B is correct) to control which S3 buckets and actions are allowed. Second, a route must be added in the private subnet's route table pointing to the gateway endpoint (Option D is correct) to direct S3 traffic through the endpoint.

Option A is incorrect because assigning a public IP to the EC2 instance is not needed; the endpoint provides private connectivity. Option C is incorrect because a NAT gateway is not required when using a VPC endpoint. Option E is incorrect because gateway endpoints do not use security groups; they use endpoint policies for access control.

224
Multi-Selecthard

A company's security team is designing a solution to restrict S3 bucket access based on the requester's network. The company has a set of on-premises IP ranges and wants to ensure that only requests originating from those IPs can access the bucket. Which combination of actions should be taken? (Choose TWO.)

Select 2 answers
A.Configure the EC2 instances in the VPC to use Elastic IPs and allow those IPs in the bucket policy
B.Create a VPC endpoint for S3 and attach a VPC endpoint policy that restricts access to the specific bucket
C.Use AWS WAF to inspect HTTP requests to the bucket
D.Enable S3 Block Public Access on the bucket
E.Create an S3 bucket policy that uses the aws:SourceIp condition to allow access only from the on-premises IP ranges
AnswersB, E

This ensures that even if requests originate from the VPC, they must go through the endpoint and be subject to the policy.

Why this answer

To restrict S3 bucket access based on the requester's network, you can use an S3 bucket policy with the aws:SourceIp condition to allow only requests from specified on-premises IP ranges (option E). However, if requests originate from within a VPC, they might appear to come from the VPC's public IPs (e.g., through a NAT gateway) rather than the on-premises IPs. To handle this, you can create a VPC endpoint for S3 and attach a VPC endpoint policy that restricts access to the specific bucket (option B).

This ensures traffic from the VPC to S3 goes through the endpoint and can be controlled separately. Option A is incorrect because using Elastic IPs does not reliably restrict access; the bucket policy would need to allow specific Elastic IPs, but this does not account for on-premises IPs. Option C is incorrect because AWS WAF is for web application traffic, not S3 bucket access.

Option D is incorrect because S3 Block Public Access prevents public access but does not restrict based on the requester's network.

225
Multi-Selecthard

A company needs to ensure that all outbound traffic from a VPC goes through a centralized inspection appliance in a different VPC. Which TWO actions must be taken to achieve this?

Select 2 answers
A.Deploy VPC endpoints for all AWS services used.
B.Use AWS Direct Connect Gateway to route traffic between VPCs.
C.Create VPC peering connections between all VPCs.
D.Use AWS Transit Gateway with appropriate route tables to direct traffic to the inspection VPC.
E.Configure the inspection VPC to forward traffic to its destination after inspection.
AnswersD, E

Transit Gateway supports transitive routing through route tables.

Why this answer

The correct answers are D and E. D: AWS Transit Gateway enables transitive routing between VPCs. By configuring appropriate route tables, traffic from source VPCs can be directed to the inspection VPC for centralized inspection.

E: After the inspection appliance processes the traffic, it must be forwarded to its final destination. This requires proper routing in the inspection VPC to send the inspected traffic out to the internet or to another VPC. Option A is incorrect because VPC endpoints only provide private access to AWS services, not general internet traffic routing.

Option B is incorrect because AWS Direct Connect Gateway is used for connecting on-premises networks to AWS, not for routing between VPCs. Option C is incorrect because VPC peering does not support transitive routing; it only allows direct communication between two VPCs, not through a third VPC.

← PreviousPage 3 of 6 · 397 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Network Security Governance questions.