Courseiva

CCNA Network Security, Compliance and Governance Questions

75 of 397 questions · Page 4/6 · Network Security, Compliance and Governance · Answers revealed

226
Multi-Selectmedium

A company wants to inspect traffic between VPCs in the same region using a third-party security appliance. Which THREE components are needed? (Choose 3)

Select 3 answers
A.VPC Peering connections between all VPCs
B.NAT Gateways in each VPC
C.AWS Transit Gateway
D.Route tables in the inspection VPC directing traffic through the appliance
E.A dedicated inspection VPC for the security appliance
AnswersC, D, E

Transit Gateway enables hub-and-spoke connectivity.

Why this answer

The correct answers are C, D, and E. AWS Transit Gateway (C) is required to centrally interconnect multiple VPCs and route traffic through a common inspection point. A dedicated inspection VPC (E) hosts the third-party security appliance, segregating inspection traffic from production workloads.

Route tables in the inspection VPC (D) must direct inbound and outbound traffic through the appliance to enforce inspection. Option A is incorrect because VPC Peering does not support centralized inspection and creates a full mesh. Option B is incorrect because NAT Gateways only provide outbound internet access, not inter-VPC traffic inspection.

227
MCQmedium

A company is using AWS Client VPN to provide remote access to their VPC. They want to ensure that only authenticated users from their corporate Active Directory can access the VPN. Which authentication method should they use?

A.IAM authorization
B.SAML-based federated authentication
C.Certificate-based authentication using AWS Certificate Manager
D.Mutual authentication
AnswerB

SAML allows integration with Active Directory for user authentication.

Why this answer

AWS Client VPN supports SAML-based federated authentication, which can integrate with your corporate Active Directory to authenticate users. Option A is wrong because IAM authorization is not an authentication method for Client VPN; it is used for controlling access to AWS APIs. Option C is wrong because certificate-based authentication uses client certificates and does not directly tie to Active Directory user identities.

Option D is wrong because mutual authentication still relies on certificates and does not inherently provide integration with Active Directory.

228
MCQmedium

A company uses AWS Transit Gateway to connect multiple VPCs and on-premises networks. The security team wants to ensure that traffic between VPCs is inspected by a centralized security appliance running in a security VPC. Which configuration should be used?

A.Configure network ACLs in each VPC to deny traffic directly between VPCs.
B.Attach the VPCs to the Transit Gateway and configure route tables to send inter-VPC traffic to the security VPC via a route pointing to the security VPC's attachment.
C.Create VPC peering connections between each VPC and the security VPC, then update route tables.
D.Use NAT gateways in each VPC to route traffic through the security VPC.
AnswerB

Forces traffic through the security VPC for inspection.

Why this answer

AWS Transit Gateway enables centralized traffic inspection by attaching VPCs and configuring route tables to route inter-VPC traffic to the security VPC's attachment. Note that the route must point to the security VPC attachment, not a blackhole route (which drops traffic). Option A is incorrect because network ACLs control traffic at the subnet level and cannot route traffic to another VPC.

Option C is incorrect because VPC peering does not provide a centralized inspection point without complex routing. Option D is incorrect because NAT gateways are for outbound internet traffic, not inter-VPC inspection.

Exam trap

Option B incorrectly uses 'blackhole route' which drops traffic; the intended configuration is to route traffic to the security VPC attachment, not use a blackhole.

229
MCQmedium

A company wants to restrict access to an Amazon S3 bucket so that only traffic from a specific AWS Direct Connect virtual interface (VIF) can access it. Which combination of steps should the company take?

A.Attach an S3 bucket policy that denies access unless the source IP is the public IP address of the Direct Connect VIF.
B.Create a VPC endpoint for S3 with a VPC endpoint policy that allows access only from the VPC, and configure the VPC route table to route S3 traffic through the Direct Connect VIF.
C.Create a network ACL that allows S3 traffic only from the Direct Connect CIDR block and associate it with the VPC subnet connected to the VIF.
D.Configure the Direct Connect VIF with a public IP address and use an S3 bucket policy that allows access only from that IP address.
AnswerB

This ensures that S3 traffic must traverse the VPC endpoint, and the route table forces traffic through the Direct Connect VIF, restricting access to that path.

Why this answer

Option B. To restrict access to an S3 bucket to only traffic from a specific Direct Connect VIF, you can create a VPC endpoint for S3 and attach a VPC endpoint policy that allows access only from the VPC. Then, configure the VPC route table to route traffic destined for S3 through the Direct Connect VIF, ensuring that only traffic coming through that VIF can reach the endpoint.

Option A is incorrect because the Direct Connect VIF does not have a public IP address; it uses private IPs. Option C is incorrect because network ACLs are stateless and cannot enforce path-specific restrictions; also they operate at the subnet level, not for specific services like S3. Option D is incorrect because Direct Connect VIFs do not have public IP addresses; they use private IPs and traffic goes through private virtual interfaces.

Exam trap

A common trap is to think that a bucket policy with an IP address condition can restrict traffic to a Direct Connect VIF, but Direct Connect VIFs use private IPs, not public IPs. Another trap is using network ACLs, which are stateless and cannot restrict based on the source being a specific VIF.

230
MCQhard

A financial services company is required to encrypt all data at rest and in transit. They have an Amazon S3 bucket with server-side encryption enabled (SSE-S3) and are using HTTPS for all API calls. During an audit, the auditor points out that the bucket policy does not explicitly deny requests that do not use HTTPS. Which of the following should the company add to the bucket policy to enforce HTTPS?

A.{"Effect":"Deny","Principal":"*","Action":"s3:*","Resource":"arn:aws:s3:::bucketname/*","Condition":{"Bool":{"aws:SecureTransport":"true"}}}
B.{"Effect":"Allow","Principal":"*","Action":"s3:*","Resource":"arn:aws:s3:::bucketname/*","Condition":{"Bool":{"aws:SecureTransport":"true"}}}
C.{"Effect":"Deny","Principal":"*","Action":"s3:*","Resource":"arn:aws:s3:::bucketname/*","Condition":{"Bool":{"aws:SecureTransport":"true"}}}
D.{"Effect":"Deny","Principal":"*","Action":"s3:*","Resource":"arn:aws:s3:::bucketname/*","Condition":{"Bool":{"aws:SecureTransport":"false"}}}
AnswerD

This denies requests when SecureTransport is false, effectively requiring HTTPS.

Why this answer

It uses a Deny effect with the condition aws:SecureTransport set to 'false'. This denies any request that is not using HTTPS, effectively enforcing that all requests must be made over HTTPS. Options A and C are incorrect because they deny requests when SecureTransport is 'true', which would block legitimate HTTPS requests.

Option B is incorrect because it uses an Allow effect; while it would allow HTTPS requests, it does not explicitly deny non-HTTPS requests, so non-HTTPS requests could still be allowed if another policy grants access.

231
MCQmedium

A company wants to restrict access to an S3 bucket so that only traffic from a specific AWS account is allowed. Which S3 bucket policy condition key should be used to achieve this?

A.aws:PrincipalAccount
B.aws:Referer
C.aws:SourceAccount
D.aws:SourceArn
AnswerC

aws:SourceAccount ensures only requests from the specified AWS account are allowed.

Why this answer

Using the 'aws:SourceAccount' condition key ensures that only requests originating from the specified AWS account are allowed. Option A is wrong because 'aws:PrincipalAccount' checks the principal's account, not the source account. Option B is wrong because 'aws:Referer' checks the HTTP referer header, not the source account.

Option D is wrong because 'aws:SourceArn' checks the ARN of the source resource, not the account.

232
MCQeasy

A company has a VPC with public and private subnets. They want to allow instances in the private subnet to download software updates from the internet while preventing inbound traffic from the internet. Which AWS service should they use?

A.VPC Peering
B.NAT Gateway
C.Internet Gateway
D.VPN Connection
AnswerB

A NAT Gateway, deployed in a public subnet with an Elastic IP, enables outbound IPv4 traffic from private instances to the internet for software updates while its stateful translation drops any unsolicited inbound return traffic, satisfying the constraint of preventing inbound internet access.

Why this answer

A NAT Gateway allows outbound internet traffic from private subnets while blocking inbound traffic, making it the correct choice. Option A (VPC Peering) is incorrect because it does not provide internet access. Option C (Internet Gateway) is incorrect because it allows inbound traffic from the internet.

Option D (VPN Connection) is incorrect because it typically provides private connectivity to an on-premises network, not direct internet access.

233
MCQmedium

A company uses AWS Transit Gateway to connect multiple VPCs and on-premises networks. The security team needs to inspect all traffic between VPCs and on-premises using a centralized firewall appliance. Which architecture meets this requirement?

A.Deploy AWS Network Firewall in each VPC and route all traffic through it.
B.Connect all VPCs to on-premises via AWS Direct Connect and inspect traffic on-premises.
C.Create VPC peering connections between each VPC and the firewall VPC.
D.Use Transit Gateway with a central inspection VPC that hosts the firewall appliance.
AnswerD

Centralized inspection via Transit Gateway route tables.

Why this answer

A Transit Gateway with a centralized inspection VPC allows routing all traffic through firewall appliances for centralized inspection. Option A is wrong because deploying AWS Network Firewall in each VPC does not centralize inspection; it distributes inspection per VPC. Option B is wrong because connecting all VPCs to on-premises via Direct Connect does not provide centralized inspection within AWS; it sends traffic on-premises, which may not be desired.

Option C is wrong because VPC peering does not support transitive routing, making it unsuitable for centralized inspection across many VPCs.

234
Multi-Selectmedium

A company is designing a security group configuration for a three-tier application. The web servers must be accessible from the internet on ports 80 and 443. The application servers must only communicate with the web servers on port 8080. The database servers must only communicate with the application servers on port 3306. Which TWO of the following are best practices for implementing this with security groups? (Choose TWO.)

Select 2 answers
A.Use the security group ID of the web tier as the source in the app tier inbound rule.
B.Use the CIDR block of the subnet for the source security group rules.
C.Use network ACLs to enforce rules at the subnet level instead of security groups.
D.Use the security group ID of the app tier as the source in the database tier inbound rule.
E.Assign the same security group to all instances to simplify management.
AnswersA, D

Restricts inbound traffic to only resources with the web security group.

Why this answer

Options A and D are correct. Using security group IDs as source in inbound rules ensures that only instances with the specified security group can communicate, providing fine-grained control. Option A allows web servers to communicate with app servers on port 8080.

Option D allows app servers to communicate with database servers on port 3306. Option B is incorrect because using CIDR blocks is less secure and less granular than using security group IDs. Option C is incorrect because network ACLs are stateless and operate at the subnet level, not at the instance level; security groups are more appropriate for this requirement.

Option E is incorrect because assigning the same security group to all instances would allow all instances to communicate with each other, violating the principle of least privilege.

235
Multi-Selectmedium

A company is building a serverless application using Amazon API Gateway, AWS Lambda, and Amazon DynamoDB. The security team requires that all API requests are authenticated and authorized, and that the Lambda function has only the necessary permissions to access DynamoDB. Which THREE steps should be taken?

Select 3 answers
A.Place the Lambda function inside a VPC and use a VPC endpoint for DynamoDB.
B.Configure API Gateway to use an Amazon Cognito user pool or a Lambda authorizer for authentication.
C.Use API keys in API Gateway to authenticate requests.
D.Create an IAM role for the Lambda function with a policy that allows only the required DynamoDB actions.
E.Attach a resource-based policy to the DynamoDB table that allows access only from the Lambda function's IAM role.
AnswersB, D, E

Provides authentication.

Why this answer

The correct steps are B, D, and E. Option B ensures authentication via Amazon Cognito user pools or Lambda authorizers. Option D grants the Lambda function least-privilege access to DynamoDB using an IAM role.

Option E uses a resource-based policy on the DynamoDB table to restrict access to only the Lambda function's IAM role. Option A is incorrect because placing the Lambda function in a VPC is not required for security; it can access DynamoDB over the internet. Option C is incorrect because API keys are for usage plans and rate limiting, not for authentication.

236
MCQhard

A security engineer is troubleshooting connectivity issues between two VPCs connected via a VPC Peering connection. The VPCs are in different accounts. The security groups in both VPCs allow traffic between the CIDRs. The route tables have the appropriate entries. However, instances in VPC A cannot communicate with instances in VPC B. What is the most likely cause?

A.The VPC Peering connection does not support transitive routing through an intermediate VPC or on-premises network.
B.The VPC Peering connection requires an IAM role to be assumed for cross-account communication.
C.The security group in VPC A does not allow inbound traffic from VPC B's CIDR.
D.The network ACL in VPC A does not allow return traffic from VPC B.
AnswerA

VPC Peering is non-transitive; if there is a VPN or another VPC in the path, traffic will be dropped.

Why this answer

VPC Peering connections do not support transitive routing. If traffic must pass through an intermediate VPC or on-premises network, the peering connection alone cannot route it. Option B is incorrect because VPC Peering does not require an IAM role for cross-account communication; instead, the accepter must accept the request and route tables must be updated.

Option C is incorrect because security groups are stateful and automatically allow return traffic, and the scenario states security groups allow traffic between CIDRs. Option D is incorrect because the issue is not about NACLs; if NACLs were blocking traffic, the problem would likely be related to stateless filtering, but the question focuses on security groups and routing.

237
MCQeasy

A company wants to centrally manage firewall rules across multiple VPCs in different AWS accounts. Which AWS service should they use?

A.AWS Network Firewall with AWS Firewall Manager
B.Security Groups
C.AWS WAF
D.Network ACLs
AnswerA

AWS Network Firewall provides centralized management through Firewall Manager.

Why this answer

AWS Network Firewall can be centrally managed using AWS Firewall Manager, which provides a single pane of glass to apply firewall rules across multiple VPCs and accounts. Option B is wrong because Security Groups are per-VPC and not centrally managed. Option C is wrong because AWS WAF is for web application layer protection, not network firewall.

Option D is wrong because Network ACLs are per-subnet and cannot be centrally managed across accounts.

238
MCQhard

A company needs to meet compliance requirements that mandate encryption of all data in transit between EC2 instances in the same VPC. The instances are in different subnets and communicate using TCP port 443. Which solution should a network engineer implement?

A.Configure the application to use TLS for communication.
B.Enable VPC Flow Logs to monitor for unencrypted traffic.
C.Use AWS Certificate Manager (ACM) to provision certificates and enable encryption automatically.
D.Deploy a VPN connection between the instances.
AnswerA

This ensures encryption in transit as required.

Why this answer

Configuring the application to use TLS ensures end-to-end encryption of data in transit between EC2 instances, meeting the compliance requirement. Option B is incorrect because VPC Flow Logs only capture metadata about traffic (e.g., IP addresses, ports, protocols) and do not encrypt the data itself. Option C is incorrect because AWS Certificate Manager (ACM) provisions certificates but does not automatically encrypt traffic; the application must use those certificates within a TLS configuration.

Option D is incorrect because deploying a VPN connection between instances within the same VPC adds unnecessary complexity and does not automatically encrypt application-layer traffic.

239
Multi-Selecthard

A company has a VPC with a CIDR of 10.0.0.0/16. They have two subnets: subnet A (10.0.1.0/24) and subnet B (10.0.2.0/24). They have an AWS Network Firewall deployed in a firewall subnet. They want to inspect all traffic between subnet A and subnet B. Which TWO actions are required? (Choose two.)

Select 2 answers
A.Attach a transit gateway to the VPC and route traffic through it.
B.Configure the Network Firewall rule group to allow the desired traffic between subnets.
C.Add a route in subnet A's route table that sends traffic to subnet B via the Network Firewall endpoint's elastic network interface.
D.Create a VPC peering connection between subnet A and subnet B.
E.Create a security group rule that allows traffic between subnet A and subnet B.
AnswersB, C

The firewall must have rules to allow the traffic after routing it through.

Why this answer

To inspect traffic between subnet A and subnet B, the traffic must be routed through the Network Firewall endpoint. This is achieved by adding a route in subnet A's route table that points to the firewall endpoint's elastic network interface (ENI) for the destination subnet B (10.0.2.0/24), and similarly for subnet B's route table for subnet A (10.0.1.0/24). Additionally, the Network Firewall rule groups must be configured to allow the desired traffic; otherwise, the firewall will block it by default.

Options A, D, and E are incorrect: A (transit gateway) is not needed because both subnets are in the same VPC; D (VPC peering) is unnecessary for intra-VPC traffic; E (security group rule) does not route traffic—security groups are applied at the instance level, not to control traffic between subnets.

240
MCQhard

A company has a VPC with multiple subnets and uses AWS Network Firewall to inspect traffic. The security team notices that traffic to a specific IP (10.0.0.10) is being dropped unexpectedly. The firewall policy has a stateful rule group that allows all traffic. What is the MOST likely cause?

A.The stateful rule group has an implicit deny for that IP
B.AWS Shield Advanced is blocking the traffic
C.The stateless default action is set to drop
D.The subnet's route table does not have a route to the firewall endpoint
AnswerC

Stateless rules are evaluated first; if default action is drop, traffic is dropped regardless of stateful rules.

Why this answer

Network Firewall evaluates stateless rules first, and a stateless default drop action would drop traffic before stateful rules are considered. Option A is wrong because stateful rules allow all. Option B is wrong because route table directs traffic to firewall.

Option D is wrong because AWS Shield is for DDoS protection.

241
MCQhard

A company wants to centrally manage and enforce VPC security group rules across multiple accounts in AWS Organizations. Which AWS service should be used?

A.AWS Config
B.AWS CloudFormation StackSets
C.AWS Firewall Manager
D.IAM Policies
AnswerC

AWS Firewall Manager allows central creation and enforcement of security group rules across all accounts in an organization, making it the correct choice.

Why this answer

AWS Firewall Manager is the correct service for centrally managing and enforcing VPC security group rules across multiple accounts in AWS Organizations. It provides centralized security policy management, allowing you to define common security group rules and automatically apply them to new and existing accounts. AWS Config (Option A) is primarily for compliance auditing and resource configuration history, not enforcement.

AWS CloudFormation StackSets (Option B) can deploy resources across accounts but does not provide ongoing enforcement of security policies. IAM Policies (Option D) control permissions, not security group configurations.

242
MCQmedium

A company is using AWS Transit Gateway to interconnect multiple VPCs and on-premises networks. They need to ensure that traffic between VPCs is encrypted in transit. They also want to minimize changes to existing VPC route tables. Which solution should they use?

A.Use a transit VPC architecture with EC2-based VPN appliances in a security VPC that encrypt traffic between VPCs.
B.Enable Transit Gateway VPN attachments between each VPC and the Transit Gateway with IPsec VPN.
C.Use AWS Network Firewall to inspect and encrypt traffic between VPCs.
D.Implement VPC peering with encryption enabled.
AnswerA

EC2 VPN appliances (e.g., using IPsec) can be deployed in a security VPC to encrypt traffic between VPCs. Traffic is routed through the Transit Gateway to the security VPC, then encrypted and forwarded.

243
MCQmedium

A company uses AWS Certificate Manager (ACM) to issue certificates for a fleet of Application Load Balancers. The security team requires that only specific IAM roles can request, renew, or delete ACM certificates. Which policy type should be used to enforce this?

A.AWS managed policies such as AWSCertificateManagerFullAccess
B.Service control policies (SCPs) in AWS Organizations
C.IAM identity-based policies attached to the IAM roles
D.Resource-based policies attached to the ACM certificates
AnswerC

IAM policies control access to ACM actions.

Why this answer

ACM access is controlled via IAM identity-based policies attached to IAM roles, which allow specifying which roles can request, renew, or delete certificates. Option A is incorrect because AWS managed policies are a type of IAM policy, but the question asks for the policy type used to enforce access for specific IAM roles, and AWS managed policies can be used but are not the only type; however, the key point is that identity-based policies are the mechanism. Option B is incorrect because service control policies (SCPs) apply to all accounts in an AWS Organization and cannot target specific IAM roles within an account.

Option D is incorrect because ACM does not support resource-based policies; only IAM policies can be used to control access to certificates.

244
MCQeasy

A company is using AWS CloudHSM to store sensitive encryption keys. Which of the following is a security best practice for managing the HSM?

A.Disable two-factor authentication for the HSM to simplify management.
B.Use AWS KMS to automatically rotate the CloudHSM partition password.
C.Store the CloudHSM security officer (CO) password in AWS Secrets Manager.
D.Allow AWS to manage the CloudHSM cluster by granting AWS support access.
AnswerC

Best practice to protect the CO password.

Why this answer

Storing the CloudHSM security officer (CO) password in AWS Secrets Manager is a security best practice. Secrets Manager provides secure storage, automatic rotation, and fine-grained access control for sensitive credentials, reducing the risk of exposure. Option A is incorrect because disabling two-factor authentication would weaken the security posture of the HSM.

Option B is incorrect because AWS KMS cannot rotate CloudHSM partition passwords; KMS manages encryption keys, not HSM passwords. Option D is incorrect because granting AWS support access would compromise the customer-managed security model of CloudHSM, where only the customer controls the HSM cluster.

245
MCQmedium

A company is using AWS Organizations with multiple accounts. The security team wants to ensure that no EC2 instance in any account can be launched with a public IP address unless it is in a specific VPC. Which solution will meet this requirement?

A.Create a service control policy (SCP) that denies ec2:RunInstances if the request includes an association with a public IP address, unless the VPC is the allowed one.
B.Create an IAM policy that denies ec2:RunInstances if the subnet is not in the allowed VPC, and attach it to all IAM users.
C.Enable AWS CloudTrail and create a CloudWatch Events rule to stop any instance with a public IP.
D.Use AWS Config rules to detect non-compliant instances and automatically terminate them.
AnswerA

Correct: SCPs can enforce restrictions across all accounts in the organization.

Why this answer

An SCP applied at the root OU can deny ec2:RunInstances when the request includes a public IP address, using the ec2:AssociatePublicIpAddress condition key, and can further limit based on VPC using conditions like ec2:Vpc. This centrally prevents non-compliant EC2 launches across all accounts. Option B is incorrect because IAM policies must be attached to each user/role individually and do not scale across accounts; SCPs are designed for this purpose.

Option C is incorrect because AWS Config can detect non-compliant instances but cannot prevent the initial launch. Option D is incorrect because CloudWatch Events can trigger actions after launch but does not prevent the launch itself.

246
MCQhard

A company has a requirement to audit all network traffic leaving a VPC. The traffic includes traffic to the internet, to on-premises via VPN, and to other VPCs via Transit Gateway. Which AWS service can capture and log all outbound traffic for compliance analysis?

A.VPC Traffic Mirroring
B.VPC Flow Logs
C.AWS CloudTrail
D.Amazon GuardDuty
AnswerA

Traffic Mirroring copies network traffic for analysis and compliance.

Why this answer

(VPC Traffic Mirroring) is correct because it captures and copies all outbound network traffic, including full packets, for compliance analysis. Option B (VPC Flow Logs) is incorrect because it only logs metadata (e.g., IP addresses, ports, protocols) but not the full packet content. Option C (AWS CloudTrail) is incorrect because it logs API calls and management events, not network traffic.

Option D (Amazon GuardDuty) is incorrect because it is a threat detection service that analyzes traffic for anomalies, but it does not log all traffic for auditing purposes.

247
MCQhard

An IAM policy is created and attached to a user. The user reports they cannot stop a production EC2 instance. What is the most likely reason?

A.The EC2 instance does not have the tag Environment=production
B.The policy is missing a region condition
C.The policy is not attached to the user's group
D.The policy does not include ec2:StopInstances
AnswerA

Condition requires the tag.

Why this answer

The IAM policy likely includes a condition key such as ec2:ResourceTag/Environment requiring the instance to have the tag 'Environment=production'. If the instance lacks that tag, the action is denied, even if the user has the permission to stop instances. Options B, C, and D are incorrect because the issue is specifically due to the missing tag, not a region condition, group attachment, or missing action.

248
MCQhard

A company uses AWS Certificate Manager (ACM) to issue a public SSL/TLS certificate for a domain hosted on Route 53. The certificate is used by an Application Load Balancer. After renewal, the ALB continues to serve the old certificate. What is the most likely cause?

A.The certificate was not imported into ACM correctly.
B.The ALB listener is not configured to use the new certificate.
C.The certificate is a private certificate and cannot be used with an ALB.
D.DNS validation failed during renewal.
AnswerD

Correct. DNS validation failure during renewal prevents the certificate from being renewed, causing the ALB to continue using the old certificate.

Why this answer

The most likely cause is that DNS validation failed during renewal. ACM attempts to automatically renew public certificates using DNS validation when the domain is in Route 53. If the DNS validation fails (e.g., due to incorrect CNAME record or permissions), the certificate will not be renewed, and the ALB will continue to serve the old certificate.

Option B is incorrect because ACM automatically redeploys renewed public certificates to associated resources such as ALB listeners; no manual update is required. Option A is incorrect because ACM handles renewal and does not require import. Option C is incorrect because the certificate is public, not private.

249
MCQmedium

A company is using AWS Client VPN to allow remote employees to access resources in a VPC. The security team wants to enforce multi-factor authentication (MFA) for all VPN connections. Which configuration should be used?

A.Attach a security group to the Client VPN endpoint that only allows MFA-authenticated traffic
B.Use AWS Managed Microsoft AD for authentication
C.Use mutual authentication with client certificates
D.Use SAML-based federation with an identity provider that requires MFA
AnswerD

SAML federation allows integration with an IdP that can enforce MFA.

Why this answer

AWS Client VPN supports SAML-based federation with an identity provider (IdP) that requires MFA, making option D correct. Option A is incorrect because security groups do not enforce authentication, let alone MFA. Option B is incorrect because using AWS Managed Microsoft AD alone does not enforce MFA; MFA would require additional configuration such as AWS AD Connector or a third-party MFA solution.

Option C is incorrect because mutual authentication with client certificates verifies the client's identity but does not enforce MFA.

250
MCQhard

Refer to the exhibit. A company has attached this bucket policy to an S3 bucket. An EC2 instance in VPC vpc-12345 is trying to access the bucket but is getting access denied. The EC2 instance has a public IP of 198.51.100.10. What is the MOST likely reason?

A.The policy does not have an explicit allow for the instance's IP
B.The EC2 instance's source IP is not in the allowed IP range
C.Both conditions must be met for access
D.The EC2 instance does not have the s3:GetObject permission
AnswerB

The instance has a different public IP; the IP condition is not met, and the VPC condition only applies if accessed via VPC endpoint.

Why this answer

The policy has two allow statements: one for source IP range and one for source VPC. The EC2 instance's source IP (198.51.100.10) is not in the allowed IP range (203.0.113.0/24). The second statement allows requests from the VPC, but the condition aws:SourceVpc is only present when the request comes through a VPC endpoint (Gateway or Interface endpoint).

If the EC2 instance accesses S3 via the internet (public IP), the aws:SourceVpc condition is not satisfied, so the second statement does not apply. The first statement does not allow the IP, resulting in implicit deny. Option A is wrong because the policy allows GetObject.

Option C is wrong because the policy does not require both conditions. Option D is wrong because there is no explicit deny.

251
MCQmedium

A security engineer needs to audit all API calls made in an AWS account for compliance. The engineer wants to capture the source IP address and the user agent for each call. Which AWS service should be used?

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

CloudTrail logs API calls with source IP and user agent.

Why this answer

AWS CloudTrail records API calls and includes source IP and user agent, making it the correct service for auditing API calls. Option A (AWS Config) is incorrect because it records resource changes, not API calls. Option C (Amazon CloudWatch Logs) is incorrect because it stores logs but does not capture API calls directly.

Option D (VPC Flow Logs) is incorrect because it captures network traffic, not API calls.

252
MCQeasy

A company wants to allow its employees to securely access internal web applications hosted in a VPC without using a VPN. The solution must authenticate users against the company's Active Directory and apply fine-grained access controls. Which AWS service should be used?

A.AWS Single Sign-On (SSO)
B.AWS Verified Access
C.AWS Client VPN
D.Application Load Balancer with OIDC authentication
AnswerB

Provides secure access without VPN, integrates with AD.

Why this answer

AWS Verified Access is the correct service because it provides secure access to corporate applications hosted in a VPC without requiring a VPN, and it integrates with identity providers such as Active Directory for authentication and fine-grained access control. Option A (AWS SSO) is designed for federating access to AWS accounts and applications, not for securing access to internal VPC-based applications without a VPN. Option C (AWS Client VPN) requires VPN client software and a VPN connection, which does not meet the requirement of not using a VPN.

Option D (Application Load Balancer with OIDC authentication) can authenticate users but typically requires the ALB to be publicly accessible or connected via VPN, and it does not provide the same purpose-built zero-trust access capabilities as Verified Access.

253
MCQhard

A company has a VPC with multiple security groups. An EC2 instance in security group A needs to communicate with an RDS instance in security group B on port 3306. The security team wants to minimize exposure. What should the inbound rule in security group B be?

A.Allow inbound TCP 3306 from the CIDR block of the subnet where the EC2 instance resides
B.Allow inbound TCP 3306 from 0.0.0.0/0
C.Allow inbound TCP 3306 from the private IP address of the EC2 instance
D.Allow inbound TCP 3306 from security group A
AnswerD

Precise and secure.

Why this answer

Referencing security group A as the source allows inbound traffic on port 3306 from any instance associated with security group A, which is the most specific and secure method. This approach automatically adapts if instances in security group A change IP addresses. Option A is wrong because it allows traffic from any instance in the specified subnet, not just those that need to communicate.

Option B is wrong because it allows traffic from all IP addresses, violating the principle of least privilege. Option C is wrong because it ties the rule to a single instance's IP address, which can change and requires updates if the instance is replaced.

254
Multi-Selectmedium

A company is designing a network security architecture for a multi-tier application. The web tier must be accessible from the internet, but the application and database tiers must not. Which TWO design choices meet these requirements? (Choose two.)

Select 2 answers
A.Use a VPC Gateway Endpoint for the web tier to access the internet.
B.Use a NAT gateway in a public subnet to provide internet access to the app and database tiers for updates.
C.Use a security group on the web tier to allow HTTP/HTTPS from 0.0.0.0/0, and security groups on the app and database tiers that only allow traffic from the web tier security group.
D.Place all tiers in a public subnet with a security group that restricts access to the app and database tiers.
E.Place the web tier in a public subnet with an internet gateway in the route table, and the app and database tiers in private subnets.
AnswersC, E

Security groups provide granular control; web tier allows internet, app and database only accept traffic from web.

Why this answer

The correct answers are C and E. Option C uses security groups to control traffic between tiers: the web tier security group allows HTTP/HTTPS from 0.0.0.0/0, and the app and database tier security groups only allow traffic from the web tier security group. This ensures that the application and database tiers are not directly accessible from the internet.

Option E places the web tier in a public subnet with an internet gateway in its route table, so it can receive inbound traffic from the internet. The app and database tiers are placed in private subnets without a direct route to the internet gateway, so they cannot be accessed from the internet. Option A is incorrect because a VPC Gateway Endpoint is used for private connectivity to AWS services like S3 or DynamoDB, not for internet access.

Option B is incorrect because a NAT gateway provides outbound internet access for private subnets, not inbound internet access to the web tier. Option D is incorrect because placing all tiers in a public subnet exposes the application and database tiers to the internet, even with restrictive security groups, because they would still have a route to the internet gateway.

255
Multi-Selecteasy

A security team needs to block outbound traffic from an EC2 instance to known malicious IP addresses while allowing all other outbound traffic. Which THREE steps should be taken? (Choose three.)

Select 3 answers
A.Configure network ACLs to deny outbound traffic to the malicious IPs.
B.Update the VPC route table to send traffic for the malicious IPs to a network firewall appliance.
C.Deploy AWS Network Firewall in the VPC to perform stateful inspection.
D.Create a firewall rule in AWS Network Firewall that denies traffic to the malicious IPs.
E.Modify the security group for the EC2 instance to deny outbound traffic to the malicious IPs.
AnswersB, C, D

Correct: Route traffic to firewall for inspection.

Why this answer

The correct approach to block outbound traffic to known malicious IPs involves a combination of routing and stateful firewall inspection. Option B is correct because updating the VPC route table to send traffic for the malicious IPs to a network firewall appliance (e.g., AWS Network Firewall) enables centralized inspection and blocking. Option C is correct because deploying AWS Network Firewall provides stateful, application-layer inspection that can handle allow/deny rules for specific IPs.

Option D is correct because a firewall rule within AWS Network Firewall can explicitly deny traffic to the malicious IPs. Option A is incorrect because network ACLs are stateless and require individual rules for each IP, making them impractical for dynamic blocklists. Option E is incorrect because security groups support only allow rules, not explicit deny; they cannot block specific IPs outbound.

256
MCQmedium

A company wants to restrict access to an S3 bucket so that only requests originating from a specific AWS account can read objects. Which bucket policy condition should be used?

A.aws:Referer
B.aws:PrincipalAccount
C.aws:SourceAccount
D.aws:SourceArn
AnswerC

This condition key is used to restrict access based on the account that owns the resource making the request.

Why this answer

(aws:SourceAccount). The aws:SourceAccount condition key is used in S3 bucket policies to restrict access to requests originating from a specific AWS account. Option A (aws:Referer) is used to restrict based on HTTP referer header, not account.

Option B (aws:PrincipalAccount) is not a valid condition key in S3 policies. Option D (aws:SourceArn) restricts based on the ARN of the source resource, not the account. Therefore, Option C is the correct choice.

257
MCQhard

A company has a VPC with a public subnet and a private subnet. An EC2 instance in the private subnet needs to download patches from the internet. The instance is behind a NAT gateway in the public subnet. The security team wants to allow only outbound HTTPS traffic from the instance. Which configuration should be used?

A.Security group on the instance with outbound rule allowing HTTPS
B.VPC gateway endpoint for S3
C.Network ACL on the private subnet with outbound rule allowing HTTPS and inbound rule allowing return traffic
D.Security group on the NAT gateway with outbound rule allowing HTTPS
AnswerA

A security group outbound rule permitting HTTPS only controls traffic at the instance level, but a NAT gateway in the public subnet requires a corresponding inbound security group rule on the NAT gateway itself to allow return traffic from the internet; without this, the NAT gateway drops the response packets, breaking the connection. This option is tempting because security groups are the standard mechanism for restricting instance-level egress, and in a scenario where the instance communicates directly with an internet-facing endpoint without a NAT gateway—such as through an internet gateway with a public IP—this single outbound rule would suffice.

Why this answer

A security group on the EC2 instance with an outbound rule allowing HTTPS (port 443) is the correct configuration. Security groups are stateful, so the outbound rule automatically permits the return traffic, requiring no explicit inbound rule. This ensures only outbound HTTPS is allowed from the instance.

Option C is incorrect because network ACLs are stateless and would require explicit inbound rules for return traffic, but more importantly, NACLs are subnet‑level controls and are not the best practice for restricting traffic from a single instance. Option B is incorrect because VPC gateway endpoints are for private connectivity to AWS services, not for internet access. Option D is incorrect because a security group on the NAT gateway would control the NAT gateway's own traffic, not the instance behind it.

258
MCQmedium

A company is designing a VPC with private subnets for databases and public subnets for web servers. They need to allow the web servers to make outbound internet requests for software updates but prevent inbound traffic from the internet. Which configuration should they use?

A.Deploy a NAT Gateway in a public subnet and add a route in the private subnet's route table pointing 0.0.0.0/0 to the NAT Gateway.
B.Deploy a NAT Gateway in the private subnet and route the private subnet traffic through it.
C.Attach an Internet Gateway to the VPC and route the private subnet traffic through it.
D.Deploy a proxy server in the private subnet and configure the web servers to use it.
AnswerA

This allows outbound internet traffic from the private subnet while blocking inbound unsolicited traffic.

Why this answer

Deploying a NAT Gateway in a public subnet allows instances in private subnets to initiate outbound internet traffic (e.g., for software updates) while blocking unsolicited inbound traffic from the internet. Option B is incorrect because a NAT Gateway must be in a public subnet to access the internet. Option C is incorrect because an Internet Gateway allows both inbound and outbound traffic, which would expose the private subnets to inbound internet traffic.

Option D is incorrect because while a proxy server could work, it is more complex and not the simplest or recommended AWS solution.

259
Multi-Selectmedium

A company wants to monitor and log all network traffic within a VPC for security analysis. Which THREE services can be used to achieve this?

Select 3 answers
A.VPC Flow Logs
B.Amazon CloudWatch
C.AWS Network Firewall
D.AWS Traffic Mirroring
E.Amazon S3
AnswersA, C, D

VPC Flow Logs capture metadata about IP traffic.

Why this answer

VPC Flow Logs capture IP traffic information for network interfaces in a VPC, enabling monitoring and logging. AWS Network Firewall provides stateful inspection and logs traffic that passes through the firewall. AWS Traffic Mirroring replicates network traffic from an elastic network interface for analysis.

Amazon CloudWatch is a monitoring service that can collect logs but does not directly capture network traffic. Amazon S3 is object storage and cannot capture or log network traffic itself.

260
MCQeasy

A company wants to encrypt data in transit between an Application Load Balancer (ALB) and its backend targets. Which AWS service should be used to terminate TLS at the ALB and re-encrypt traffic to the targets?

A.AWS Certificate Manager (ACM)
B.AWS Shield
C.Application Load Balancer with HTTPS listeners
D.AWS WAF
AnswerC

ALB can terminate TLS and re-encrypt to targets.

Why this answer

An ALB can terminate TLS and optionally re-encrypt traffic to targets using HTTPS. Option A is wrong because AWS Certificate Manager provides certificates, not encryption. Option B is wrong because AWS Shield is for DDoS protection.

Option C is correct. Option D is wrong because AWS WAF is a web application firewall.

261
MCQmedium

A security team needs to log all rejected traffic to an internet-facing Network Load Balancer (NLB) for compliance. Which configuration should they use?

A.Enable VPC Flow Logs on the NLB subnets
B.Enable AWS CloudTrail for the NLB
C.Enable access logs on an Application Load Balancer in front of the NLB
D.Enable access logs on the NLB
AnswerD

NLB access logs capture information about rejected traffic.

Why this answer

NLB access logs capture information about rejected traffic when enabled. Option A is wrong because VPC Flow Logs do not capture traffic that is rejected by the NLB itself before reaching the target. Option B is wrong because CloudTrail logs API calls, not network traffic.

Option C is wrong because ALB is a different load balancer type and does not apply to NLB.

262
Multi-Selecthard

A company is using AWS Direct Connect to connect on-premises to AWS. The security team wants to encrypt all traffic traversing the Direct Connect link. Which TWO options can achieve this?

Select 2 answers
A.Establish an IPsec VPN tunnel over the Direct Connect virtual interface
B.Enable MACsec on the Direct Connect dedicated connection
C.Use TLS on all applications
D.Use VPC gateway endpoints for S3
E.Rely on Direct Connect's physical security
AnswersA, B

Establishing an IPsec VPN over a Direct Connect virtual interface encrypts all traffic at Layer 3, ensuring confidentiality across the link.

Why this answer

You can establish an IPsec VPN tunnel over a Direct Connect virtual interface to encrypt traffic at Layer 3. Option B is correct because MACsec (802.1ae) provides encryption at Layer 2 for dedicated connections. Option C is incorrect because TLS only encrypts specific application traffic, not all traffic traversing the link.

Option D is incorrect because VPC gateway endpoints are used for private connectivity to S3 and DynamoDB, but they do not encrypt data across the Direct Connect link itself. Option E is incorrect because physical security does not provide encryption of data in transit.

263
Multi-Selecthard

A company has a VPC with multiple subnets and is using Network Access Analyzer to identify unintended network access. It reports that an EC2 instance in a private subnet has a route to an internet gateway. Which two actions should be taken to remediate this?

Select 2 answers
A.Ensure the EC2 instance does not have a public IP address
B.Remove the route to the internet gateway from the subnet's route table
C.Assign a public IP address to the instance
D.Update the security group to deny outbound traffic to 0.0.0.0/0
E.Attach a NAT gateway to the private subnet
AnswersA, B

Without a public IP, internet traffic is not possible even with route.

Why this answer

The Network Access Analyzer report indicates that the EC2 instance in a private subnet has an unintended route to an internet gateway. To remediate this, two actions are needed: (1) Remove the route to the internet gateway from the subnet's route table, which eliminates the direct path to the internet. (2) Ensure the EC2 instance does not have a public IP address, because even without a route, a public IP could allow direct internet access via the internet gateway. Option A directly addresses the public IP, and option B fixes the route table.

Options C (assigning a public IP) would worsen the issue. Option D (updating security group to deny outbound 0.0.0.0/0) does not affect routing and would not remove the internet gateway route. Option E (attaching a NAT gateway) would add another internet route, not remove the existing one.

264
MCQmedium

A company has deployed a web application behind an Application Load Balancer (ALB) in a VPC. The security team wants to block a list of known malicious IP addresses from accessing the application. Which service should they use to implement this protection?

A.Network ACLs on the ALB subnet with deny rules
B.AWS WAF with an IP set rule that blocks the malicious IPs
C.AWS Shield Advanced with automatic IP blocking
D.Security Groups for the ALB with deny rules
AnswerB

WAF integrates with ALB and can block IPs.

Why this answer

AWS WAF is a web application firewall that can inspect HTTP/S traffic and block requests based on conditions such as IP addresses. By creating an IP set containing the malicious IPs and associating it with a web ACL on the ALB, the security team can block those IPs at the application layer. This is more granular and efficient than network-level controls.

Option A (Network ACLs) are stateless and operate at the subnet level, not designed for application-layer filtering, and would require managing deny rules that conflict with the default allow. Option C (AWS Shield Advanced) provides DDoS protection and cost protection, but does not offer granular IP blocking based on a custom list. Option D (Security Groups) are stateful firewalls that only support allow rules; they cannot deny specific IP addresses.

265
Multi-Selectmedium

A company is designing a network security architecture for a multi-account environment using AWS Organizations. The security team needs to enforce that all VPCs use a specific set of security group rules for inbound SSH access. Which TWO steps should the team take? (Choose two.)

Select 2 answers
A.Use AWS Config rules to detect non-compliant security groups and trigger automatic remediation.
B.Enable AWS CloudTrail to log all security group changes and send alerts.
C.Enable Amazon GuardDuty to monitor for malicious traffic.
D.Use a service control policy (SCP) to deny the ec2:AuthorizeSecurityGroupIngress action if the rule does not comply with the standard.
E.Create an IAM role in each account that only allows creation of compliant security groups.
AnswersA, D

Config can detect and remediate.

Why this answer

SCPs can deny the ec2:AuthorizeSecurityGroupIngress action if the rule does not comply with the standard, enforcing compliance at the organization level (Option D). AWS Config rules can detect non-compliant security groups and trigger automatic remediation via AWS Systems Manager Automation (Option A). Option B is incorrect because CloudTrail logs but does not enforce.

Option C is incorrect because GuardDuty monitors for threats, not compliance. Option E is incorrect because IAM roles per account are not centralized and do not enforce across accounts.

266
MCQeasy

A company wants to restrict access to an S3 bucket so that only requests from a specific VPC are allowed. Which policy should they use?

A.Create an IAM policy that restricts access to the VPC and attach it to all users.
B.Attach a security group to the S3 bucket that allows traffic from the VPC.
C.Add a bucket policy with a condition that requires aws:SourceVpc to be the VPC ID.
D.Create a VPC Endpoint policy that allows access only from the VPC.
AnswerC

This condition ensures requests originate from the specified VPC.

Why this answer

S3 bucket policies can use the aws:SourceVpc condition key to restrict access to requests originating from a specific VPC. Option A is wrong because IAM policies are attached to users, roles, or groups, not to the bucket itself, and they cannot restrict based on VPC directly. Option B is wrong because security groups cannot be attached to S3 buckets; they are used for EC2 instances and other resources.

Option D is wrong because a VPC Endpoint policy controls what actions are allowed through the endpoint, but it does not restrict access based on the source VPC; the bucket policy is required for that.

267
MCQmedium

Refer to the exhibit. A network engineer runs the above command and sees this network ACL configuration. The subnet associated with this ACL contains an EC2 instance that is failing to receive inbound HTTP traffic (TCP 80) from the internet. What is the MOST likely cause?

A.The inbound deny rule is associated with the wrong subnet
B.The inbound deny rule for TCP (port range) blocks all TCP traffic
C.The outbound rule does not allow return traffic
D.The inbound allow rule is not wide enough
AnswerB

Rule number 100 denies TCP traffic (protocol 6) from 0.0.0.0/0, which includes HTTP (TCP 80). The rule is evaluated before the allow rule.

Why this answer

The inbound deny rule (Rule 100) for TCP (Protocol 6) from 0.0.0.0/0 denies all TCP traffic, including HTTP on port 80. Network ACLs evaluate rules in ascending order, so this deny rule is evaluated before any allow rules. Even though Rule 200 allows all traffic, the deny rule takes precedence because it comes first.

Therefore, inbound HTTP traffic from the internet is blocked. Option A is incorrect because the subnet association does not affect the rule order; the deny rule applies to the subnet. Option C is incorrect because the outbound rule allows all traffic, so return traffic is not the issue.

Option D is incorrect because the allow rule is wide enough (all traffic), but it is evaluated after the deny rule.

268
Multi-Selectmedium

A company has a security requirement to log and monitor all DNS queries made by EC2 instances in a VPC. Which TWO AWS solutions can meet this requirement?

Select 2 answers
A.Enable Amazon Route 53 Resolver Query Logging.
B.Use AWS CloudTrail to log DNS queries.
C.Enable Amazon Route 53 Resolver DNS Firewall with logging.
D.Use Amazon CloudWatch Logs with a custom agent to capture DNS logs.
E.Enable VPC Flow Logs.
AnswersA, C

This service logs all DNS queries made by resources in the VPC.

Why this answer

Amazon Route 53 Resolver Query Logging (Option A) logs all DNS queries that are forwarded by the Route 53 Resolver within a VPC. Amazon Route 53 Resolver DNS Firewall (Option C) provides DNS filtering and can log DNS queries that match the firewall rules. Both are valid AWS solutions for logging DNS queries from EC2 instances.

Option B (AWS CloudTrail) logs API calls, not DNS queries. Option D (Amazon CloudWatch Logs with a custom agent) is not a native AWS service for DNS logging; it requires custom configuration and is not a managed solution. Option E (VPC Flow Logs) captures IP traffic metadata, not DNS queries.

269
MCQmedium

A company uses AWS Direct Connect to connect its on-premises network to AWS. The security team wants to encrypt all traffic traversing the Direct Connect link. Which solution should be used?

A.Enable encryption on the Direct Connect virtual interface
B.Use TLS on all applications that communicate across the link
C.Establish an IPsec VPN tunnel over the Direct Connect link
D.Use VPC endpoints for all AWS services accessed
AnswerC

Provides encryption for all traffic over the link.

Why this answer

An IPsec VPN tunnel over Direct Connect encrypts all traffic traversing the link, providing encryption while maintaining low latency. Option A is wrong because Direct Connect does not natively encrypt data; encryption must be added separately. Option B is wrong because TLS only protects application-layer traffic, not all traffic at the network level.

Option D is wrong because VPC endpoints only protect traffic to specific AWS services, not all traffic across the Direct Connect link.

270
MCQmedium

A company hosts a multi-tier web application in a VPC. The web servers are in a public subnet, and the application servers are in a private subnet. The application servers need to access a third-party API over the internet. The company wants to ensure that the application servers' IP addresses are not exposed to the internet, and that all outbound traffic to the internet is logged. Additionally, the company wants to restrict outbound traffic to only the specific API endpoints. Which solution should be used?

A.Use a VPC endpoint for the third-party API service.
B.Attach an internet gateway directly to the private subnet and configure the route table to send default traffic to the internet gateway. Use security groups to restrict outbound traffic to the API endpoints. Enable VPC Flow Logs for logging.
C.Deploy a proxy server in the public subnet and configure the application servers to use the proxy. Restrict outbound traffic from the proxy using security groups. Log proxy access logs.
D.Deploy a NAT gateway in the public subnet and add a route in the private subnet's route table pointing to the NAT gateway. Use security groups on the application servers to restrict outbound traffic to the API endpoints. Enable logs on the NAT gateway using VPC Flow Logs or NAT gateway logs.
AnswerD

The NAT gateway provides outbound internet access with private IPs, and security groups control traffic. Logging can be enabled via VPC Flow Logs.

Why this answer

A NAT gateway in a public subnet allows instances in private subnets to access the internet while hiding their private IPs. By controlling the outbound rules in the security group or using a network firewall, you can restrict traffic to specific API endpoints. AWS CloudWatch Logs or VPC Flow Logs can capture the NAT gateway logs.

Option A is incorrect because a VPC endpoint is used for accessing AWS services privately and cannot be used for internet API access. Option B is incorrect because attaching an internet gateway directly to the private subnet would expose the instances' private IPs to the internet. Option C is incorrect because while a proxy server could work, it adds unnecessary complexity and management overhead compared to a NAT gateway.

271
Multi-Selecteasy

A company needs to audit network traffic in a VPC for compliance. Which THREE AWS services can be used to capture and analyze network traffic?

Select 3 answers
A.AWS Config
B.Traffic Mirroring
C.VPC Flow Logs
D.AWS Network Firewall
E.AWS CloudTrail
AnswersB, C, D

Traffic Mirroring captures and inspects traffic.

Why this answer

Traffic Mirroring captures and inspects traffic. Option C is correct because VPC Flow Logs capture IP traffic information. Option D is correct because AWS Network Firewall can log traffic.

Option A is wrong because AWS Config monitors resource configurations, not traffic. Option E is wrong because CloudTrail logs API calls, not network traffic.

272
Multi-Selecthard

A company is designing a network architecture for a highly sensitive application that must meet strict compliance requirements. The application is deployed in a VPC with multiple subnets. The company needs to ensure that all traffic between subnets is encrypted and that no traffic can bypass the encryption. Which TWO steps should be taken?

Select 2 answers
A.Use network ACLs to block all traffic except encrypted protocols (e.g., IPSec).
B.Set up VPN connections between each subnet's route tables.
C.Deploy a VPC CNI plugin that supports encryption for pods.
D.Use security groups to allow only encrypted traffic.
E.Enable VPC Flow Logs to detect unencrypted traffic.
AnswersA, C

NACLs can block unencrypted traffic by blocking non-IPSec ports.

Why this answer

Network ACLs can be configured to block all traffic except encrypted protocols like IPSec, thereby enforcing encryption at the subnet level. Option C is correct: A VPC CNI plugin that supports encryption can enforce encryption for pods in Kubernetes clusters, which is relevant for containerized workloads in the VPC. Option B is incorrect: VPN connections are established between VPCs or between a VPC and on-premises networks, not between subnets within the same VPC.

It is not possible to set up VPN connections between subnet route tables. Option D is wrong: Security groups only filter traffic based on IP addresses and ports; they cannot inspect or enforce encryption of the traffic content. Option E is wrong: VPC Flow Logs only log metadata about traffic and cannot enforce or detect whether the traffic payload is encrypted.

Therefore, the correct steps are A and C.

Exam trap

A common trap is to assume that VPN connections can be established between subnets within a VPC to encrypt traffic. However, intra-VPC traffic is already within the same network and cannot be routed through a VPN connection. VPNs are for connecting separate networks.

273
MCQhard

A company has a VPC with public and private subnets. An EC2 instance in a private subnet needs to download patches from an S3 bucket in the same AWS region. The company wants to ensure that traffic does not traverse the internet. Which solution is MOST cost-effective?

A.Attach an Internet Gateway to the VPC and route the private subnet traffic directly to S3.
B.Create a Gateway VPC Endpoint for S3 and add a route in the private subnet's route table to the endpoint.
C.Create an Interface VPC Endpoint for S3 in the private subnet.
D.Deploy a NAT Gateway in a public subnet and route the private subnet traffic through it to access S3.
AnswerB

Gateway VPC Endpoints are free and allow private access to S3 without internet.

Why this answer

The most cost-effective solution because a Gateway VPC Endpoint for S3 provides private connectivity to S3 without any hourly charges, and it does not require a NAT Gateway or Internet Gateway. Option A is incorrect because an Internet Gateway would route traffic through the internet, which violates the requirement and is not cost-effective. Option C is incorrect because an Interface VPC Endpoint for S3 incurs hourly charges, making it more expensive than a Gateway Endpoint.

Option D is incorrect because a NAT Gateway also incurs hourly and data processing charges, and it routes traffic through the internet, which is not desired.

274
MCQmedium

A company has a VPC with multiple subnets. They want to block all traffic from the internet to their private subnets, but allow outbound internet traffic from those subnets through a NAT Gateway. Which configuration should they use?

A.Route table with 0.0.0.0/0 -> NAT Gateway
B.Route table with 0.0.0.0/0 -> Virtual Private Gateway
C.Route table with 0.0.0.0/0 -> VPC Peering Connection
D.Route table with 0.0.0.0/0 -> Internet Gateway
AnswerA

This allows outbound traffic only, as NAT Gateway does not allow inbound connections from the internet.

Why this answer

A route table associated with the private subnets should have a default route (0.0.0.0/0) pointing to the NAT Gateway. This allows outbound internet traffic while blocking inbound internet traffic. Option B (Virtual Private Gateway) is for VPN connections.

Option C (VPC Peering) is for connectivity between VPCs. Option D (Internet Gateway) would allow inbound internet traffic, which is not desired.

275
Matchingmedium

Match each AWS networking feature to its purpose for high availability or fault tolerance.

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

Concepts
Matches

Static public IP that can be remapped to another instance

DNS-based routing to healthy endpoints

Distributes traffic evenly across all registered targets in all AZs

Improves availability and performance using Anycast IPs

Captures IP traffic information for troubleshooting

Why these pairings

Correct matches: Elastic Load Balancer distributes traffic, Route 53 provides DNS health checks, and Global Accelerator uses anycast routing. Common confusions: ELB does not handle DNS; Route 53 does not direct traffic over the global network; Global Accelerator does not log traffic.

276
Multi-Selectmedium

A security engineer is designing a network security solution for a multi-tier application. The web tier must be accessible from the internet on ports 80 and 443. The application tier must only accept traffic from the web tier. The database tier must only accept traffic from the application tier on port 3306. Which THREE network access control mechanisms should be used?

Select 3 answers
A.Security groups that allow traffic from specific security groups for the database tier.
B.AWS WAF to filter traffic to the database tier.
C.IAM policies to restrict access to the database.
D.Network ACLs to provide stateless filtering at the subnet level.
E.Security groups that reference other security groups as sources.
AnswersA, D, E

Database security groups should allow inbound traffic from the application security group.

Why this answer

Options A, D, and E are correct network access control mechanisms. Option A is correct because security groups can allow traffic based on source security group IDs, enabling tier-specific access. Option D is correct because network ACLs provide stateless filtering at the subnet level, adding a layer of defense.

Option E is correct because security groups can reference other security groups as sources, allowing the database tier to accept traffic only from the application tier security group. Option B is incorrect because AWS WAF is a web application firewall that filters HTTP/HTTPS traffic at the application layer, not suitable for database tier access control. Option C is incorrect because IAM policies manage user and resource permissions, not network-level traffic filtering.

277
Multi-Selecteasy

Which TWO AWS services can be used to centrally manage and enforce security policies across multiple accounts? (Choose two.)

Select 2 answers
A.AWS Config
B.Amazon VPC Flow Logs
C.AWS CloudTrail
D.AWS Identity and Access Management (IAM)
E.AWS Organizations
AnswersA, E

Can evaluate resource configurations against desired policies across accounts.

Why this answer

AWS Config allows you to define and enforce rules that evaluate resource configurations across accounts, and you can aggregate compliance data centrally using Config aggregators. AWS Organizations enables you to apply service control policies (SCPs) to centrally manage permissions across all accounts in the organization. Option B (VPC Flow Logs) captures IP traffic metadata but does not enforce security policies.

Option C (CloudTrail) records API activity for auditing, not policy enforcement. Option D (IAM) manages permissions but is per-account and not designed for centralized policy management across multiple accounts.

278
MCQhard

A security engineer is troubleshooting an issue where Amazon Inspector is not finding any vulnerabilities in an EC2 instance. The instance has the AWS Systems Manager Agent (SSM Agent) installed and is managed by AWS Systems Manager. What is the most likely reason for Inspector not reporting findings?

A.The EC2 instance does not have an IAM role that allows Inspector to scan it.
B.The EC2 instance is in a private subnet without a NAT gateway.
C.The EC2 instance's security group blocks outbound traffic to the Inspector service.
D.The EC2 instance is not managed by AWS Systems Manager.
AnswerA

Correct. The EC2 instance must have an IAM role (e.g., AmazonInspector-ENI-EC2-Role) that allows Inspector to access and scan it. Without this role, Inspector cannot report findings.

Why this answer

Amazon Inspector requires an IAM role that grants it permission to assess the EC2 instance. Without such a role, Inspector cannot perform vulnerability scans, even if the SSM Agent is installed and the instance is managed by Systems Manager. The other options are incorrect: the instance is managed by SSM (contradicting D), and missing NAT gateway or security group outbound rules do not prevent Inspector from scanning (Inspector initiates scans internally).

279
MCQhard

A company uses AWS Direct Connect to connect their on-premises network to AWS. They have a VPC with a virtual private gateway (VGW) and a private VIF attached to it. They recently added a second Direct Connect connection for redundancy. Both connections are active and advertised via BGP. The on-premises network uses BGP with the same AS number. After configuration, they notice that traffic is not load-balanced as expected; instead, all traffic flows through one connection. What is the most likely cause?

A.The on-premises router has a static route pointing to the primary connection, overriding BGP learned routes.
B.Both Direct Connect connections are in the same AWS region and use the same VGW, so traffic cannot be load-balanced.
C.The on-premises router is configured with a higher local preference for one of the BGP sessions, causing it to prefer that path.
D.The Direct Connect connections are using different VLANs, causing asymmetric routing.
AnswerC

BGP path selection can be influenced by local preference. If one session has a higher local preference, all traffic will use that path.

280
MCQhard

Refer to the exhibit. A company applies this bucket policy to an S3 bucket. Users in a different VPC with IP range 10.0.0.0/16 are able to access objects, but users in a different VPC with IP range 10.1.0.0/16 cannot. What is the most likely cause?

A.The bucket policy uses the wrong condition key
B.The users are accessing the bucket through a NAT Gateway, which changes the source IP
C.The bucket policy specifies the wrong resource ARN
D.The bucket policy does not specify a principal
AnswerB

NAT changes private IP to public IP, which does not match the condition.

Why this answer

The users in 10.1.0.0/16 are likely accessing the bucket through a NAT Gateway, which translates their private source IPs to the NAT's public IP. The bucket policy uses 'aws:SourceIp' with the condition '10.1.0.0/16', but after NAT, the source IP is no longer in that range, causing access to be denied. Option A is incorrect because the condition key 'aws:SourceIp' is appropriate; the problem is the IP after translation.

Option C is incorrect because the resource ARN is specified correctly. Option D is incorrect because bucket policies can be written without a principal to apply to all principals; it's valid.

281
MCQhard

A company uses AWS Organizations with SCPs to restrict access to services. The security team needs to ensure that no IAM role can be created without an approved custom trust policy. Which SCP should be attached to the root OU to enforce this requirement?

A.{"Version":"2012-10-17","Statement":[{"Effect":"Deny","Action":"iam:CreateRole","Resource":"*","Condition":{"StringNotEquals":{"aws:RequestTag/Approved":"true"}}}]}
B.{"Version":"2012-10-17","Statement":[{"Effect":"Deny","Action":"iam:CreateRole","Resource":"*"}]}
C.{"Version":"2012-10-17","Statement":[{"Effect":"Deny","Action":"iam:CreateRole","Resource":"arn:aws:iam::*:role/*","Condition":{"StringNotLike":{"iam:RoleName":"approved-*"}}}]}
D.{"Version":"2012-10-17","Statement":[{"Effect":"Deny","Action":"iam:PassRole","Resource":"*"}]}
AnswerA

This SCP denies CreateRole unless the request includes a tag 'Approved' with value 'true', enforcing the requirement.

Why this answer

It uses a Deny effect with a condition that only blocks IAM role creation when the request does not include a tag with key 'Approved' set to 'true'. This enforces that every new IAM role must have an approved custom trust policy by requiring the tag as a proxy for approval, while still allowing role creation when the tag is present. The SCP is attached to the root OU to apply globally across all accounts in the organization.

Exam trap

AWS often tests the distinction between using tags versus naming conventions or resource-based conditions to enforce governance, and candidates mistakenly choose naming-based conditions (Option C) thinking they can enforce policy approval, but tags are the only reliable way to pass metadata at creation time that can be evaluated by SCPs.

How to eliminate wrong answers

Option B is wrong because it denies all iam:CreateRole actions unconditionally, which would prevent any IAM role from being created at all, even those with an approved trust policy, thus violating the requirement to allow approved roles. Option C is wrong because it uses a condition on the role name pattern 'approved-*', which is a naming convention and does not enforce an approved custom trust policy; roles could be named 'approved-*' without having an approved trust policy, and roles with a different name but an approved policy would be blocked. Option D is wrong because it denies iam:PassRole, which controls the ability to pass an existing role to an AWS service, not the creation of a new role; this does not address the requirement to restrict role creation based on trust policy approval.

282
Drag & Dropmedium

Order the steps to troubleshoot an inter-Region VPC peering connection that is not working:

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

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

Why this order

First verify peering status, then check routes, then security groups/ACLs, then test, then use flow logs.

283
MCQeasy

A company has a VPC with public and private subnets. The security team wants to allow instances in a private subnet to download software updates from the internet but prevent inbound internet traffic. Which AWS service should be used?

A.Internet gateway
B.AWS Site-to-Site VPN
C.VPC peering connection
D.NAT gateway
AnswerD

NAT gateway enables outbound internet traffic from private subnets.

Why this answer

A NAT gateway allows outbound internet traffic from private subnets while blocking unsolicited inbound traffic. Option D is correct. Option A is wrong because an internet gateway enables bidirectional traffic, which would allow inbound traffic.

Option B is wrong because AWS Site-to-Site VPN is used for hybrid connectivity between on-premises and AWS, not for outbound internet access from private subnets. Option C is wrong because VPC peering connects VPCs together, not to the internet.

284
MCQmedium

A security engineer must ensure that all traffic between an application running on Amazon EC2 and an Amazon RDS database is encrypted in transit. The VPC has a public subnet for the EC2 instance and a private subnet for the RDS database. What is the MOST secure way to enforce encryption for this traffic?

A.Enable IAM database authentication for the RDS instance.
B.Use a security group rule that allows traffic only on port 443.
C.Configure the RDS DB instance to require SSL/TLS connections and configure the application to connect using SSL.
D.Place both the EC2 instance and the RDS database in the same subnet and use a network ACL to enforce encryption.
AnswerC

Enabling SSL/TLS on RDS ensures that all connections to the database are encrypted in transit.

Why this answer

Configuring the RDS DB instance to require SSL/TLS connections ensures that the application encrypts data in transit when connecting to the database. This is the most secure way to enforce encryption for traffic between EC2 and RDS. Option A is incorrect because IAM database authentication controls access, not encryption.

Option B is incorrect because a security group rule allowing only port 443 does not enforce encryption; it only restricts traffic to that port. Option D is incorrect because placing both resources in the same subnet does not enforce encryption, and a network ACL is stateless and cannot enforce encryption.

285
MCQeasy

A security team requires that all traffic between Amazon EC2 instances in different subnets of a VPC be logged. Which AWS service should be used to capture and log the traffic?

A.VPC Flow Logs
B.AWS CloudTrail
C.VPC Traffic Mirroring
D.AWS Config
AnswerA

VPC Flow Logs capture network traffic metadata and can be logged to CloudWatch Logs or S3.

Why this answer

VPC Flow Logs capture IP traffic information for network interfaces and can be published to Amazon CloudWatch Logs or Amazon S3. This allows logging of all traffic between EC2 instances in different subnets. Option B is incorrect because AWS CloudTrail logs API calls and actions taken on AWS resources, not network traffic.

Option C is incorrect because VPC Traffic Mirroring copies traffic for deep packet inspection and analysis, but it is not a logging service; it is used for traffic monitoring and security analysis. Option D is incorrect because AWS Config tracks resource configuration changes and evaluates compliance, not network traffic.

286
MCQmedium

A company runs a web application on EC2 instances behind an Application Load Balancer (ALB). The application must be accessible only from a specific AWS Client VPN endpoint. The security team has configured the ALB security group to allow inbound traffic from the Client VPN CIDR range, but users report that they can still access the application from outside the VPN. What is the MOST likely cause of this issue?

A.The ALB security group is not set as the source for inbound traffic; instead, traffic reaches the ALB directly from the internet.
B.The network ACL is stateless and requires separate inbound and outbound rules for return traffic.
C.The subnet's network ACL allows inbound HTTP/HTTPS traffic from 0.0.0.0/0.
D.The EC2 instances' security group allows inbound traffic from 0.0.0.0/0.
AnswerA

If the ALB security group does not restrict inbound traffic, traffic can bypass the Client VPN.

Why this answer

The ALB security group is configured to allow inbound traffic from the Client VPN CIDR range, but if the ALB itself is internet-facing (i.e., it has public IP addresses and is deployed in public subnets), traffic can bypass the security group rules if the security group is not actually applied to the ALB's network interfaces. The most likely cause is that the ALB security group is not set as the source for inbound traffic; instead, traffic reaches the ALB directly from the internet, meaning the security group rules are not being enforced on the ALB's listener. This allows users outside the VPN to access the application because the ALB accepts traffic from any source unless the security group explicitly restricts it.

Exam trap

The trap here is that candidates assume the ALB security group is automatically enforced, but AWS tests the nuance that an internet-facing ALB can still receive traffic from the internet if the security group is not properly applied or if the ALB is not configured to restrict traffic to the VPN CIDR.

How to eliminate wrong answers

Option B is wrong because network ACLs are stateless and require separate inbound and outbound rules, but this does not explain why users outside the VPN can access the application; network ACLs operate at the subnet level and would affect all traffic, not just VPN traffic. Option C is wrong because even if the subnet's network ACL allows inbound HTTP/HTTPS traffic from 0.0.0.0/0, the ALB security group should still block non-VPN traffic; the security group is the primary control for the ALB, and a permissive NACL does not override a restrictive security group. Option D is wrong because the EC2 instances' security group allowing inbound traffic from 0.0.0.0/0 is irrelevant if the ALB is the entry point; the ALB terminates the client connection and forwards traffic to the instances, so the instances' security group only needs to allow traffic from the ALB's security group, not from the internet.

287
MCQhard

A company is designing a multi-account architecture. They need to centralize VPC flow logs from all accounts into a single Amazon S3 bucket in the security account. The logs must be encrypted at rest using a customer-managed KMS key in the security account. Which combination of steps is required?

A.Configure the S3 bucket policy to allow the log accounts to write; encryption is automatic with SSE-S3.
B.Create a KMS key in each account and configure the S3 bucket to use each key.
C.Configure the KMS key policy to allow the log-producing accounts to use the key, and the S3 bucket policy to allow those accounts to write.
D.Create a KMS key in the security account with no key policy changes; use bucket policies to allow cross-account writes.
AnswerC

Cross-account KMS requires key policy; bucket policy allows writes.

Why this answer

To centralize VPC flow logs with customer-managed KMS encryption, you need both a KMS key policy that grants the log-producing accounts permission to use the key (kms:Encrypt, kms:GenerateDataKey) and an S3 bucket policy that allows those accounts to write objects. Option A is wrong because SSE-S3 cannot be used with cross-account access in this context. Option B is wrong because using separate keys per account defeats centralization.

Option D is wrong because without modifying the KMS key policy, cross-account encryption will fail.

288
MCQeasy

A security engineer needs to ensure that all internet-bound traffic from a VPC is inspected by a third-party firewall appliance before reaching the internet. The firewall is deployed in a separate VPC. Which AWS service should the engineer use to route traffic from the source VPC to the firewall VPC?

A.AWS Transit Gateway with a route table that points the default route (0.0.0.0/0) to the firewall VPC attachment.
B.VPC Gateway Endpoint for the firewall service.
C.AWS PrivateLink to connect to the firewall service in the other VPC.
D.VPC Peering connection between the two VPCs with a route table entry that sends internet traffic to the peering connection.
AnswerA

AWS Transit Gateway supports transitive routing between VPCs. By configuring a route table with a default route pointing to the firewall VPC attachment, all internet-bound traffic from the source VPC is routed through the firewall VPC for inspection.

Why this answer

AWS Transit Gateway enables transitive routing between VPCs. By creating a route table in the Transit Gateway with a default route (0.0.0.0/0) pointing to the firewall VPC attachment, all internet-bound traffic from the source VPC is forwarded to the firewall for inspection before reaching the internet. Option B (VPC Gateway Endpoint) is incorrect because Gateway Endpoints are used for privately accessing AWS services (like S3 or DynamoDB) from a VPC, not for routing traffic to a third-party firewall.

Option C (AWS PrivateLink) is incorrect because PrivateLink allows you to access services hosted in other VPCs via Network Load Balancers and ENIs, but it does not provide transitive routing for internet-bound traffic. Option D (VPC Peering) is incorrect because VPC peering connections do not support transitive routing; you cannot route traffic from one VPC through a peered VPC to another destination.

289
MCQmedium

A security engineer is designing a hybrid network with an AWS Site-to-Site VPN. The company requires that all traffic between the on-premises network and VPC be encrypted in transit. Which configuration ensures this requirement is met?

A.Use VPC peering instead of VPN
B.Use AWS Direct Connect with MACsec
C.Deploy a Transit Gateway with route tables
D.Use AWS Site-to-Site VPN with IPsec tunnels
AnswerD

Site-to-Site VPN encrypts all traffic via IPsec.

Why this answer

AWS Site-to-Site VPN inherently uses IPsec tunnels to encrypt all traffic. Option A is wrong because VPC peering does not provide encryption; it uses the AWS network without encryption. Option B is wrong because Direct Connect does not encrypt by default; MACsec is an optional encryption layer but not the standard Site-to-Site VPN.

Option C is wrong because Transit Gateway itself is a network transit hub and does not provide encryption; it can route encrypted VPN traffic but does not encrypt.

290
Multi-Selecthard

A company is using AWS Direct Connect to connect their on-premises network to AWS. They need to ensure that traffic from a specific on-premises subnet can only access a specific VPC subnet. Which two components must be configured? (Choose two.)

Select 2 answers
A.VPN connection
B.Route tables with specific routes
C.Public virtual interface (VIF)
D.Private virtual interface (VIF)
E.Transit virtual interface (VIF)
AnswersB, D

Route tables ensure traffic from on-premises is directed to the correct VPC subnet.

Why this answer

To restrict traffic from a specific on-premises subnet to a specific VPC subnet using AWS Direct Connect, you need two components. First, a private virtual interface (VIF) is required because it provides connectivity to VPCs (as opposed to public or transit VIFs). Second, route tables with specific routes must be configured on both the on-premises router and the VPC route tables to ensure that traffic is directed to the correct destination subnet.

Option B (Route tables with specific routes) and Option D (Private virtual interface) are correct. Option A (VPN connection) is not needed because Direct Connect itself provides the private connectivity. Option C (Public virtual interface) is incorrect as it is used for accessing public AWS endpoints, not VPC subnets.

Option E (Transit virtual interface) is used for connecting to multiple VPCs via a transit gateway, not for a single VPC subnet.

291
MCQmedium

A company is deploying a web application behind an Application Load Balancer (ALB). The application must only accept traffic from the ALB. Which security group configuration should be used for the EC2 instances?

A.Allow inbound from 0.0.0.0/0 on port 80
B.Allow inbound from the ALB security group on port 80
C.Allow inbound from the ALB's private IP addresses on port 80
D.Allow inbound from the VPC CIDR on port 80
AnswerB

Correct. Allowing inbound from the ALB security group on port 80 ensures that only traffic originating from the ALB is accepted, as the ALB's security group is automatically associated with all ALB nodes.

Why this answer

To ensure the EC2 instances only accept traffic from the ALB, the security group should reference the ALB's security group as the source. This is a best practice because the ALB acts as a proxy, and using its security group dynamically allows traffic from any ALB instance, even if the ALB's IP addresses change. Option A is insecure as it allows traffic from any source (0.0.0.0/0).

Option C is not recommended because the ALB's private IP addresses can change (e.g., during scaling or replacement), making static IP rules difficult to maintain. Option D is too broad, as it would allow traffic from any resource within the VPC CIDR, not just the ALB.

292
MCQhard

A security team is designing a network architecture that must meet PCI DSS compliance. They have a VPC with multiple subnets and need to ensure that all traffic between subnets is inspected by a stateful firewall. The solution must also support scalability and high availability. Which AWS service should they use?

A.AWS Network Firewall
B.Security groups on each subnet
C.AWS WAF
D.Network ACLs on each subnet
AnswerA

AWS Network Firewall provides stateful inspection, scales automatically, and supports high availability, making it suitable for PCI DSS compliance.

Why this answer

AWS Network Firewall provides stateful inspection, scales automatically, and supports high availability, making it suitable for PCI DSS compliance. Option B (security groups) is wrong because security groups are stateful but operate at the instance level and do not provide centralized traffic inspection between subnets. Option C (AWS WAF) is wrong because it focuses on web application layer (HTTP/S) traffic, not network-layer inspection.

Option D (Network ACLs) is wrong because they are stateless and only provide basic allow/deny rules without stateful inspection.

293
MCQeasy

A company is using AWS Transit Gateway to connect multiple VPCs and on-premises networks. The security team wants to centrally inspect and filter traffic between VPCs using a third-party firewall appliance. Which architecture should be used?

A.AWS PrivateLink endpoints in each VPC
B.AWS Network Firewall deployed in each VPC
C.VPC peering between each VPC and the inspection VPC
D.Transit Gateway with appliance mode and a dedicated inspection VPC
AnswerD

Transit Gateway appliance mode enables symmetric routing for inspection.

Why this answer

Transit Gateway with appliance mode and a dedicated inspection VPC is the correct architecture because it enables symmetric routing, forcing traffic through the inspection VPC for centralized inspection. Option A (AWS PrivateLink) is incorrect; PrivateLink provides private connectivity to services, not traffic inspection between VPCs. Option B (AWS Network Firewall in each VPC) is incorrect because deploying a firewall in each VPC is distributed, not centralized, and does not leverage Transit Gateway.

Option C (VPC peering) is incorrect because VPC peering does not support transitive routing; peering each VPC to an inspection VPC would be complex and does not take advantage of Transit Gateway's centralized routing capabilities.

294
MCQmedium

A security engineer runs tcpdump on an EC2 instance (10.0.1.5) and sees the output above. The instance is in a private subnet with a security group that allows inbound HTTPS from 0.0.0.0/0. The instance is behind a Network Load Balancer (NLB) that has a public IP. The engineer is unable to establish an HTTPS connection from the internet. What is the most likely cause?

A.The NLB is not preserving the source IP, so the security group is blocking the traffic.
B.The NLB's target group health checks are failing, causing the NLB to consider the instance unhealthy.
C.The instance's operating system firewall is blocking the connection.
D.The security group is blocking inbound traffic from the NLB.
AnswerB

The tcpdump shows the handshake from the NLB, but if health checks fail, the NLB stops sending traffic.

Why this answer

The tcpdump output shows the NLB's health check traffic (SYN packets from the NLB's private IPs) reaching the instance, but the engineer cannot establish an HTTPS connection from the internet. If the target group health checks are failing, the NLB marks the instance as unhealthy and stops forwarding traffic to it, which would prevent any internet HTTPS connections from reaching the instance. This is the most likely cause because the security group allows inbound HTTPS from 0.0.0.0/0, and the NLB does not preserve source IP by default, so the security group is not blocking traffic from the internet.

Exam trap

AWS often tests the misconception that security group rules are the primary cause of connectivity issues with NLBs, but the real trap is that candidates overlook how NLB health checks directly control traffic forwarding, and a failing health check silently drops all traffic even when security groups and routes are correctly configured.

How to eliminate wrong answers

Option A is wrong because the NLB does not preserve source IP by default (it uses its own private IPs as the source), so the security group allowing inbound HTTPS from 0.0.0.0/0 would still permit traffic from the NLB's private IPs; the issue is not about source IP preservation blocking traffic. Option C is wrong because the tcpdump output shows the instance is receiving SYN packets (health checks), indicating the OS network stack is responding; if an OS firewall were blocking, the instance would not receive or respond to any packets, but the tcpdump shows incoming SYN packets. Option D is wrong because the security group explicitly allows inbound HTTPS from 0.0.0.0/0, which includes the NLB's private IPs; the security group is not blocking traffic from the NLB.

295
MCQmedium

A company wants to audit all Network Load Balancer (NLB) operations performed in their AWS account. Which AWS service should they use?

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

CloudTrail records API calls for auditing.

Why this answer

AWS CloudTrail records API calls for all AWS services, including Network Load Balancer (NLB) operations. Therefore, to audit NLB operations, CloudTrail should be used. Option B (Amazon CloudWatch Logs) stores logs but does not natively capture API calls.

Option C (AWS Config) tracks resource configurations and changes, not API operations. Option D (VPC Flow Logs) captures network traffic information, not API calls. Hence, Option A is correct.

296
MCQhard

A company has a VPC with a VPN connection to an on-premises data center. They want to ensure that traffic between the VPC and on-premises is encrypted and authenticated. Which two components are required to establish the VPN tunnel?

A.AWS Direct Connect and Direct Connect Gateway
B.Virtual Private Gateway and Customer Gateway
C.Internet Gateway and NAT Gateway
D.Transit Gateway and VPN Attachment
AnswerB

VPG and CGW are the required endpoints for a VPN connection.

Why this answer

A Virtual Private Gateway (VPG) is the AWS-side endpoint, and a Customer Gateway (CGW) represents the on-premises router. Option A (Internet Gateway) is for internet traffic. Option C (Direct Connect) is a different service.

Option D (Transit Gateway) is optional.

297
MCQeasy

A company is using AWS Shield Advanced to protect against DDoS attacks. The security team wants to receive notifications when an attack is detected. Which service should be used to send these notifications?

A.AWS Lambda
B.AWS Config
C.Amazon SQS
D.Amazon SNS
AnswerD

SNS can send notifications via email, SMS, etc., triggered by CloudWatch Events.

Why this answer

AWS Shield Advanced integrates with Amazon CloudWatch to publish metrics and events. These events can be routed via Amazon EventBridge to trigger an Amazon SNS topic, which then sends notifications (e.g., email, SMS) to the security team. Option A (AWS Lambda) is a compute service, not a notification service.

Option B (AWS Config) is used for configuration auditing and compliance, not notifications. Option C (Amazon SQS) is a message queue service; although it can receive events, it is not the service used to send direct notifications to subscribers. Only Amazon SNS (Option D) provides push-based notifications to endpoints like email, SMS, and mobile devices.

298
MCQhard

A company has a VPC with a public subnet and a private subnet. An EC2 instance in the private subnet needs to connect to the internet for patching. The security team wants to minimize the attack surface. Which solution should be used?

A.Set up a proxy server in the public subnet
B.Attach an Internet Gateway to the private subnet
C.Create a NAT Gateway in the public subnet and update route tables
D.Use a VPN connection to the on-premises network
AnswerC

A NAT Gateway in the public subnet allows the EC2 instance in the private subnet to initiate outbound connections to the internet for patching while preventing unsolicited inbound traffic, thus minimizing the attack surface.

Why this answer

A NAT Gateway in the public subnet allows the EC2 instance in the private subnet to initiate outbound connections to the internet for patching while preventing unsolicited inbound traffic, thus minimizing the attack surface. Option A is incorrect because a proxy server adds unnecessary complexity and overhead compared to a managed NAT Gateway, and it still requires careful configuration to minimize attack surface. Option B is incorrect because an Internet Gateway cannot be attached directly to a private subnet; it is attached to the VPC and requires a public subnet for route propagation.

Option D is incorrect because a VPN connection is designed for hybrid connectivity to on-premises networks, not for general internet access from a VPC.

299
MCQhard

A company has a VPC with public and private subnets. They launch an Application Load Balancer (ALB) in the public subnets and targets in private subnets. Security requirements dictate that the targets should only accept traffic from the ALB. Which security group configuration meets this requirement?

A.Set the target security group inbound rule to allow HTTP from 0.0.0.0/0.
B.Set the target security group inbound rule to allow HTTP from the ALB security group ID.
C.Set the target security group inbound rule to allow HTTP from the ALB's public IP address.
D.Set the target security group inbound rule to allow HTTP from the VPC CIDR.
AnswerB

This allows traffic only from the ALB's elastic network interfaces.

Why this answer

Referencing the ALB security group by ID in the target security group inbound rule allows traffic only from that specific security group, ensuring that only the ALB can reach the targets. This is a best practice for securing traffic between an ALB and its targets. Option A is incorrect because allowing HTTP from 0.0.0.0/0 would permit traffic from any source, not just the ALB.

Option C is incorrect because the ALB's traffic originates from its elastic network interfaces (ENIs), which are associated with the ALB security group, not a fixed public IP. Option D is incorrect because allowing traffic from the entire VPC CIDR would permit any resource in the VPC to reach the targets, not just the ALB.

300
MCQmedium

A network engineer is troubleshooting connectivity issues between an on-premises network and an Amazon VPC over an AWS Direct Connect connection. The on-premises network uses BGP to advertise routes to the VPC. The VPC is associated with a virtual private gateway (VGW). The on-premises network can reach resources in the VPC, but VPC resources cannot reach on-premises resources. What is the most likely cause?

A.The virtual private gateway is not attached to the VPC.
B.The BGP session is not established.
C.The security group associated with the VPC resources is blocking inbound traffic from on-premises.
D.The VPC route tables do not have a route for the on-premises CIDR pointing to the virtual private gateway.
AnswerD

Without a route, VPC traffic destined for on-premises will not be routed to the Direct Connect.

Why this answer

For traffic from the VPC to reach on-premises resources, the VPC route tables must contain a route for the on-premises CIDR block that points to the virtual private gateway (VGW). Since on-premises can reach the VPC, the BGP session is established (so B is incorrect) and the VGW is attached (so A is incorrect). Security groups are stateful and allow return traffic; they do not block outbound-initiated traffic (so C is incorrect).

← PreviousPage 4 of 6 · 397 questions totalNext →

Ready to test yourself?

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