Courseiva

CCNA Network Security, Compliance and Governance Questions

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

1
MCQhard

A company uses AWS WAF to protect a web application. They notice that some malicious requests are being allowed. After investigating, they find that the requests have valid AWS WAF tokens but the payloads are obfuscated. Which WAF configuration should be reviewed to improve detection?

A.Bot Control managed rule group
B.Rate-based rule
C.SQL injection match condition
D.IP set match rule
AnswerA

Bot Control managed rule group can detect and block bots using obfuscated payloads by analyzing behavior and signatures.

Why this answer

AWS WAF Bot Control managed rule group is designed to detect and block requests from bots, including those that use obfuscated payloads. Since the malicious requests have valid tokens but obfuscated payloads, Bot Control can analyze behavior patterns and signature heuristics to identify such traffic. Rate-based rules (option B) are used to limit request rates, not to detect obfuscated payloads.

SQL injection match conditions (option C) detect SQL injection patterns, not general obfuscation. IP set match rules (option D) block or allow based on IP addresses, which is ineffective against obfuscated payloads.

2
MCQmedium

A company has a security group that allows inbound SSH (port 22) from 0.0.0.0/0. A security engineer discovers that an EC2 instance was compromised via SSH. The engineer needs to identify which IAM user created the overly permissive security group rule. Which AWS service or feature should the engineer use?

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

CloudTrail records API calls and the IAM user who made them.

Why this answer

AWS CloudTrail is the correct service because it records API calls made within the AWS environment, including the AuthorizeSecurityGroupIngress API call that created the overly permissive security group rule. By searching CloudTrail logs for this specific API event, the engineer can identify the IAM user, source IP, and timestamp of the rule creation. VPC Flow Logs, AWS Config, and GuardDuty do not capture IAM user identity for API-level changes.

Exam trap

AWS often tests the distinction between services that log API calls (CloudTrail) versus those that monitor network traffic (VPC Flow Logs) or detect threats (GuardDuty), and the trap here is assuming that VPC Flow Logs or AWS Config can identify the IAM user responsible for a security group rule change.

How to eliminate wrong answers

Option A is wrong because VPC Flow Logs capture network traffic metadata (IP addresses, ports, protocols) but do not record API calls or IAM user identity, so they cannot identify who created the security group rule. Option B is wrong because AWS Config evaluates resource compliance and tracks configuration changes, but it does not directly attribute the change to a specific IAM user; it records the resource state, not the API caller identity. Option C is wrong because Amazon GuardDuty is a threat detection service that analyzes network and account activity for malicious behavior, but it does not log API calls or provide the IAM user who made a specific security group modification.

3
MCQmedium

A company is designing a multi-VPC architecture with VPC peering. They need to ensure that traffic between VPCs is encrypted. What should they do?

A.Use a third-party VPN appliance in each VPC to create an IPsec tunnel between them
B.Establish a VPN connection between the VPCs using virtual private gateways
C.Enable encryption on the VPC peering connection
D.Use AWS Direct Connect to connect the VPCs
AnswerA

Provides encryption over VPC peering.

Why this answer

VPC peering does not encrypt traffic natively. To ensure encryption between VPCs, you need to establish an IPsec tunnel, which can be achieved by deploying a third-party VPN appliance in each VPC. Option B is incorrect because a VPN connection using virtual private gateways is typically used to connect a VPC to an on-premises network, not directly between VPCs.

Option C is incorrect because VPC peering does not support enabling encryption on the peering connection itself; encryption must be added via an overlay. Option D is incorrect because AWS Direct Connect is used for dedicated connections to on-premises data centers, not for inter-VPC traffic.

4
MCQeasy

A company needs to encrypt data at rest in Amazon S3. Which AWS service manages the encryption keys?

A.AWS Secrets Manager
B.AWS Certificate Manager
C.AWS CloudHSM
D.AWS KMS
AnswerD

KMS provides key management for S3 encryption.

Why this answer

AWS KMS (Key Management Service) is the AWS service that manages encryption keys for Amazon S3. AWS KMS allows you to create, rotate, and control access to encryption keys used to encrypt data at rest in S3. Option A (AWS Secrets Manager) is incorrect because it manages secrets like database credentials, not encryption keys for S3.

Option B (AWS Certificate Manager) is incorrect because it manages SSL/TLS certificates, not encryption keys. Option C (AWS CloudHSM) is incorrect because while it provides hardware security modules for key storage, it is not the default or primary key manager for S3; AWS KMS is the integrated service for S3 encryption.

5
MCQhard

Refer to the exhibit. A company has an S3 bucket policy that allows public read access only from a specific IP range (203.0.113.0/24). Users outside this range report that they can still access objects in the bucket. What is the most likely reason?

A.The bucket policy uses the wrong condition key; it should be aws:SourceIpAddress
B.The bucket policy is not being evaluated because the bucket is in a different region
C.The bucket is configured with server-side encryption, which prevents the policy from being applied
D.The bucket also has a bucket ACL that grants public read access, overriding the policy condition
AnswerD

ACLs can grant public access that bypasses the IP restriction in the bucket policy.

Why this answer

The most likely reason is that the bucket also has a bucket ACL that grants public read access. When both a bucket policy and an ACL are present, the effective permissions are the union of allowed actions. If the ACL allows everyone to read objects, then the IP restriction in the bucket policy is not effective because the ACL already permits the access.

Option D correctly identifies this scenario. Option A is incorrect because the condition key for source IP is aws:SourceIp, not aws:SourceIpAddress, but that is a minor typo; however, the policy would still be evaluated. Option B is incorrect because bucket policies are evaluated regardless of region.

Option C is incorrect because server-side encryption does not affect policy evaluation.

6
MCQeasy

A company wants to audit all network traffic to and from an EC2 instance for compliance. The security team needs to capture full packet contents, including headers and payload, and store them in Amazon S3 for analysis. Which AWS service should they use?

A.Amazon CloudWatch Logs with the EC2 agent
B.Traffic Mirroring
C.AWS Config
D.VPC Flow Logs
AnswerB

Captures full packet contents.

Why this answer

(Traffic Mirroring) is correct because it captures full packets, including headers and payload, and can be used to send the captured traffic to an S3 bucket via a Network Load Balancer or a monitoring appliance. Option A is incorrect because Amazon CloudWatch Logs with the EC2 agent can only capture log files, not network packets. Option C is incorrect because AWS Config records configuration changes, not traffic.

Option D is incorrect because VPC Flow Logs capture metadata (IP addresses, ports, protocols) but not the full packet contents.

7
MCQmedium

A company has a VPC with multiple subnets. They have an AWS Network Firewall deployed in a firewall subnet. They want to inspect all outbound traffic from the VPC to the internet. Currently, the VPC route table has a default route (0.0.0.0/0) pointing to an internet gateway. What routing change is required to route outbound traffic through the firewall?

A.Create a VPC Gateway Endpoint for the firewall service.
B.Add a NAT gateway in a public subnet and route 0.0.0.0/0 to the NAT gateway, then point the NAT gateway to the firewall.
C.Add a route in the subnet route tables that sends 0.0.0.0/0 traffic to the Network Firewall endpoint's elastic network interface.
D.Add a transit gateway and attach the VPC and the internet gateway to it, then route traffic through the firewall.
AnswerC

Adding a route for 0.0.0.0/0 to the Network Firewall endpoint's ENI forces all outbound traffic through the firewall for inspection.

Why this answer

To route traffic through AWS Network Firewall, you must add a route in the subnet route tables that sends 0.0.0.0/0 traffic to the firewall endpoint's elastic network interface (ENI). This forces outbound traffic to be inspected by the firewall before reaching the internet gateway. Option A is incorrect because a VPC Gateway Endpoint is used for private access to AWS services, not for routing traffic through a firewall.

Option B is incorrect because a NAT gateway provides outbound connectivity but does not inspect traffic; adding another hop to the firewall would be redundant and not supported. Option D is incorrect because a transit gateway is used to connect multiple VPCs or on-premises networks, not to route traffic through a single firewall.

Exam trap

A common pitfall is assuming you need a NAT gateway or a transit gateway to integrate with Network Firewall. The correct approach is a simple route table update pointing to the firewall endpoint's ENI.

8
MCQeasy

A company wants to block incoming traffic from specific IP addresses at the edge of the AWS network before it reaches the application load balancer. Which AWS service should be used?

A.AWS WAF web ACL associated with the ALB
B.Network ACLs on the VPC subnet containing the ALB
C.Security Groups attached to the ALB
D.Amazon CloudFront with origin access identity
AnswerA

AWS WAF can block IP addresses using IP set match conditions at the ALB level.

Why this answer

AWS WAF can be associated with an Application Load Balancer to filter incoming traffic based on IP addresses at the edge (before reaching the ALB). Option B is wrong because Network ACLs operate at the subnet level and do not inspect HTTP traffic or block at the edge. Option C is wrong because Security Groups are stateful firewalls that operate at the instance or ENI level, not at the edge, and they cannot block traffic before the ALB.

Option D is wrong because CloudFront is a CDN that can be used with WAF, but the question specifically asks for blocking at the edge before the ALB, and CloudFront alone does not provide IP filtering for an ALB without WAF.

9
MCQmedium

A network engineer is troubleshooting connectivity from an EC2 instance in subnet-12345678 to a server on the internet. The instance has a public IP and a security group allowing all outbound traffic. However, traffic fails. Based on the exhibit, what is the issue?

A.The inbound rule only allows TCP traffic, which blocks return traffic for other protocols.
B.The inbound rule blocks TCP traffic on ephemeral ports.
C.The outbound rule blocks all traffic.
D.The security group does not allow outbound traffic.
AnswerA

The NACL inbound rule allows only TCP (protocol 6), so return traffic for UDP or ICMP is blocked.

Why this answer

The inbound rule (egress=false) only allows TCP (protocol 6) on port unspecified (all ports), but the outbound rule allows all traffic. However, the inbound rule only allows TCP, so return traffic for non-TCP protocols (like ICMP) is blocked. But the question says connectivity fails, likely because the instance initiates outbound traffic (e.g., HTTP), which is TCP, so that should work.

Actually, the issue is that the outbound rule allows all traffic, but the inbound rule only allows TCP, so return traffic for non-TCP (like UDP or ICMP) is blocked. But typical HTTP uses TCP, so maybe the issue is something else. Let's re-evaluate: The outbound rule allows all traffic (protocol -1), but the inbound rule only allows TCP.

For outbound connections, the return traffic is inbound, so if the outbound connection is TCP, the return TCP packets are allowed by the inbound rule. However, if the outbound traffic is something else like ICMP (ping), the return ICMP is blocked. The question does not specify the protocol.

Option A is correct because the inbound rule only allows TCP, blocking other protocols. Option B is wrong because the outbound rule allows all traffic. Option C is wrong because the security group allows outbound.

Option D is wrong because the inbound rule does not restrict TCP on ephemeral ports; it allows TCP from 0.0.0.0/0.

10
MCQmedium

A company wants to allow an external auditor to access a specific EC2 instance in their VPC for a limited time. The auditor will connect via SSH from a known IP address. What is the MOST secure way to grant access?

A.Assign a public IP to the instance and create a security group rule allowing SSH from the auditor's IP.
B.Configure a security group for the instance that allows SSH from the VPC CIDR.
C.Create a bastion host in a public subnet with a security group allowing SSH from the auditor's IP, and allow SSH from the bastion to the instance.
D.Set up a client VPN endpoint and allow the auditor to connect to the VPC, then SSH to the instance.
AnswerC

Creating a bastion host in a public subnet with a security group allowing SSH from the auditor's IP, and allowing SSH from the bastion to the instance, is the most secure option. It provides a controlled, auditable entry point and minimizes the attack surface of the target instance.

Why this answer

The most secure approach is to use a bastion host (jump box) in a public subnet. The bastion host's security group restricts SSH access to only the auditor's known IP address. The target EC2 instance's security group allows SSH only from the bastion host's private IP, minimizing direct exposure.

Option A (assigning a public IP to the instance) exposes the instance directly to the internet, even with a restricted security group, increasing attack surface. Option B (allowing SSH from the entire VPC CIDR) is insecure because any compromised resource within the VPC could access the instance. Option D (client VPN) is secure but adds complexity and cost for a temporary single-instance access; the bastion host is simpler and more direct.

11
MCQhard

A company has a VPC with public and private subnets. The private subnets need to access the internet through a NAT Gateway. The security team wants to ensure that traffic from the private subnets to the internet is logged and inspected for malicious activity. Which solution meets these requirements?

A.Use AWS Shield Advanced to inspect traffic and detect malicious activity.
B.Deploy AWS WAF on the NAT Gateway to inspect and filter outgoing traffic.
C.Enable VPC Flow Logs on the NAT Gateway and analyze the logs with Amazon Detective.
D.Configure VPC Traffic Mirroring from the private subnet instances to a network security appliance (e.g., partner firewall) for deep packet inspection.
AnswerD

Traffic Mirroring captures packets for inspection.

Why this answer

VPC Traffic Mirroring allows you to capture and mirror all traffic from the elastic network interfaces (ENIs) of instances in private subnets to a network security appliance (e.g., partner firewall) for deep packet inspection and logging. This meets the requirement for inspecting traffic for malicious activity. Option A is incorrect because AWS Shield Advanced provides DDoS protection but does not provide deep packet inspection or logging of all traffic.

Option B is incorrect because AWS WAF is a web application firewall that inspects HTTP/HTTPS traffic at the application layer, not network-level traffic from private subnets. Option C is incorrect because VPC Flow Logs only capture metadata (IP addresses, ports, protocols) and do not inspect packet payloads for malicious activity.

12
MCQeasy

A company wants to audit all changes to security groups in their AWS account. Which AWS service should they use to track API calls that modify security groups?

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

AWS CloudTrail records all API calls made to the Amazon EC2 and VPC endpoints, including `AuthorizeSecurityGroupIngress`, `RevokeSecurityGroupEgress`, and `CreateSecurityGroup`. By enabling CloudTrail’s management event logging, the company captures every modification to security groups, satisfying the audit requirement for tracking changes. This differs from AWS Config, which evaluates resource configuration compliance but does not log the API call history.

Why this answer

AWS CloudTrail records API calls made in the account, including those that modify security groups. A (AWS Config) tracks resource configuration changes but not API calls. C (CloudWatch Logs) can store logs but does not capture API calls natively.

D (VPC Flow Logs) captures network traffic metadata, not API calls.

13
Multi-Selectmedium

Which THREE of the following are valid ways to restrict access to an S3 bucket that is accessed by EC2 instances in a VPC?

Select 3 answers
A.Use an S3 bucket policy that restricts access to the VPC or VPC endpoint.
B.Use a network ACL to restrict access to the S3 prefix list.
C.Use a VPC endpoint policy to allow access only to the specific S3 bucket.
D.Use an IAM role (instance profile) attached to the EC2 instance with permissions for the S3 bucket.
E.Use a security group to allow outbound traffic from the EC2 instance to the S3 bucket.
AnswersA, C, D

S3 bucket policies can use aws:SourceVpc or aws:SourceVpce conditions.

Why this answer

Options A, C, and D are correct. Option A: S3 bucket policies can restrict access based on source VPC or VPC endpoint. Option C: VPC endpoint policies can specify which S3 buckets can be accessed through the endpoint.

Option D: IAM roles (instance profiles) grant permissions to EC2 instances to access S3 buckets. Option B is incorrect because network ACLs operate at the subnet level and do not filter by S3 bucket; they only filter based on IP addresses. Option E is incorrect because security groups do not apply to S3 bucket access; they control traffic to/from EC2 instances.

14
MCQeasy

A CloudFormation stack was created with the above snippet. An administrator notices that the EC2 instance can receive HTTP traffic from the internet, but cannot access the internet itself (e.g., to download updates). What is the most likely cause?

A.The security group egress rule restricts outbound traffic to only HTTP.
B.The instance is in a private subnet without a NAT gateway or route to an internet gateway.
C.The security group is not attached to the instance properly.
D.The security group ingress rule only allows HTTP from the internet, but not other protocols needed for updates.
AnswerB

Even with permissive security group rules, if the subnet has no route to the internet, outbound traffic fails.

Why this answer

The instance can receive inbound HTTP traffic because the security group ingress rule allows HTTP. However, it cannot initiate outbound traffic to the internet. The security group egress rule allows all traffic, so outbound is not restricted.

The most likely cause is that the instance is in a private subnet without a NAT gateway or route to an internet gateway. Private subnets cannot directly access the internet without a NAT device. Therefore, Option B is correct.

Option A is incorrect because the egress rule is permissive. Option C is incorrect because the security group is properly attached (inbound works). Option D is incorrect because the ingress rule is not the issue.

15
MCQhard

A company uses AWS Shield Advanced to protect their web application against DDoS attacks. They have a CloudFront distribution and an Application Load Balancer (ALB) as origins. They want to receive notifications when a DDoS attack is detected. What is the MOST comprehensive way to set up notifications?

A.Enable Shield Advanced automatic notifications in the AWS Shield console.
B.Set up AWS Config rules to detect changes in the Shield Advanced configuration and send alerts.
C.Create a CloudWatch alarm on the AWS Shield Advanced metric DDoSDetected and configure an SNS notification.
D.Use Amazon Route 53 health checks to monitor the application and send notifications on failure.
AnswerC

Correct: Shield Advanced metrics are sent to CloudWatch, and alarms can trigger SNS.

Why this answer

AWS Shield Advanced provides DDoSDetected metrics in CloudWatch. You can create a CloudWatch alarm on this metric and configure an SNS notification to alert when a DDoS attack is detected. Option A is incorrect because Shield Advanced does not have automatic notification settings; it relies on CloudWatch alarms.

Option B is incorrect because AWS Config monitors configuration changes, not DDoS events. Option D is incorrect because Route 53 health checks monitor endpoint health, not DDoS attacks.

16
MCQmedium

A company is using AWS Organizations to manage multiple accounts. The security team wants to enforce that all S3 buckets have server-side encryption enabled. Which SCP should be applied to the root OU?

A.Create an IAM policy that allows s3:PutBucketEncryption only with specific conditions
B.Attach an IAM policy to each S3 bucket requiring encryption
C.Deny s3:PutBucketEncryption unless encryption settings include AES256 or aws:kms
D.Use AWS Config rules to auto-enable encryption on existing buckets
AnswerC

Correct SCP approach to enforce encryption.

Why this answer

A Service Control Policy (SCP) applied to the root OU can deny the s3:PutBucketEncryption action unless specific encryption settings (AES256 or aws:kms) are used. This prevents any account in the organization from creating or modifying S3 buckets without encryption. Option A is wrong because IAM policies are attached to principals (users/roles), not to OUs, and cannot enforce encryption across all accounts.

Option B is wrong because SCPs are applied to OUs or accounts, not to individual resources like S3 buckets. Option D is wrong because AWS Config rules can detect non-compliance but do not enforce via SCPs; they would require an automated remediation action.

17
Multi-Selectmedium

A security engineer is designing a security group configuration for a web application that consists of an Application Load Balancer (ALB), Amazon EC2 instances in an Auto Scaling group, and an Amazon RDS database. Which TWO actions should the engineer take to follow security best practices? (Choose TWO.)

Select 2 answers
A.Configure the RDS security group to allow inbound traffic on port 3306 from 0.0.0.0/0.
B.Configure the EC2 instance security group to allow inbound traffic on port 443 from the ALB security group.
C.Configure the RDS security group to allow inbound traffic on port 3306 from the EC2 instance security group.
D.Configure the ALB security group to allow inbound traffic on port 443 from the security group of the EC2 instances.
E.Configure the ALB security group to allow inbound traffic on port 80 from the security group of the EC2 instances.
AnswersB, C

Best practice: reference security group instead of CIDR.

Why this answer

Referencing the ALB security group as the source in the EC2 security group rule ensures that only traffic originating from the ALB (and not any other source) is allowed on port 443. This follows the security best practice of using security group references instead of IP ranges, providing a tighter, more dynamic access control that automatically scales with the ALB's elastic network interfaces.

Exam trap

AWS often tests the misconception that security groups should be configured with IP ranges (e.g., 0.0.0.0/0) for simplicity, rather than using security group references to enforce least-privilege access between tiers.

18
MCQhard

A company uses AWS Transit Gateway to connect multiple VPCs and on-premises networks. They need to ensure that traffic between VPCs is inspected by a security appliance in a centralized inspection VPC. How should they configure the Transit Gateway route tables?

A.Create a route table for the inspection VPC and add blackhole routes for all other VPCs
B.Use one route table with all VPC attachments and enable route propagation for all attachments
C.Create separate route tables for each VPC and add a static route to the inspection VPC
D.Associate all VPCs with a single route table that has a default route pointing to the inspection VPC attachment, and enable route propagation from the inspection VPC
AnswerD

This forces inter-VPC traffic to go through the inspection VPC.

Why this answer

Using separate route tables for each VPC with a blackhole route pointing to the inspection VPC is not standard; the correct approach is to have a shared route table that propagates routes and uses a static route to the inspection VPC. Option D is correct: associate all VPCs with a single route table that has a default route pointing to the inspection VPC's attachment, and enable route propagation from the inspection VPC. Option A is wrong because it does not force traffic through the inspection VPC.

Option B is wrong because it only inspects traffic from one VPC. Option C is wrong because a blackhole route drops traffic.

19
MCQmedium

A security engineer reviews the CloudTrail log entry above. What security concern does this event raise?

A.The root user is being used to perform administrative actions.
B.The security group was created with a permissive name.
C.The event took place in a region that is not used by the company.
D.The event originated from an external IP address.
AnswerA

Root user should not be used for daily operations; IAM users should be used.

Why this answer

The event shows the AWS root user creating a security group. Best practice is to not use root for daily tasks. The source IP is external, but that is not necessarily a concern.

The security group name is not the issue. The region is us-east-1, not a concern.

20
MCQhard

A company has a multi-account AWS environment using AWS Organizations. They need to enforce that all newly created S3 buckets are encrypted with SSE-KMS using a specific KMS key. Which policy should they use?

A.S3 bucket policy on each bucket
B.IAM policy in each account
C.AWS Config rule with auto-remediation
D.SCP in AWS Organizations
AnswerD

SCPs can centrally deny actions across accounts, such as creating buckets without encryption.

Why this answer

A Service Control Policy (SCP) in AWS Organizations can be attached to the root or an OU to deny the creation of S3 buckets that do not use a specific KMS key for encryption. This is a preventive control that applies across all accounts in the organization. Option A (S3 bucket policy) is incorrect because bucket policies are applied at the bucket level after creation and cannot prevent the creation of the bucket.

Option B (IAM policy) is incorrect because IAM policies are per-account and cannot be enforced centrally across all accounts. Option C (AWS Config rule with auto-remediation) is incorrect because Config rules are detective and can only trigger remediation after a non-compliant bucket is created, not prevent the creation.

21
Multi-Selecteasy

A company wants to encrypt all data in transit between its on-premises data center and AWS. Which two services or features can provide encryption for data in transit?

Select 2 answers
A.AWS PrivateLink
B.VPC peering
C.AWS Site-to-Site VPN
D.AWS Transit Gateway
E.AWS Direct Connect with MACsec
AnswersC, E

IPsec encryption.

Why this answer

AWS Site-to-Site VPN uses IPsec to encrypt traffic between on-premises and AWS, providing encryption in transit. AWS Direct Connect with MACsec provides encryption at Layer 2. Options C and E are correct.

Option A is wrong because AWS PrivateLink does not encrypt traffic between on-premises and AWS; it only provides private connectivity within AWS. Option B is wrong because VPC peering does not inherently encrypt traffic. Option D is wrong because AWS Transit Gateway is a network transit hub and does not provide encryption by itself.

22
MCQmedium

A company has a production VPC with a public subnet and a private subnet. The private subnet hosts a database instance that should be accessible only from the application servers in the same VPC. The security team has configured the database security group to allow inbound traffic on port 3306 from the application security group. However, the application servers cannot connect to the database. The network ACLs are configured with default allow all rules. What is the MOST likely cause?

A.The database instance does not have an IAM role assigned.
B.The database security group does not allow outbound traffic for the response.
C.The network ACL on the private subnet has an inbound deny rule for port 3306.
D.The VPC is peered with another VPC that has overlapping CIDR.
AnswerC

NACLs are stateless; a deny rule on port 3306 inbound would block traffic from the application servers to the database, overriding the security group allow.

Why this answer

The most likely cause is that the network ACL (NACL) on the private subnet has an inbound deny rule for port 3306. NACLs are stateless and evaluate rules in order; even though the default NACL allows all traffic, a custom NACL applied to the subnet could have a deny rule that overrides the default allow. This would block the inbound traffic from the application servers to the database on port 3306, preventing connectivity.

Option B is incorrect because security groups are stateful; outbound rules do not affect return traffic for allowed inbound connections. Options A and D are irrelevant to the connectivity issue.

Exam trap

A common misconception is that security groups need outbound rules for return traffic, but they are stateful and automatically allow it. Instead, the issue lies with stateless NACLs, which can block traffic if configured with deny rules.

23
MCQmedium

A company uses AWS Shield Advanced for DDoS protection. They want to receive near real-time notifications when a DDoS attack is detected. Which AWS service should be used to trigger the notification?

A.Amazon EventBridge
B.AWS Lambda
C.Amazon Simple Queue Service (SQS)
D.Amazon Simple Notification Service (SNS)
AnswerD

CloudWatch Alarm can send a notification to SNS when Shield detects an attack.

Why this answer

AWS Shield Advanced integrates with CloudWatch to send metrics and alarms. Shield can send events to EventBridge, but for near real-time notifications, CloudWatch Alarms are typically used to trigger SNS topics. Lambda and SQS are not direct notification services for Shield events.

24
MCQeasy

A company wants to enforce that all Amazon S3 buckets in an AWS account are encrypted at rest. Which AWS service can be used to automatically detect and report unencrypted buckets?

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

AWS Config can use managed rules to check S3 bucket encryption.

Why this answer

AWS Config can evaluate resources against rules. The 's3-bucket-server-side-encryption-enabled' managed rule checks for encryption. CloudTrail logs API calls, GuardDuty detects threats, and Inspector assesses vulnerabilities.

25
MCQhard

Refer to the exhibit. An AWS IAM policy is attached to an IAM role used by a network administrator. The policy is intended to allow the role to accept a VPC peering connection request only if the accepter VPC is vpc-0abcdef1234567890. However, the administrator reports that the policy does not work as expected. What is the most likely reason?

A.The policy does not include the ec2:Describe* action, which is required to accept a peering connection
B.The resource ARN should include the specific peering connection ID instead of a wildcard
C.The condition key is misspelled; it should be ec2:AccepterVpc (with capital A)
D.The Principal element must specify the AWS account ID instead of the IAM role ARN
AnswerC

The condition key is case-sensitive; the correct key is ec2:AccepterVpc (capital A).

Why this answer

AWS condition keys are case-sensitive. The correct condition key for restricting the accepter VPC is `ec2:AccepterVpc` (with capital A and V). A common mistake is using `ec2:accepterVpc` (lowercase 'a'), which causes the condition to be ignored and the policy to not work as intended.

The other options are incorrect: the `ec2:AcceptVpcPeeringConnection` action does not require `ec2:Describe*` permissions; a wildcard in the resource ARN is permissible when the condition restricts access to a specific VPC; and identity-based policies attached to a role do not include a Principal element.

26
MCQhard

A company has a Direct Connect connection to AWS with a private VIF to a VPC. They also have a VPN connection as a backup. The BGP sessions are established. They want to ensure that traffic from on-premises to the VPC prefers the Direct Connect path over the VPN. The on-premises router is advertising the same prefix to both connections. What should the network engineer configure on the AWS side?

A.Set a higher local preference value on the on-premises router for the Direct Connect route.
B.Update the VPC route table to give higher priority to the Direct Connect route.
C.Set a lower MED value on the Direct Connect virtual interface.
D.Configure the on-premises router to prepend AS path for routes advertised over the VPN connection.
AnswerD

Correct: AS path prepending makes VPN path less preferred.

Why this answer

To prefer the Direct Connect path over the VPN for traffic from on-premises to the VPC, the on-premises router should prepend its AS number multiple times for the routes advertised over the VPN connection. This increases the AS path length, making the Direct Connect path more preferred. AWS does not allow manipulation of BGP attributes on the customer side of the Direct Connect or VPN connections, so the change must be made on the on-premises router.

Option A is incorrect because local preference is a Cisco-specific feature and affects outbound traffic, not inbound. Option B is incorrect because VPC route tables only apply to traffic inside the VPC, not to BGP path selection. Option C is incorrect because MED is typically used to influence outbound traffic from AWS to on-premises and is not as effective as AS path prepending for this scenario.

27
MCQmedium

A company uses AWS Organizations with multiple accounts and wants to centrally manage VPC security group rules. They need to enforce that no security group allows inbound SSH (port 22) from 0.0.0.0/0. Which service should they use to automatically detect and remediate noncompliant security groups?

A.AWS Config
B.Amazon GuardDuty
C.AWS Firewall Manager
D.AWS CloudTrail
AnswerA

AWS Config can evaluate security group rules against desired configurations and trigger automatic remediation via AWS Systems Manager Automation.

Why this answer

AWS Config with managed rules like restricted-ssh can detect noncompliant security groups, and AWS Config remediation actions can automatically remediate them. AWS Firewall Manager can also centrally manage security group rules across accounts, but it is more about enforcement and policy management. Option A is correct because AWS Config is the primary service for compliance monitoring and remediation.

Option C (AWS Firewall Manager) is also a valid service but is more for policy-based management across accounts; however, the question asks for detection and automatic remediation, which AWS Config does directly. Option D (AWS CloudTrail) is for auditing API calls, not for enforcement. Option B (Amazon GuardDuty) is for threat detection, not security group compliance.

28
MCQeasy

A company wants to centrally manage and enforce security rules for all VPCs in a multi-account environment. Which AWS service should be used?

A.Amazon GuardDuty
B.AWS Shield
C.AWS Firewall Manager
D.AWS WAF
AnswerC

Centrally manages firewall rules across accounts and VPCs.

Why this answer

AWS Firewall Manager is the correct choice because it provides centralized management of firewall rules across multiple accounts and VPCs in an AWS Organization. It allows you to enforce a common set of security policies, such as AWS WAF rules, AWS Shield Advanced protections, and VPC security group rules, ensuring consistent governance across all VPCs in the multi-account environment.

Exam trap

AWS often tests the distinction between a service that provides centralized policy management (Firewall Manager) versus a service that provides a specific security function (like WAF or Shield), leading candidates to choose the more familiar service without recognizing the need for multi-account governance.

How to eliminate wrong answers

Option A is wrong because Amazon GuardDuty is a threat detection service that monitors for malicious activity using anomaly detection and threat intelligence, not a service for centrally managing or enforcing security rules across VPCs. Option B is wrong because AWS Shield is a managed Distributed Denial of Service (DDoS) protection service, designed to safeguard applications against DDoS attacks, not for centrally managing firewall rules across multiple VPCs. Option D is wrong because AWS WAF is a web application firewall that protects web applications from common exploits, but it operates at the application layer and does not provide centralized policy management across multiple accounts and VPCs; that capability is provided by AWS Firewall Manager.

29
Multi-Selectmedium

A company has a VPC with public and private subnets. The security team wants to implement a web application firewall to protect against common web exploits. Which TWO AWS services can be used together to achieve this?

Select 2 answers
A.Application Load Balancer (ALB)
B.Network Load Balancer (NLB)
C.AWS WAF
D.NAT Gateway
E.Amazon CloudFront
AnswersA, C

ALB can be associated with AWS WAF to inspect HTTP/HTTPS traffic.

Why this answer

An Application Load Balancer (ALB) operates at Layer 7 and can be associated with AWS WAF to inspect HTTP/HTTPS traffic for common web exploits. AWS WAF provides a managed rule set that blocks SQL injection, cross-site scripting (XSS), and other OWASP Top 10 threats. Together, they form a web application firewall (WAF) solution that protects resources in the VPC's private subnets.

Exam trap

AWS often tests the misconception that any load balancer can integrate with AWS WAF, but only Layer 7 load balancers (ALB) support this integration, not Layer 4 (NLB).

30
MCQeasy

A company wants to securely connect an on-premises data center to an AWS VPC over the internet using IPsec. Which AWS service should be used?

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

It creates IPsec tunnels over the internet.

Why this answer

WS Site-to-Site VPN, which creates IPsec tunnels over the internet to securely connect an on-premises data center to an AWS VPC. Option A (AWS Transit Gateway) is a network transit hub that can interconnect multiple VPCs and VPNs, but it is not the VPN service itself. Option B (AWS Direct Connect) provides a dedicated physical connection, not over the internet.

Option C (AWS Client VPN) is for individual remote users, not for site-to-site connections.

31
MCQmedium

A company has a VPC with multiple subnets. They have an Application Load Balancer (ALB) in a public subnet and a web server fleet in private subnets. The security team wants to ensure that only the ALB can communicate with the web servers. Which security group configuration should be used?

A.Set the web server security group inbound rule to allow traffic from the ALB's security group.
B.Set the web server security group inbound rule to allow traffic from the public subnet CIDR.
C.Set the web server security group inbound rule to allow traffic from the VPC CIDR.
D.Set the web server security group inbound rule to allow traffic from 0.0.0.0/0.
AnswerA

This restricts inbound traffic to only the ALB.

Why this answer

Referencing the ALB's security group as the source allows only traffic from instances or resources associated with that security group, strictly limiting access to the web servers. This follows the principle of least privilege. Option B is wrong because allowing traffic from the public subnet CIDR is too broad and would permit any instance in that subnet, not just the ALB.

Option C is wrong because allowing traffic from the VPC CIDR permits any resource in the VPC, which is overly permissive. Option D is wrong because allowing traffic from 0.0.0.0/0 exposes the web servers to the internet.

Exam trap

A common pitfall is using source CIDR blocks (e.g., subnet or VPC CIDR) instead of security group IDs, which grants broader access than intended.

32
MCQeasy

A security engineer is troubleshooting why an EC2 instance cannot communicate with the internet. The instance is in a private subnet with a route table that has a default route (0.0.0.0/0) pointing to a NAT gateway. The security group for the instance allows all outbound traffic. What should the engineer check NEXT?

A.Verify that the security group inbound rules allow return traffic
B.Verify that the NAT gateway has an Elastic IP
C.Check the network ACL associated with the private subnet
D.Enable VPC Flow Logs to analyze traffic
AnswerC

Network ACLs are stateless and must allow inbound ephemeral ports for return traffic.

Why this answer

Network ACLs are stateless and must allow both inbound and outbound traffic for the response. Option A is wrong because security group already allows outbound. Option B is wrong because the route is configured.

Option D is wrong because flow logs are for analysis, not a next step in troubleshooting connectivity.

33
Multi-Selecteasy

A company wants to securely store database credentials and automatically rotate them every 90 days. Which TWO AWS services can work together to achieve this? (Choose TWO.)

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

Secrets Manager stores secrets and has built-in rotation.

34
Multi-Selecthard

Which THREE components are necessary to enable encryption in transit for traffic between an on-premises data center and an Amazon VPC over AWS Site-to-Site VPN? (Choose three.)

Select 3 answers
A.A customer gateway (CGW) in the on-premises network
B.An internet gateway (IGW) attached to the VPC
C.An SSL/TLS certificate for the VPN tunnel
D.A virtual private gateway (VGW) in the VPC
E.An IPsec VPN tunnel between the VGW and CGW
AnswersA, D, E

Represents the on-premises VPN device.

Why this answer

The correct answers are A, D, and E. A customer gateway (CGW) represents the on-premises device, a virtual private gateway (VGW) is the AWS endpoint, and an IPsec VPN tunnel between them provides encryption in transit. Option B is wrong because an internet gateway is used for internet connectivity, not VPN.

Option C is wrong because SSL/TLS is not used for Site-to-Site VPN; it uses IPsec with pre-shared keys or certificates.

35
MCQeasy

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

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

CloudTrail records API calls for auditing.

Why this answer

AWS CloudTrail records API calls made to the AWS environment, including calls to modify security group rules (such as AuthorizeSecurityGroupIngress, RevokeSecurityGroupEgress, etc.). This provides a detailed audit trail of who made the change, when, and from where. AWS Config can record resource configuration changes and can provide a history of security group rule changes, but it is not the primary service for auditing API calls; it focuses on configuration compliance and resource relationships.

VPC Flow Logs capture metadata about network traffic, not configuration changes. CloudWatch monitors performance metrics and logs. Therefore, CloudTrail is the correct answer.

36
MCQhard

A company has a VPC with a CIDR block of 10.0.0.0/16. They have an AWS Site-to-Site VPN connection to an on-premises network with a CIDR of 192.168.0.0/16. The VPN is configured with dynamic routing (BGP). The on-premises network advertises a route to 192.168.0.0/16 via BGP. The VPC route table has a static route to 192.168.0.0/16 pointing to a virtual private gateway. The company also has a Direct Connect connection to the same on-premises network advertising the same CIDR. The VPC route table has a propagated route to 192.168.0.0/16 pointing to a Direct Connect virtual interface, learned via BGP. Which route will be used for traffic destined to 192.168.0.0/16?

A.Traffic will use the VPN connection because the static route to the virtual private gateway takes precedence over the propagated route from Direct Connect.
B.Traffic will use the VPN connection because the static route to the virtual private gateway has a lower prefix.
C.Traffic will use the Direct Connect connection because it is a more reliable connection.
D.Traffic will be load-balanced between VPN and Direct Connect.
AnswerA

In AWS route tables, static routes have a higher priority than propagated routes. Therefore, the static route to the VPN wins.

Why this answer

In AWS, when a VPC route table has both a static route and a propagated route (learned via BGP) for the same destination, the static route takes precedence regardless of the gateway type. In this scenario, the VPN route is a static route pointing to the virtual private gateway, while the Direct Connect route is a propagated route automatically added via BGP from the Direct Connect virtual interface. Therefore, the static route to the VPN gateway is used.

Note that AWS does not allow two static routes with the same destination in the same route table; thus the Direct Connect route must be propagated.

37
MCQmedium

A company has a VPC with public and private subnets. The public subnet hosts a NAT gateway. The private subnet hosts EC2 instances that need to download patches from the internet. The EC2 instances have a security group that allows outbound HTTPS to 0.0.0.0/0. What additional configuration is required?

A.Attach an internet gateway to the private subnet.
B.Move the NAT gateway to the private subnet.
C.Add a route in the private subnet's route table pointing 0.0.0.0/0 to the NAT gateway.
D.Create a VPC endpoint for S3.
AnswerC

This directs internet traffic through the NAT gateway.

Why this answer

EC2 instances in a private subnet need a route in their route table that directs internet traffic (0.0.0.0/0) to the NAT gateway to access the internet for patch downloads. Option A is incorrect because an internet gateway is attached to the VPC, not a subnet, and private subnets should not have direct internet access. Option B is incorrect because the NAT gateway must be in a public subnet to have internet access via the internet gateway.

Option D is incorrect because a VPC endpoint for S3 is used for private connectivity to S3, not for general internet access.

38
Matchingmedium

Match each AWS Direct Connect virtual interface type to its use case.

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

Concepts
Matches

Access to VPCs using private IP addresses

Access to public AWS services (e.g., S3, DynamoDB) using public IPs

Connect to a Direct Connect Gateway for multiple VPCs

Virtual interface provisioned by an AWS Direct Connect Partner

Encrypted virtual interface using MACsec

Why these pairings

Correct matches: Private VIF accesses VPCs via private IPs, Public VIF accesses AWS public services, Transit VIF connects multiple VPCs via Transit Gateway. Common confusions involve swapping public/private access or confusing Transit VIF with Private VIF.

39
MCQmedium

A company is deploying a multi-tier application in a VPC. The web servers must be accessible from the internet, but the database servers must not be. Which architecture meets these requirements?

A.Use a NAT gateway for the database servers to allow inbound traffic.
B.Place web servers in public subnets with an internet gateway, and databases in private subnets with no direct internet access.
C.Place all servers in private subnets and use an AWS Site-to-Site VPN for internet access.
D.Place both web and database servers in public subnets and use security groups to restrict database access.
AnswerB

Placing web servers in public subnets with an internet gateway allows internet access, while databases in private subnets have no direct internet access, meeting the requirements.

Why this answer

Placing web servers in public subnets with an internet gateway and database servers in private subnets with no direct internet access ensures only the web tier is accessible from the internet. Option A is incorrect because a NAT gateway is used for outbound internet access from private subnets, not for allowing inbound traffic to the database servers. Option C is incorrect because an AWS Site-to-Site VPN is used to connect on-premises networks to a VPC, not to provide internet access to private subnets.

Option D is incorrect because placing database servers in public subnets directly exposes them to the internet; security groups alone do not prevent internet routability, and best practice is to place databases in private subnets.

40
MCQeasy

A company wants to restrict access to their S3 bucket so that only users from their corporate network (with a specific IP range) can read objects. They also want to ensure that the objects are encrypted in transit. Which combination of bucket policy and encryption should they use?

A.Use a VPC endpoint with a bucket policy that restricts access to the VPC endpoint.
B.Use an IAM policy that restricts access to the corporate IP range and enable default encryption on the bucket.
C.Bucket policy with a condition that denies access unless the source IP is within the corporate range, and require HTTPS for all requests.
D.Enable CloudFront with geographic restrictions and use HTTPS.
AnswerC

A bucket policy with a condition using aws:SourceIp can restrict access to the corporate IP range. Requiring HTTPS ensures encryption in transit.

Why this answer

A bucket policy with a condition key `aws:SourceIp` can restrict access to the corporate IP range, and requiring HTTPS (via a `aws:SecureTransport` condition) ensures encryption in transit. This combination directly meets both requirements without relying on additional infrastructure like VPC endpoints or CloudFront.

Exam trap

AWS often tests the distinction between IAM policies (which control user permissions) and bucket policies (which control resource-based access), leading candidates to incorrectly choose an IAM policy for IP-based restrictions.

How to eliminate wrong answers

Option A is wrong because a VPC endpoint policy restricts access to traffic originating from the VPC, not from a specific corporate IP range; the corporate network might not route through that VPC, and it does not enforce encryption in transit. Option B is wrong because an IAM policy restricts access based on the IAM user/role, not the source IP of the request; IAM policies cannot use `aws:SourceIp` to restrict network-level access to an S3 bucket. Option D is wrong because CloudFront geographic restrictions limit access by country, not by a specific corporate IP range, and while HTTPS can be enforced, the requirement is for direct S3 bucket access, not via a CDN.

41
MCQmedium

Refer to the exhibit. A company has an S3 bucket policy that denies PutObject if the object is not encrypted with SSE-KMS. However, uploads are still being allowed without encryption. What is the most likely reason?

A.The bucket policy has a syntax error and is not being enforced.
B.The IAM user has an explicit Allow that overrides the Deny in the bucket policy.
C.The condition key 's3:x-amz-server-side-encryption' is not present in the upload request, so the condition is not evaluated and the Deny is not applied.
D.The bucket policy must be attached to the bucket in the same region as the request.
AnswerC

If the header is omitted, the condition evaluates to false, and the Deny statement is not triggered.

Why this answer

The bucket policy uses a condition key 's3:x-amz-server-side-encryption' to deny uploads that are not encrypted with SSE-KMS. However, if the upload request does not include the 'x-amz-server-side-encryption' header at all, the condition key is not present in the request, so the condition is not evaluated. As a result, the Deny effect is not applied, and the upload is allowed.

Option A is incorrect because the policy is valid JSON and would be enforced if the condition were met. Option B is incorrect because an explicit Allow in an IAM policy cannot override a Deny in a bucket policy; the Deny would still apply. Option D is incorrect because bucket policies are evaluated regardless of region as long as the bucket is in the same region as the request's endpoint; the region is not the issue here.

42
MCQmedium

A company has a VPC with public and private subnets. The security team wants to block all outbound traffic to the internet from the private subnets except for traffic to an AWS service like Amazon S3. Which configuration should be used?

A.Attach an internet gateway to the VPC and add a route to the internet gateway in the private subnet route table.
B.Create a VPC endpoint for Amazon S3 and add a route to the endpoint in the private subnet route table.
C.Place a proxy server in the private subnet and configure all instances to use it.
D.Configure a NAT gateway in the public subnet and update the route table to send 0.0.0.0/0 traffic to the NAT gateway.
AnswerB

VPC endpoint provides private connectivity to S3 without internet access.

Why this answer

A VPC endpoint for S3 allows private subnet instances to access S3 without going through an internet gateway. A NAT gateway would allow all internet traffic, not just S3. A proxy server would allow all traffic unless configured to restrict.

Internet gateway alone does not provide granular control.

43
MCQhard

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 firewall appliance in a inspection VPC. Which architecture meets this requirement?

A.Create VPC peering connections between all VPCs and route traffic through the inspection VPC.
B.Deploy AWS Network Firewall in each VPC and allow traffic to flow directly between VPCs.
C.Attach all VPCs to a Transit Gateway and create separate route tables for inspection.
D.Use AWS Direct Connect Gateway to route traffic between VPCs through the inspection VPC.
AnswerC

Transit Gateway with route tables can direct inter-VPC traffic to a inspection VPC for centralized inspection.

Why this answer

Transit Gateway route tables can direct traffic between VPCs through a central inspection VPC by using route propagation and appropriate route table associations. Option A is wrong because VPC peering does not support transitive routing; traffic would need to traverse multiple non-transitive connections, and peering alone cannot force traffic through a centralized firewall. Option B is wrong because deploying AWS Network Firewall in each VPC does not centralize inspection; traffic between VPCs would flow directly unless routing forces it through the firewall, which is not described.

Option D is wrong because AWS Direct Connect Gateway is used for connecting on-premises networks to AWS, not for routing traffic between VPCs through an inspection VPC.

44
MCQhard

A company has a VPC with public and private subnets. An application in the private subnet needs to access an S3 bucket. Which design meets security best practices without exposing the application to the internet?

A.Create a VPC Gateway Endpoint for S3 and update the route table
B.Use a NAT Gateway in the public subnet and route traffic through it
C.Set up a VPN connection to AWS and route through it
D.Attach an Internet Gateway to the VPC and update route tables
AnswerA

Gateway Endpoint provides private access to S3.

Why this answer

A VPC Gateway Endpoint for S3 allows private subnet resources to access S3 without internet exposure. Option B (NAT Gateway) would provide internet access but is unnecessary and could expose the application indirectly. Option C (VPN) is overkill and not needed for S3 access within AWS.

Option D (Internet Gateway) would expose the application to the internet, violating security best practices.

45
Multi-Selecthard

A company is designing a network security architecture for a multi-account environment using AWS Transit Gateway. The company requires that all traffic between VPCs must be inspected by a centralized security appliance in a shared services VPC. The security appliance must receive traffic for both directions (ingress and egress). Which THREE components are required to achieve this? (Choose THREE.)

Select 3 answers
A.A shared services VPC containing the security appliances.
B.VPC attachments to the Transit Gateway for each VPC.
C.VPC peering connections between each spoke VPC and the shared services VPC.
D.Transit Gateway route tables that route traffic between VPCs through the security appliances.
E.NAT gateways in each spoke VPC for outbound traffic.
AnswersA, B, D

Centralized inspection point.

Why this answer

The shared services VPC hosts the centralized security appliances (e.g., firewalls, intrusion detection systems) that must inspect all inter-VPC traffic. This VPC acts as a hub for traffic inspection, ensuring that both ingress and egress traffic flows through the appliances before reaching its destination.

Exam trap

AWS often tests the misconception that VPC peering can be used for transitive routing in a hub-and-spoke model, but the trap here is that VPC peering does not support transitive routing, so it cannot replace Transit Gateway attachments for centralized inspection.

46
MCQmedium

A company uses an AWS Network Firewall to inspect traffic between VPCs and the internet. They want to allow outbound HTTPS traffic only to specific domains. Which rule configuration should be used?

A.Create a stateless rule group with a 'forward' action for the allowed IP addresses.
B.Create a stateful rule group with a 'pass' action for the allowed domains using domain list rule group.
C.Create a stateful rule group with a 'drop' action for all traffic and then 'pass' for the allowed domains using Suricata compatible rules.
D.Create an IP set rule group with the allowed domain IP addresses.
AnswerB

Domain list rule group allows matching by domain name in stateful rules.

Why this answer

Domain list rule group in AWS Network Firewall can match FQDNs. Stateful rule groups inspect traffic states. Suricata compatible rules allow custom domain matching.

IP set would match by IP, not domain.

47
MCQhard

An organization has a requirement that all cross-account access to Amazon S3 buckets must be logged and monitored. The security team has enabled AWS CloudTrail and S3 server access logs. However, they notice that some cross-account access attempts are not being logged. Which additional step should be taken to ensure all cross-account access is logged?

A.Create a CloudWatch Logs subscription filter to capture all S3 access logs.
B.Enable default encryption on all S3 buckets.
C.Enable CloudTrail data events for S3 buckets to capture object-level API operations.
D.Enable S3 Object Lock on all buckets to prevent deletion of logs.
AnswerC

CloudTrail data events log object-level operations such as GetObject, PutObject, which are used in cross-account access.

Why this answer

CloudTrail logs management events by default, but not data events. S3 server access logs capture object-level operations but require proper configuration. Option A is wrong because CloudWatch Logs is for log storage, not for enabling logging.

Option B is wrong because enabling default encryption does not affect logging. Option D is wrong because S3 Object Lock is for compliance, not logging.

48
Multi-Selectmedium

A company is designing a network security architecture for a multi-tier application. They need to ensure that the web tier can only communicate with the app tier on port 443, and the app tier can only communicate with the database tier on port 3306. Which TWO actions should they take? (Choose TWO.)

Select 2 answers
A.Create a security group for the web tier that allows outbound traffic to the app tier security group on port 443.
B.Create a security group for the app tier that allows inbound traffic from the web tier security group on port 443.
C.Deploy an AWS Network Firewall to inspect inter-tier traffic.
D.Use network ACLs to statelessly filter traffic on the subnets.
E.Configure a VPC endpoint policy to deny all traffic between tiers.
AnswersA, B

Security group outbound rule allows traffic to app tier.

Why this answer

Options A and B are correct because security groups are stateful and allow you to reference other security groups as sources or destinations, enabling granular control of traffic between tiers. Option A allows the web tier to send outbound traffic to the app tier on port 443, and Option B allows the app tier to receive that traffic from the web tier. Options C, D, and E are incorrect: AWS Network Firewall is unnecessary for this simple requirement; network ACLs are stateless and would require complex rules; a VPC endpoint policy only applies to VPC endpoints, not inter-tier traffic.

49
Multi-Selecthard

A company is designing a network security architecture for a multi-account environment using AWS Organizations. The security team needs to ensure that all internet-bound traffic from VPCs in the organization goes through a centralized egress VPC where it is inspected by a firewall. Which TWO steps are required to enforce this?

Select 2 answers
A.Create a central egress VPC with an Internet Gateway and a NAT Gateway or firewall.
B.Use AWS WAF to block internet access from all VPCs except the central egress VPC.
C.Set up an AWS Direct Connect connection to route internet traffic through the central VPC.
D.Configure VPC endpoints for all AWS services to force traffic through the central VPC.
E.Apply an SCP that denies the ec2:CreateInternetGateway action in all accounts except the central network account.
AnswersA, E

Central egress VPC hosts the internet gateway.

Why this answer

Options A and E are correct. Option A: A central egress VPC with an Internet Gateway and NAT Gateway or firewall is required to route and inspect all internet-bound traffic. Option E: An SCP denying ec2:CreateInternetGateway in all accounts except the central network account prevents other accounts from creating their own Internet Gateways, thereby forcing traffic through the central VPC.

Option B is incorrect because AWS WAF is a web application firewall that filters HTTP/S traffic, not a method to block all internet access at the network level. Option C is incorrect because AWS Direct Connect is for private on-premises connectivity, not for routing internet traffic. Option D is incorrect because VPC endpoints provide private access to AWS services without traversing the internet; they do not enforce internet egress routing.

50
Multi-Selecteasy

Which TWO AWS services can be used to monitor and log network traffic in a VPC for security analysis? (Choose two.)

Select 2 answers
A.VPC Flow Logs
B.AWS Config
C.AWS CloudTrail
D.Amazon Inspector
E.Amazon GuardDuty
AnswersA, C

Captures metadata about IP traffic.

Why this answer

Options A and C are correct. VPC Flow Logs capture IP traffic information for network interfaces in a VPC, enabling security analysis of traffic patterns. AWS CloudTrail logs API calls to the AWS Management Console and SDKs, providing visibility into user activity and resource changes.

Option B (AWS Config) is incorrect because it evaluates resource configurations for compliance, not network traffic logging. Option D (Amazon Inspector) is a vulnerability assessment service that scans for software vulnerabilities and unintended network exposure. Option E (Amazon GuardDuty) is a threat detection service that analyzes data sources like DNS logs and VPC Flow Logs, but it is not itself a logging service for network traffic.

51
MCQeasy

A company wants to encrypt data in transit between an on-premises data center and AWS. Which service provides a dedicated encrypted connection?

A.AWS Transit Gateway
B.AWS Direct Connect with MACsec
C.AWS Site-to-Site VPN
D.AWS Client VPN
AnswerB

Direct Connect provides a dedicated connection with encryption.

Why this answer

AWS Direct Connect with MACsec provides a dedicated encrypted connection. Option A is wrong because AWS Transit Gateway is a network transit hub, not a connection type. Option C is wrong because AWS Site-to-Site VPN operates over the internet and is not dedicated.

Option D is wrong because AWS Client VPN is for individual users and not a dedicated connection.

52
MCQeasy

A security team needs to audit all network traffic entering and leaving a VPC. Which AWS service should be used to capture IP traffic information?

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

VPC Flow Logs capture IP traffic information.

Why this answer

VPC Flow Logs capture IP traffic information for network interfaces in a VPC, allowing auditing of all network traffic. Option B is wrong because AWS Config records resource configuration changes, not network traffic. Option C is wrong because Amazon CloudWatch Logs can store and monitor logs but does not capture network traffic.

Option D is wrong because AWS CloudTrail records API calls, not network traffic.

53
MCQmedium

A company uses AWS Shield Advanced and AWS WAF to protect its web application. The security team notices that some legitimate traffic is being blocked. They want to allow traffic from a specific set of IP addresses used by their partners. How can they ensure that partner traffic is not blocked by WAF rules?

A.Add the partner IPs to a Network ACL allow rule in the VPC.
B.Remove the blocking WAF rules and rely on Shield Advanced only.
C.Add the partner IPs to an AWS Shield Advanced IP whitelist.
D.Create a WAF IP set and add a rule to allow traffic from that IP set, with a higher priority than blocking rules.
AnswerD

This ensures partner traffic is allowed before it reaches blocking rules.

Why this answer

AWS WAF allows you to create an IP set containing the partner IP addresses and then add a rule with a higher priority than the blocking rules to allow traffic from that IP set. This ensures that partner traffic is explicitly allowed even if other rules would block it. Option A is incorrect because Network ACLs operate at the subnet level and are not evaluated by AWS WAF for application-layer traffic; they also do not have a whitelist feature within WAF.

Option B is incorrect because removing blocking rules would leave the application vulnerable; Shield Advanced provides DDoS protection but does not replace WAF rule logic. Option C is incorrect because AWS Shield Advanced does not have an IP whitelist feature; it focuses on mitigating DDoS attacks, not on application-layer allowlisting.

54
MCQmedium

A company wants to audit all changes made to security groups and network ACLs in its AWS account. Which AWS service should be used to capture these API calls?

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

CloudTrail logs API calls for auditing.

Why this answer

AWS CloudTrail is the correct service because it records all API calls made to the AWS environment, including those that modify security groups and network ACLs. By enabling CloudTrail, you can capture CreateSecurityGroup, AuthorizeSecurityGroupIngress, RevokeSecurityGroupEgress, CreateNetworkAclEntry, and similar API calls, providing an audit trail of who made the change, when, and from which IP address.

Exam trap

The trap here is that candidates often confuse AWS Config (which tracks configuration state) with CloudTrail (which tracks API actions), but the question explicitly asks for capturing the API calls themselves, not the resulting configuration changes.

How to eliminate wrong answers

Option B (Amazon GuardDuty) is wrong because it is a threat detection service that monitors for malicious activity using anomaly detection and threat intelligence, not a service that captures API call logs for auditing changes. Option C (VPC Flow Logs) is wrong because it captures IP traffic metadata (source/destination IP, ports, protocol) at the network interface level, not API calls that modify security group or network ACL configurations. Option D (AWS Config) is wrong because it evaluates resource configurations against desired policies and tracks configuration changes over time, but it does not directly capture the API calls that initiated those changes; it records the resulting state, not the action itself.

55
MCQmedium

A company has a VPC with a public subnet and a private subnet. An EC2 instance in the private subnet needs to access an S3 bucket. The company wants to avoid using a NAT gateway and ensure that traffic does not traverse the internet. Which solution should be used?

A.Attach an internet gateway to the VPC and assign a public IP to the instance
B.Create a VPC endpoint for S3 (Gateway type) and update the route table
C.Set up a VPN connection to the S3 bucket
D.Deploy a NAT gateway in the public subnet and route traffic through it
AnswerB

This provides private connectivity to S3 without internet.

Why this answer

The correct solution is to create a VPC endpoint for S3 (Gateway type) and update the route table. This allows the EC2 instance in the private subnet to access S3 privately without traversing the internet or using a NAT gateway. Option A is incorrect because attaching an internet gateway and assigning a public IP would expose the instance to the internet.

Option C is incorrect because a VPN connection is not necessary for S3 access and would involve additional complexity. Option D is incorrect because a NAT gateway would route traffic through the internet, which the company wants to avoid.

56
Multi-Selectmedium

A company needs to log all network traffic between EC2 instances in a VPC for security analysis. They want to capture metadata about traffic, including source and destination IP, ports, protocol, and packet counts. Which THREE AWS services or features can be used to achieve this? (Choose three.)

Select 3 answers
A.AWS CloudTrail
B.VPC Flow Logs
C.Traffic Mirroring
D.AWS Network Firewall flow logs
E.Security Group rules logging
AnswersB, C, D

VPC Flow Logs capture IP traffic metadata at the network interface level.

Why this answer

Options B, C, and D are correct because VPC Flow Logs capture metadata about network traffic (source/destination IP, ports, protocol, packet counts), Traffic Mirroring captures packets for deep inspection, and AWS Network Firewall provides flow logs for traffic passing through the firewall. Option A is wrong because CloudTrail logs API calls, not network traffic. Option E is wrong because Security Group rules logging does not exist; Security Groups do not log traffic.

57
MCQmedium

A company wants to allow a specific IAM user to manage network ACLs for a specific VPC only. Which IAM policy action should be used?

A.ec2:AuthorizeSecurityGroupIngress
B.ec2:ModifyNetworkAclAttribute
C.ec2:CreateNetworkAcl
D.ec2:DescribeNetworkAcls
AnswerB

ec2:ModifyNetworkAclAttribute allows modification of network ACL attributes, which is a management action.

Why this answer

Managing network ACLs requires multiple IAM actions, including creating, deleting, and modifying rules and attributes. None of the listed actions alone sufficiently allows full management. ec2:ModifyNetworkAclAttribute only modifies attributes like tags, ec2:CreateNetworkAcl only creates new ACLs, ec2:DescribeNetworkAcls is read-only, and ec2:AuthorizeSecurityGroupIngress is for security groups. To allow a user to manage network ACLs, a combination of actions such as ec2:CreateNetworkAcl, ec2:DeleteNetworkAcl, ec2:ReplaceNetworkAclEntry, etc. is needed.

58
MCQmedium

A company uses AWS Organizations with SCPs to enforce security controls. The security team wants to prevent users from disabling Amazon GuardDuty or modifying its configuration in any member account. Which SCP effect should be used?

A.Deny
B.Prevent
C.Allow
D.Block
AnswerA

Deny explicitly prohibits the specified actions in SCPs.

Why this answer

'Deny' because SCPs use Deny to explicitly block actions. Allow is used to whitelist, but SCPs default to Allow, so Deny is needed to override. 'Block' and 'Prevent' are not valid SCP effects.

59
Multi-Selectmedium

Which TWO of the following are valid ways to encrypt data in transit between an on-premises data center and an Amazon VPC? (Choose two.)

Select 2 answers
A.Use AWS Site-to-Site VPN.
B.Use AWS Direct Connect without any additional encryption.
C.Use AWS Direct Connect with a VPN tunnel over the connection.
D.Use VPC peering.
E.Use an internet gateway with a security group.
AnswersA, C

Site-to-Site VPN uses IPSec to encrypt traffic between on-premises and VPC.

Why this answer

Options A and C are correct. AWS Site-to-Site VPN creates an IPSec tunnel, encrypting all traffic. AWS Direct Connect can be combined with a VPN over the connection to encrypt traffic.

Option B is incorrect because Direct Connect alone does not provide encryption. Option D is incorrect because VPC peering does not encrypt traffic. Option E is incorrect because internet gateway does not encrypt traffic.

60
Multi-Selectmedium

A company has a VPC with public and private subnets. The security team wants to inspect all traffic between the private subnets and the internet using a centralized inspection VPC. The company uses AWS Network Firewall and wants to ensure that traffic cannot bypass the firewall. Which TWO actions should the company take? (Choose TWO.)

Select 2 answers
A.Configure an AWS WAF web ACL and associate it with the internet gateway.
B.Deploy the Network Firewall in a dedicated inspection VPC and use a VPC peering or transit gateway to route traffic from the workload VPC to the inspection VPC.
C.Enable VPC Flow Logs on the private subnets to monitor traffic.
D.Configure the private subnet route table in the workload VPC to route 0.0.0.0/0 traffic to the Network Firewall endpoint.
E.Create an internet gateway in the workload VPC and attach it to the private subnets.
AnswersB, D

A centralized inspection VPC allows the firewall to inspect traffic without being in the workload VPC.

Why this answer

Deploying AWS Network Firewall in a dedicated inspection VPC and using a transit gateway (or VPC peering) allows centralized traffic inspection. This architecture ensures that all traffic between the workload VPC and the internet is routed through the inspection VPC, preventing bypass. The transit gateway enables transitive routing, while VPC peering can also be used with proper route table entries to force traffic through the firewall.

Exam trap

The trap here is that candidates often confuse AWS WAF with Network Firewall, thinking WAF can inspect all network traffic, when in fact WAF only inspects HTTP/HTTPS traffic at the application layer and cannot inspect non-web protocols like SSH, RDP, or custom TCP/UDP traffic.

61
Multi-Selecthard

A company has a VPC with public and private subnets. The security team wants to inspect all traffic leaving the VPC to the internet for malicious activity. Which THREE services should be used together to achieve this? (Choose three.)

Select 3 answers
A.VPC Flow Logs
B.Internet gateway
C.Amazon GuardDuty
D.AWS Network Firewall
E.NAT gateway
AnswersA, C, E

Captures network traffic metadata for analysis.

Why this answer

A NAT gateway (E) enables outbound traffic from private subnets to the internet. VPC Flow Logs (A) capture metadata of traffic flows. Amazon GuardDuty (C) can analyze flow logs to detect malicious activity.

Together, these three services allow inspection of all outbound traffic. Option B (Internet gateway) is for inbound traffic from the internet. Option D (AWS Network Firewall) can also inspect traffic but is not part of this common three-service combination.

62
MCQmedium

Refer to the exhibit. A company has attached the IAM policy to an S3 bucket named example-bucket. Users report they cannot access objects in the bucket even when coming from the allowed IP range. What is the most likely cause?

A.The policy syntax is invalid because of the Principal element
B.The IP address range in the condition does not match the users' IP
C.The condition uses aws:SourceIp incorrectly
D.S3 Block Public Access settings are enabled, overriding the policy
AnswerD

Block Public Access denies all public access even if the bucket policy allows it.

Why this answer

The policy allows anonymous access (Principal: "*") from a specific IP range. However, S3 Block Public Access settings can override bucket policies by blocking any public access. If S3 Block Public Access is enabled at the account or bucket level, it will deny all public access regardless of the bucket policy.

Thus, even though the policy is valid, the Block Public Access setting prevents access. Option D is correct because S3 Block Public Access settings override the policy. Option A is incorrect because the Principal element of "*" is valid for a bucket policy.

Option B is incorrect because the condition correctly restricts to the specified IP range; the issue is broader than IP mismatch. Option C is incorrect because aws:SourceIp is used correctly in the condition.

63
MCQeasy

A company has a VPC with a public subnet containing a NAT gateway and a private subnet containing EC2 instances. The EC2 instances need to download patches from the internet. The security team wants to ensure that the EC2 instances cannot initiate outbound connections to any other internet destinations. What should the network engineer do?

A.Remove the NAT gateway and attach an Internet Gateway to the private subnet route table.
B.Attach an egress-only Internet Gateway to the VPC and route private subnet traffic to it.
C.Configure a network ACL on the private subnet to allow outbound traffic only to the patch server's IP address.
D.Assign a security group to the EC2 instances that allows outbound HTTPS traffic only to the patch server's IP address.
AnswerD

Correct: Security groups can restrict outbound traffic to specific destinations.

Why this answer

Security groups act as a virtual firewall for EC2 instances, allowing you to specify outbound rules that restrict traffic to only the necessary destinations, such as the patch server's IP address on HTTPS. This provides granular control over outbound traffic. Option A is incorrect because removing the NAT gateway and attaching an internet gateway to the private subnet would give instances direct internet access, violating the restriction.

Option B is incorrect because an egress-only internet gateway is used for IPv6 traffic only, not IPv4. Option C is incorrect because network ACLs are stateless and apply to the subnet as a whole, making them less suitable for per-instance granular control; they also require rules for return traffic, complicating the configuration.

64
MCQhard

Refer to the exhibit. A network engineer is analyzing a VPC Flow Log record from a VPC with CIDR 10.0.0.0/16. The record indicates a REJECT action. Which component is most likely blocking the traffic?

A.The destination instance's operating system firewall
B.A missing route in the route table
C.The destination instance's security group
D.The network ACL of the destination subnet
AnswerC

Security groups evaluate inbound rules and can REJECT traffic.

Why this answer

Flow logs record traffic after security group and NACL evaluation. A REJECT indicates the traffic was dropped by a security group or NACL. Since the destination port is 80 (HTTP), a security group is likely blocking inbound HTTP.

Option C is correct. Option A is wrong because the source IP is within the VPC. Option B is wrong because there is no indication of a missing route.

Option D is wrong because NACL rules are stateless and would show REJECT if they block, but security groups are more common for instance-level blocking.

65
MCQhard

A financial services company has a multi-account AWS environment managed via AWS Organizations. The security team needs to enforce that all Amazon S3 buckets across the organization are encrypted with AWS KMS using a specific customer managed key (CMK) from the security account. Currently, some accounts have S3 buckets with SSE-S3 encryption or no encryption. The security team must not be able to read the data in the buckets, but must be able to detect and remediate non-compliant buckets. The solution must use AWS native services and minimize operational overhead. Which combination of actions should the security team take?

A.Enable AWS Config in each member account individually and create a custom rule using AWS Lambda to check bucket encryption, then send compliance results to the security account via Amazon EventBridge.
B.Use a service control policy (SCP) to deny s3:PutObject unless the request includes a specific KMS key ID.
C.Create an AWS Config rule in the security account with an organization conformance pack to check bucket encryption settings, and use an automatic remediation action with AWS Systems Manager Automation to apply the required KMS key.
D.Enable AWS CloudTrail in the security account and create a metric filter to detect PutBucketEncryption API calls, then trigger a Lambda function to remediate.
AnswerC

This solution uses AWS Config rules to continuously evaluate compliance, and automatic remediation ensures non-compliant buckets are fixed. The security team can view compliance status without data access.

Why this answer

AWS Config organization conformance packs allow centralized definition of a custom rule to check S3 bucket encryption settings across all accounts. Automatic remediation via Systems Manager Automation can apply the required KMS key to non-compliant buckets without granting the security team data access. Option A is incorrect because it requires per-account AWS Config setup and custom Lambda rules, increasing operational overhead and lacking centralized enforcement.

Option B is incorrect because SCPs cannot enforce encryption settings on existing buckets and only apply to IAM principals, not to S3 service actions like bucket configuration; they also cannot detect or remediate non-compliant configurations. Option D is incorrect because CloudTrail trails only log API calls and cannot proactively detect existing bucket encryption settings; metric filters are reactive and not suitable for continuous compliance monitoring.

66
Multi-Selecthard

A company is designing a network security architecture for a multi-tier web application. Which THREE best practices should they implement? (Choose three.)

Select 3 answers
A.Attach an internet gateway to the private subnet for outbound traffic
B.Use security groups as a stateless firewall
C.Use network ACLs as a stateless firewall for subnet-level traffic
D.Place databases in private subnets with no direct internet access
E.Use security groups to control traffic at the instance level
AnswersC, D, E

NACLs are stateless and provide subnet-level filtering.

Why this answer

The correct answers are C, D, and E. Option C is correct because network ACLs provide a stateless firewall at the subnet level. Option D is correct because databases in private subnets have no direct internet access, enhancing security.

Option E is correct because security groups control traffic at the instance level. Option A is wrong because internet gateways should be attached to public subnets, not private. Option B is wrong because security groups are stateful, not stateless.

67
MCQhard

A company runs a multi-account AWS environment using AWS Organizations. The security team wants to enforce that all S3 buckets across all accounts are encrypted with AWS KMS and that bucket policies restrict access to specific IAM roles. They have created an SCP that denies s3:PutBucketPolicy unless the bucket is encrypted with KMS (using a condition) and restricts the PutBucketPolicy action to a specific role. After applying the SCP, the development team reports that they cannot update bucket policies even when using the allowed role. The SCP is attached to the root OU. The allowed role is in the dev account and has full S3 permissions via an IAM policy. What is the most likely reason for the failure?

A.The SCP denies s3:PutBucketPolicy for all principals except the allowed role, but the SCP is applied at the root OU and affects all accounts, so the allowed role is still denied because SCPs are deny-by-default and the allow list in the SCP does not override the implicit deny.
B.The SCP must be applied to the dev account specifically, not the root OU, because SCPs attached to OUs do not affect member accounts unless explicitly inherited.
C.The SCP condition key for KMS encryption is incorrect because the s3:PutBucketPolicy action does not support condition keys for encryption.
D.The IAM policy attached to the allowed role does not include s3:PutBucketPolicy permission, even though it has full S3 access.
AnswerA

SCPs are deny-by-default. An SCP that denies an action unless a specific role is used effectively denies all other principals. But if the SCP has an Allow effect for the specific role, it still does not grant permission; it only removes the deny. However, the issue is that the SCP likely has a Deny statement with a condition that the role should not be denied, but if the condition is not met, the deny applies. The stem suggests the SCP restricts PutBucketPolicy to a specific role; if the SCP is written as a Deny for all principals except that role, it works only if the role ARN matches. The most common mistake is that the SCP uses a NotPrincipal element incorrectly, causing the deny to apply to everyone.

68
MCQhard

A company is using Amazon Route 53 for DNS resolution. They want to restrict access to a private hosted zone so that only authorized VPCs can query it. Which configuration should they use?

A.Configure a network ACL to block UDP port 53 from other VPCs
B.Create an IAM policy to deny DNS queries from other VPCs
C.Configure a security group to block DNS traffic from other VPCs
D.Associate the private hosted zone with the authorized VPCs
AnswerD

Private hosted zones are accessible only to associated VPCs.

Why this answer

Associating a private hosted zone with authorized VPCs allows only those VPCs to resolve records within the zone, restricting access as required. Option A is incorrect because network ACLs control traffic at the subnet level but do not restrict DNS queries to a specific hosted zone. Option B is incorrect because IAM policies control permissions for API actions (e.g., creating or modifying hosted zones), not the actual DNS query traffic.

Option C is incorrect because security groups regulate traffic to and from network interfaces, not the resolution of DNS records in Route 53.

69
MCQeasy

A company is designing a VPC with a public subnet for web servers and a private subnet for database servers. The web servers must be able to access the internet for software updates, but the database servers must not have direct internet access. Which solution meets these requirements?

A.Use a VPC endpoint for Amazon S3 to provide internet access to the database servers.
B.Deploy a NAT gateway in the public subnet and add a route to it in the private subnet's route table.
C.Set up a VPN connection to an on-premises data center and route traffic through it.
D.Attach an internet gateway to the VPC and add a route to it in the private subnet's route table.
AnswerB

A NAT gateway allows outbound internet traffic from private subnets while blocking inbound traffic.

Why this answer

A NAT gateway in a public subnet allows instances in private subnets to initiate outbound traffic to the internet while preventing inbound traffic from the internet. Option A is incorrect because a VPC endpoint for Amazon S3 only provides private access to S3, not general internet access. Option C is incorrect because a VPN connection to an on-premises data center does not provide internet access; it connects to the on-premises network.

Option D is incorrect because attaching an internet gateway to a private subnet's route table would allow direct inbound internet traffic, violating the requirement that database servers must not have direct internet access.

70
MCQhard

A company has a VPC with multiple subnets. They want to enforce that all traffic between subnets must be inspected by a security appliance deployed in a centralized inspection VPC. Which AWS feature should be used to route traffic to the inspection VPC without changing the routing on each subnet?

A.VPC Peering
B.Transit Gateway with route tables
C.NAT Gateway
D.Network Load Balancer
AnswerB

Transit Gateway enables centralized routing and inspection.

Why this answer

A Transit Gateway with route tables allows central routing and inspection. Option A is wrong because VPC peering does not support centralized inspection easily. Option B is correct because Transit Gateway can route traffic between VPCs and subnets with centralized inspection.

Option C is wrong because NAT Gateway is for outbound internet traffic. Option D is wrong because a Network Load Balancer is for load balancing, not routing.

71
MCQhard

A company has multiple AWS accounts under AWS Organizations. The security team wants to centrally log all network traffic that is denied by security group rules across all accounts. Which approach meets this requirement with the least operational overhead?

A.Enable AWS Config rules for security group changes and send logs to a central account
B.Create VPC Flow Logs in each account and publish to a central S3 bucket
C.Use AWS CloudTrail to log all API calls and filter for security group events
D.Enable VPC Flow Logs with organization-level aggregation and publish to a central S3 bucket
AnswerD

Organization-level aggregation simplifies cross-account logging of rejected traffic.

Why this answer

VPC Flow Logs can capture rejected traffic, and publishing to a central S3 bucket using Organization-level aggregation simplifies management. Option D is correct because it uses VPC Flow Logs with organization-level aggregation. Option A is wrong because AWS Config does not log network traffic.

Option B is wrong because it requires per-account setup. Option C is wrong because CloudTrail does not capture network flows.

72
Multi-Selecthard

A company is designing a multi-account architecture using AWS Organizations. They want to centrally manage and enforce network security policies across all accounts. Which THREE services or features should they use together to achieve this? (Choose THREE.)

Select 3 answers
A.AWS Network Firewall
B.Service Control Policies (SCPs)
C.Security Groups
D.AWS Config
E.AWS Firewall Manager
AnswersA, B, E

AWS Network Firewall provides stateful, managed network firewall service that can be centrally deployed across VPCs and accounts via AWS Firewall Manager.

Why this answer

Options A (AWS Network Firewall), B (Service Control Policies), and E (AWS Firewall Manager) are correct. AWS Network Firewall provides stateful inspection to filter traffic across VPCs. Service Control Policies (SCPs) centrally manage permissions and enforce guardrails across all accounts in the organization.

AWS Firewall Manager centrally manages firewall rules, including AWS Network Firewall policies, across accounts. Option C (Security Groups) is incorrect because security groups are per-resource and cannot be centrally managed across accounts. Option D (AWS Config) is incorrect because AWS Config is for compliance monitoring and auditing, not for enforcing network security policies.

73
MCQhard

A company needs to ensure that all API calls to AWS services are logged and monitored for suspicious activity. Additionally, any API call that creates a security group rule should trigger an immediate notification. Which combination of services should be used?

A.VPC Flow Logs and Amazon CloudWatch
B.AWS CloudTrail and Amazon CloudWatch Events
C.AWS Config and Amazon SNS
D.AWS Shield and AWS WAF
AnswerB

CloudTrail logs API calls; CloudWatch Events can trigger alerts.

Why this answer

AWS CloudTrail records all API calls to AWS services, enabling logging and monitoring. Amazon CloudWatch Events (now Amazon EventBridge) can be configured to trigger notifications based on specific API events, such as creating a security group rule via the ec2:AuthorizeSecurityGroupIngress API call. Option A is incorrect because VPC Flow Logs capture network traffic metadata, not API calls.

Option C is incorrect because AWS Config evaluates resource configuration and compliance, not API call logging; Amazon SNS alone does not provide monitoring capabilities. Option D is incorrect because AWS Shield provides DDoS protection and AWS WAF is a web application firewall, neither of which log API calls.

74
MCQeasy

A company is using AWS Direct Connect to connect its on-premises network to AWS. The company wants to encrypt all traffic between its on-premises network and AWS. Which solution meets this requirement?

A.Use a public virtual interface (VIF) and route traffic through a NAT gateway.
B.Use a private VIF and establish an IPsec VPN tunnel over the Direct Connect connection.
C.Use a private virtual interface (VIF) and enable encryption on the Direct Connect connection.
D.Use a private VIF and enable TLS on all applications.
AnswerB

IPsec provides encryption over the Direct Connect link.

Why this answer

AWS Direct Connect does not natively encrypt traffic; it provides a private, dedicated network connection. To meet the encryption requirement, you can establish an IPsec VPN tunnel over the private VIF, which encrypts all traffic between the on-premises network and the VPC. This approach combines the low latency and reliability of Direct Connect with the security of IPsec encryption.

Exam trap

The trap here is that candidates assume Direct Connect inherently encrypts traffic because it is a private connection, but AWS explicitly states that Direct Connect does not provide encryption, so an overlay like IPsec is required.

How to eliminate wrong answers

Option A is wrong because a public VIF provides access to AWS public services (e.g., S3, DynamoDB) but does not encrypt traffic; routing through a NAT gateway adds no encryption and is unrelated to securing the Direct Connect link. Option C is wrong because Direct Connect does not support native encryption at the physical or link layer; there is no option to 'enable encryption' on the connection itself. Option D is wrong because TLS encrypts only application-layer traffic for specific protocols (e.g., HTTPS), not all IP traffic between networks; it does not provide a general-purpose, network-layer encryption solution.

75
MCQhard

A company is deploying a multi-tier web application on EC2 instances behind an Application Load Balancer (ALB). The security team requires that the web servers only accept traffic from the ALB and that the ALB only accepts traffic from the internet on ports 80 and 443. Additionally, the web servers should be able to make outbound connections to the internet for updates. Which combination of security group rules meets these requirements?

A.Use network ACLs instead: public subnet NACL allow 80/443 inbound, private subnet NACL allow from ALB on app port
B.ALB SG: inbound 0.0.0.0/0 on 80/443, outbound to web SG on app port; Web SG: inbound from ALB SG on app port, outbound to 0.0.0.0/0 on ephemeral
C.ALB SG: inbound 0.0.0.0/0 on 80/443, outbound deny all; Web SG: inbound from ALB SG on app port, outbound allow all
D.ALB SG: inbound 0.0.0.0/0 on 80/443, outbound to web SG on app port; Web SG: inbound from VPC CIDR on app port, outbound to 0.0.0.0/0 on ephemeral
AnswerB

Correct use of security group references.

Why this answer

The ALB security group should allow inbound from 0.0.0.0/0 on ports 80 and 443, and outbound to the web server security group on the application port. The web server security group should allow inbound from the ALB security group on the application port, and outbound to 0.0.0.0/0 on ephemeral ports to allow outbound internet access for updates. Option B correctly describes these rules.

Option A is incorrect because it suggests using NACLs instead, which are stateless and less granular for security group requirements. Option C is incorrect because the ALB outbound rule should allow traffic to web servers, not deny all. Option D is incorrect because the web server inbound should be from the ALB security group, not the VPC CIDR, to ensure only ALB traffic is received.

Page 1 of 6 · 397 questions totalNext →

Ready to test yourself?

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