Secured Architecture Flashcards
When creating a new security group, which of the following are true? (Choose two.)
A) All inbound traffic is allowed by default.
B) All outbound traffic is allowed by default.
C) Connections that are allowed in must also explicitly be allowed back out.
D) Connections that are allowed in are automatically allowed back out.
B, D. Option A is false, but option B is true. Default security groups prevent all traffic in and allow all traffic out. Options C and D are about whether or not a security group is stateful: whether an incoming connection automatically can get back out. Security groups are stateful, so D is true. If the subject of the question was a NACL, then option C would be true, as NACLs are stateless.
You have a government-regulated system that will store a large amount of data on S3 standard. You must encrypt all data and preserve a clear audit trail for traceability and third-party auditing. Security policies dictate that encryption must be consistent across the entire data store. Which of the following encryption approaches would be best?
A) SSE-C
B) SSE-KMS
C) SSE-C
D) Encrypt the data prior to upload to S3 and decrypt the data when returning it to the client.
B. D is not a good answer because relying on encryption outside of S3 does not best address the concerns around consistency. It is generally better to allow AWS to handle encryption in cases where you want to ensure all encryption is the same across a data store. SSE-C, SSE-KMS, and SSE-C all provide this. However, among those three, KMS is the best option for providing clear audit trails.
You are creating a bastion host to allow SSH access to a set of EC2 instances in a private subnet within your organization’s VPC. Which of the following should be done as part of configuring the bastion host? (Choose two.)
A) Ensure that the bastion host is exposed directly to the Internet.
B) Place the bastion host within the private subnet.
C) Add a route from the bastion host IP into the private subnet into the subnet’s NACLs.
D) Ensure that the bastion host is within the same security group as the hosts within the private subnet.
A, C. A bastion host is a publicly accessible host that allows traffic to connect to it. Then, an additional connection is made from the bastion host into a private subnet and the hosts within that subnet. Because the bastion must be accessed by public clients, it must be exposed to the Internet (A). If it is within a private subnet (B), it will not be accessible, making that answer incorrect. There also must be an explicit route from the bastion host into the private subnet (C); this is usually within a NACL. Finally, the security of the bastion must be different from the hosts in the private subnet. The bastion host should be hardened significantly as it is public, but also accessible; this is in many ways the opposite of the security requirements of hosts within a private subnet.
Which of the following are invalid IAM actions? (Choose two.)
A) Limiting the root account SSH access to all EC2 instances
B) Allowing a user account SSH access to all EC2 instances
C) Removing console access for the root account
D) Removing console access for all non-root user accounts
A, C. AWS sometimes asks questions like this to ensure that you understand that the root account is truly a root account and you cannot restrict that account’s access. Anything that involves removing access for the root account is always invalid.
Which of the following statements is true?
A) You should store application keys only in your application’s .aws file.
B) You should never store your application keys on an instance, in an AMI, or anywhere else permanent on the cloud.
C) You should only store application keys in an encrypted AMI.
D) You should only use your application key to log in to the AWS console.
B. This is a “gimme question” that AWS will often ask on exams. You should never store your application keys on an instance, in an AMI, or anywhere else permanent on the cloud—meaning option B is true. Additionally, D makes no sense; application keys are for programmatic access, not console access.
Your company is setting up a VPN connection to connect its local network to an AWS VPC. Which of the following components are not necessary for this setup? (Choose two.)
A) A NAT instance
B) A virtual private gateway
C) A private subnet in the AWS VPC
D) A customer gateway
A, C. Site-to-site VPN connections require a virtual private gateway (on the AWS side) and a customer gateway (on the local side). A private subnet is optional, but not required, as is a NAT instance.
You have a private subnet in a VPC within AWS. The instances within the subnet are unable to access the Internet. You have created a NAT gateway to solve this problem. What additional steps do you need to perform to allow the instances Internet access? (Choose two.)
A) Ensure that the NAT gateway is in the same subnet as the instances that cannot access the Internet.
B) Add a route in the private subnet to route traffic aimed at 0.0.0.0/0 at the NAT gateway.
C) Add a route in the public subnet to route traffic aimed at 0.0.0.0/0 at the NAT gateway.
D) Ensure that the NAT gateway is in a public subnet.
B, D. There are two pairs of answers here, and you need to choose the correct pair in each case. For private subnet instances, you need a route out to a NAT gateway, and that NAT gateway must be in a public subnet—otherwise, it would not itself be able to provide outbound traffic access to the Internet. That means option D is correct, as is answer B: 0.0.0.0/0 means “traffic with a destination in the Internet at large,” more or less.
Which of the following statements regarding NAT instances and NAT gateways are false? (Choose two.)
A) Both NAT instances and NAT gateways are highly available.
B) You must choose the instance type and size when creating a NAT gateway but not when creating a NAT instance.
C) It is your responsibility to patch a NAT instance and AWS’s responsibility to patch a NAT gateway.
D) You assign a security group to a NAT instance but not to a NAT gateway.
A, B. The easiest way to handle this question is by thinking of a NAT gateway as essentially a managed service and a NAT instance as an instance (which you manage) for networking. That helps identify B as false (you never choose instance types and sizes for managed services) and C as true (AWS patches managed services). Further, since AWS manages NAT gateways, they are automatically highly available and do not need you to associate security groups. This means that A is false—NAT instances can be made highly available, but not without your manual intervention—and D is true.
Which of the following statements is true?
A) A VPC’s default NACLs allow all inbound and outbound traffic.
B) NACLs are stateful.
C) Security groups are stateless.
D) Traffic allowed into a NACL is automatically allowed back out.
A. Option A is true, and if you know that, this is an easy question. However, it doesn’t seem obvious, as all custom NACLs disallow all inbound and outbound traffic. It is only a VPC’s default NACL that has an “allow all” policy. As for B and C, these are both reversed: NACLs are stateless (allowing independent configuration of inbound and outbound traffic) and security groups are stateful. This also explains why D is false: NACLs are stateless.
You have changed the permissions associated with a role, and that role is assigned to an existing running EC2 instance. When will the permissions you updated take effect for the instance?
A) Immediately
B) Within 5 minutes
C) Within 1 hour
D) The next time the EC2 instance is restarted
A. Permission changes to a role now take place immediately and apply to all instances using that role.
Which of the following statements is true?
A) When creating a new security group, by default, all traffic is allowed in, including SSH.
B) If you need inbound HTTP and HTTPS access, create a new security group and accept the default settings.
C) You must explicitly allow any inbound traffic into a new security group.
D) Security groups are stateless.
C. If an allow-everything doesn’t set off alarm bells, the reference to SSH should. Security groups, by default, don’t allow any traffic in. They require you to explicitly allow inbound traffic (C); the other options are all false. And security groups are stateful—remember this, as it will come up in almost every single exam.
Which of the following statements is not true?
A) When creating a new security group, by default, no inbound traffic is allowed.
B) When creating a new security group, by default, all traffic is allowed out, including SSH.
C) When creating a new security group, by default, all traffic is allowed out, with the exception of SSH.
D) When creating a new security group, inbound HTTPS traffic is not allowed.
C. All outbound traffic is allowed to pass out of a VPC by default, although no inbound traffic is allowed.
How would you enable encryption of your EBS volumes?
A) Use the AWS CLI with the aws security command.
B) Take a snapshot of the EBS volume and copy it to an encrypted S3 bucket.
C) Select the encryption option when creating the EBS volume.
D) Encrypt the volume using the encryption tools of the operating system of the EC2 instance that has mounted the EBS volume.
C. EBS volumes can be encrypted when they are created. All other options typically affect snapshots of the volume, but not the volume itself.
What types of rules does a security group allow? (Choose two.)
A) Allow rules
B) Prevent rules
C) Deny rules
D) Inbound rules
A, D. Security groups only contain allow rules, not deny rules (and prevent rules are not an actual rule type). Then, you can create both inbound and outbound rules.
Which of the following are true about security groups? (Choose two.)
A) You can specify deny rules, but not allow rules.
B) By default, a security group includes an outbound rule that allows all outbound traffic.
C) You can specify specific separate rules for inbound and outbound traffic.
D) Security groups are stateless.
B, C. You specify allow rules for security groups, so A is false. B and C are true: Default security groups allow all outbound traffic, and you specify separate inbound and outbound rules. Finally, security groups are stateful, not stateless, so D is false.
Which of the following are not true about security groups? (Choose two.)
A) Allow rules take priority over deny rules.
B) Responses to allowed inbound traffic are allowed to flow back out.
C) You can specify specific separate rules for inbound and outbound traffic.
D) If there are no outbound rules, then all outbound traffic is allowed to flow out.
A, D. A is false, as security groups don’t provide for deny rules. B and C are both true (and therefore are not correct answers). D is false, because without specific outbound rules, nothing is allowed to flow out. (Note that by default, there is an allowance for all outgoing traffic in security groups, although that can be removed.)
Which of the following must a security group have when you create it? (Choose two.)
A) At least one inbound rule
B) A name
C) A description
D) At least one outbound rule
B, C. A security group can actually have no inbound or outbound rules, so A and D are not required. A security group does require a name and description, though.
Which of the following is a security group associated with?
A) An ELB
B) A network interface
C) An ALB
D) A network access list
B. A security group can be attached to multiple constructs, like an EC2 instance, but is ultimately associated with a network interface, which in turn is attached to individual instances. This is a tough question and probably at the very edge of what the exam might ask.
Which of the following are default rules on a default security group, such as the one that comes with the default VPC? (Choose two.)
A) Outbound: 0.0.0.0/0 for all protocols allowed
B) Inbound: 0.0.0.0/0 for all protocols allowed
C) Outbound: ::/0 for all protocols allowed
D) Inbound: ::/0 for all protocols allowed
A, C. The easiest way to work this is to recognize that default security groups never allow broad inbound traffic. That eliminates B and D and leaves rules that allow all outbound traffic for both IPv4 (A) and IPv6 (C).
Which of the following are parts of a security group rule? (Choose two.)
A) A protocol
B) A subnet
C) An instance ID
D) A description
A, D. Security group rules have a protocol and a description. They do not have a subnet, although they can have CIDR blocks or single IP addresses. Instances can associate with a security group, but a security group does not itself refer to a specific instance.
Which of the following allows you to securely upload data to S3? (Choose two.)
A) HTTP endpoints using HTTP
B) SSL endpoints using HTTPS
C) HTTP endpoints using HTTPS
D) SSL endpoints using HTTP
B, C. They key here is not the endpoint, but the actual protocol used to access the endpoint. In this case, HTTPS is secure, while HTTP is not, so the answers using HTTPS—B and C—are correct.
Which of the following describes client-side encryption for S3 bucket data?
A) You encrypt and upload data to S3, managing the encryption process yourself.
B) You encrypt and upload data to S3, allowing AWS to manage the encryption process.
C) You request AWS to encrypt an object before saving it to S3.
D) You encrypt an object, but AWS uploads and decrypts the object.
A. Client-side encryption involves the client (you, in this example) managing the entire encryption and decryption process. AWS only provides storage.
Which of the following describes server-side encryption for S3 bucket data?
A) You encrypt and upload data to S3, managing the encryption process yourself.
B) You encrypt and upload data to S3, allowing AWS to manage the encryption process.
C) You request AWS to encrypt an object before saving it to S3.
D) You encrypt an object, but AWS uploads and decrypts the object.
C. With server-side encryption, AWS handles all the object encryption and decryption.
Which of the following are valid steps in enabling client-side encryption for S3? (Choose two.)
A) Download the AWS CLI and SSH to your S3 key store.
B) Use a KMS-managed customer master key.
C) Download an AWS SDK for encrypting data on the client side.
D) Turn on bucket encryption for the target S3 buckets.
B, C. For client-side encryption, you’ll need a master key, which can either be a KMS-managed key (option B) or a client-side master key. You’ll also need an SDK for encrypting the client-side data (C).
Which of the following is not a way to manage server-side encryption keys for S3?
A) SSE-S3
B) SSE-KMS
C) SSE-E
D) SSE-C
C. You’ll probably simply need to memorize this one. SSE-S3, SSE-KMS, and SSE-C are all valid approaches to S3 encryption; SSE-E is made up.
Which of the following encryption key management options is best for ensuring strong audit trails?
A) SSE-S3
B) SSE-KMS
C) Client-side encryption keys
D) SSE-C
B. The word audit should be a trigger for you: always choose KMS when you see a need for strong auditing. SSE-KMS provides a very good audit trail and security, perhaps the best of all these options for most use cases.
Which of the following encryption key management options is best for managing keys but allowing S3 to handle the actual encryption of data?
A) SSE-S3
B) SSE-KMS
C) Client-side encryption keys
D) SSE-C
D. SSE-C allows the customer (the C in SSE-C) to manage keys, but S3 then handles the actual encryption of data.
You have a customer that has a legacy security group that is very suspicious of all things security in the cloud. The customer wants to use S3, but doesn’t trust AWS encryption, and you need to enable its migration to the cloud. What option would you recommend to address the company’s concerns?
A) SSE-S3
B) SSE-KMS
C) Client-side encryption keys
D) SSE-C
C. Client-side encryption allows the customer to manage keys and encrypt data themselves, then store the data on S3 already encrypted. There’s a lot of overhead with this approach, but it’s ideal for the use case described.
You want to begin encrypting your S3 data, but your organization is new to encryption. Which option is a low-cost approach that still offloads most of the work to AWS rather than the organization new to encryption?
A) SSE-S3
B) SSE-KMS
C) Client-side encryption keys
D) SSE-C
A. In general, SSE-S3 is the “starter” option for encryption. It’s by no means a simple or amateur approach to security, but it is low cost compared to KMS and has much less overhead than client-side or SSE-C encryption keys.
You are the architect for a company whose data must comply with current EU privacy restrictions. Which of the following S3 buckets are valid options? (Choose two.)
A) Buckets in EU Central 1
B) Buckets in US East 2
C) Buckets in EU West 1
D) Buckets in SA East 1
A, C. Here, you must recognize that EU West and EU Central are both EU regions and the other two options are not.
Which of the following options could be used to provide availability-zone-resilient fault-tolerant storage that complies with EU privacy laws? (Choose two.)
A) S3 buckets in US West 1
B) S3 buckets in EU West 2
C) S3-IA buckets in EU Central 1
D) S3 One Zone-IA buckets in EU-West-1
B, C. Option A isn’t valid because US-West isn’t an EU region. Options B and C are valid as they both provide EU regions, and S3 and S3-IA both can survive the loss of an availability zone; option D would not survive the loss of an AZ.
What type of replication will your Multi-AZ RDS instances use?
A) Offline replication
B) Synchronous replication
C) Push replication
D) Asynchronous replication
B. Multi-AZ RDS instances use synchronous replication to push changes.
You want to provide maximum protection against data in your S3 object storage being deleted accidentally. What should you do?
A) Enable versioning on your EBS volumes.
B) Turn on MFA Delete on your S3 buckets.
C) Set up a Lambda job to monitor and block delete requests to S3.
D) Turn off the DELETE endpoints on the S3 REST API.
B. MFA Delete is the most powerful anti-deletion protection you can provide without disabling delete via IAM roles. Option A doesn’t affect your object storage—EBS is block storage. Options C and D both won’t help; delete requests can’t be blocked by Lambda, and there is no “DELETE endpoint” on the S3 API.
You want to provide maximum protection against data in your S3 object storage being deleted accidentally. What steps should you take? (Choose two.)
A) Enable versioning on your S3 buckets.
B) Turn on MFA Delete on your S3 buckets.
C) Enable versioning in CloudWatch’s S3 API.
D) Remove IAM permissions for deleting objects for all users.
A, B. MFA Delete is the right option here (B), but A is a required step to enable MFA Delete. Option C doesn’t actually make sense, and while option D would technically prevent all deletions, it isn’t what the question is asking: You must prevent accidental deletions, not remove the ability to delete objects altogether.
You want to enable MFA Delete on your S3 buckets in the US East 1 region. What step must you take before enabling MFA Delete?
A) Disable the REST API for the buckets on which you want MFA Delete.
B) Enable cross-region replication on the buckets on which you want MFA Delete.
C) Move the buckets to a region that supports MFA Delete, such as US West 1.
D) Enable versioning on the buckets on which you want MFA Delete.
D. You must enable versioning to enable MFA Delete. The region of the bucket doesn’t have any effect here (B and C), and there is no way to disable the REST API (A), although you could remove programmatic access via IAM or removal of access keys.
What is AWS Trusted Advisor?
A) An online resource to help you improve performance
B) An online resource to help you reduce cost
C) An online resource to help you improve security
D) All of the above
D. AWS Trusted Advisor does all three of the above: improve performance, reduce cost, and improve security.
On which of the following does AWS Trusted Advisor not provide recommendations?
A) Reducing cost
B) Improving fault tolerance
C) Improving security
D) Organizing accounts
D. AWS Trusted Advisor provides advice on cost, fault tolerance, performance, and security but does not address account organization.
Which of the following are included in the core AWS Trusted Advisor checks? (Choose two.)
A) S3 bucket permissions
B) MFA on root account
C) Quantity of CloudWatch alarms
D) Use of VPC endpoints
A, B. Here, it’s not reasonable to memorize the seven core AWS Trusted Advisor checks. Instead, consider which of these are valid improvements that Trusted Advisor might make. A and B relate to security and permissions, while both C and D are pretty far afield of cost, security, or performance suggestions.
Which of the following recommendations might AWS Trusted Advisor make? (Choose two.)
A) Turn on MFA for the root account.
B) Turn on antivirus protection for EC2 instances.
C) Update S3 buckets with public write access.
D) Update NAT instances to NAT gateways.
A, C. This is tricky. First, MFA on the root account is a standard recommendation, so you can select that. For the remaining three answers, the one that is most directly a “common security recommendation” would have to be S3 buckets with write access, and that is the correct answer.
Which of the following is not possible using IAM policies?
A) Requiring MFA for the root account
B) Denying the root account access to EC2 instances
C) Disabling S3 access for users in a group
D) Restricting SSH access to EC2 instances to a specific user
B. The only one of these that’s not possible with IAM is denying the root account access to EC2 instances. That’s not possible—with IAM or any other mechanism.
Which of the following are not true about S3 encryption? (Choose two.)
A) S3 applies AWS-256 encryption to data when server-side encryption is enabled.
B) S3 encryption will use a client key if it is supplied with data.
C) Encrypted EBS volumes can only be stored if server-side encryption is enabled.
D) S3 will accept locally encrypted data if client-side encryption is enabled.
B, C. A is true, and D is true; if you know this, choosing B and C is simple. Otherwise, you need to recognize that just supplying a client key to S3 is not enough; some form of client-side encryption or server-side encryption using client keys must be enabled. EBS volumes can be encrypted outside of S3 and stored regardless of how S3 is encrypting data.
What types of data are encrypted when you create an encrypted EBS volume? (Choose two.)
A) Data at rest inside the volume
B) Data moving between the volume and the attached instance
C) Data inside S3 buckets that store the encrypted instance
D) Data in an EFS on instances attached to the volume
A, B. There are four types of data encrypted when an EBS volume is encrypted: data at rest on the volume, data moving between the volume and the instance, any snapshots created from the volume, and any volumes created from those snapshots.
What types of data are not automatically encrypted when you create an encrypted EBS volume? (Choose two.)
A) A snapshot created from the EBS volume
B) Any data on additional volumes attached to the same instance as the encrypted volume
C) Data created on an instance that has the encrypted volume attached
D) Data moving between the volume and the attached instance
B, C. This is tricky, as both answers that involve unencrypted data have some tricky wording. First, B is not a case of encryption; if data never touches the encrypted volume, it is not automatically encrypted. Second, for C, data that is on the instance but never moves to the encrypted volume is also not automatically encrypted.
What of the following types of data is not encrypted automatically when an encrypted EBS volume is attached to an EC2 instance?
A) Data in transit to the volume
B) Data at rest on the volume
C) Data in transit from the volume
D) All of these are encrypted.
D. All of these are encrypted. Data moving to and from the volume as well as data at rest on the volume are all encrypted.
What encryption service is used by encrypted EBS volumes?
A) S3-KMS
B) S3-C
C) KMS
D) Customer-managed keys
C. KMS is used as the encryption service, but this is not the S3-KMS that is specific to S3 encryption. You will also sometimes see this KMS referenced as AWS-KMS.
How can you access the private IP address of a running EC2 instance?
A) http://169.254.169.254/latest/user-data/
B) http://169.254.169.254/latest/instance-data/
C) http://169.254.169.254/latest/meta-data/
D) http://169.254.169.254/latest/ec2-data/
C. This is a case of pure memorization. The URL is always http://169.254.169.254 and the metadata, which is what you want, is at /latest/meta-data/.
If you take a snapshot of an encrypted EBS volume, which of the following will be true? (Choose two.)
A) The snapshot will be encrypted.
B) All data on the bucket on which the snapshot is stored will be encrypted.
C) Any instances using the snapshot will be encrypted.
D) Any volumes created from the snapshot will be encrypted.
A, D. Encryption of a volume affects snapshots of the volume and instances created from that snapshot, but nothing else.
If you take a snapshot of an encrypted EBS volume, which of the following must you do to use that snapshot as a volume in a separate region? (Choose two.)
A) Copy the snapshot to the new region.
B) Delete the snapshot from the old region.
C) Unencrypt the snapshot once it is in the new region.
D) Create a new volume from the snapshot in the new region.
A, D. The only steps required here are to copy the snapshot to the new region (usually via the console), and then create a new volume from it.
How do you encrypt an RDS instance?
A) Enable encryption on the running instance via the CLI.
B) Enable encryption on the running instance via the console.
C) Run the encryption process on the running instance via the console.
D) Enable encryption when creating the instance.
D. You cannot encrypt a running instance; you have to create the instance with encryption enabled.
Which of the following will ensure that data on your RDS instance is encrypted?
A) Use client-side encryption keys.
B) Enable encryption on the running RDS instance via the AWS API.
C) Encrypt the instance on which RDS is running.
D) None of these will encrypt all data on the instance.
D. You cannot encrypt a running RDS instance, so B is incorrect, and you have no access to the underlying instance for RDS, so C is also incorrect. Option A sounds possible, but it will not address any data created by the database itself (such as indices, references to other data in the database, etc.). The only way to encrypt an RDS instance is to encrypt it at creation of the instance.
Which of the following will allow you to bring a non-encrypted RDS instance into compliance with an “all data must be encrypted at rest” policy?
A) Snapshot the RDS instance and restore it, encrypting the new copy upon restoration.
B) Use the AWS Database Migration Service to migrate the data from the instance to an encrypted instance.
C) Create a new encrypted instance and manually move data into it.
D) None of these will encrypt all data on the instance.
C. The only option here is the manual one. You must set up encryption when creating a new instance from scratch (snapshots won’t work) and then move data into it so that this data is encrypted as it moves into the new instance.
Which of the following will allow you to bring a non-encrypted EBS volume into compliance with an “all data must be encrypted at rest” policy?
A) Stop the volume, snapshot it, and encrypt a copy of the snapshot. Then restore from the encrypted snapshot.
B) Stop the volume, select “Turn on encryption,” and restart the volume.
C) Encrypt the volume via the AWS API and turn on the “encrypt existing data” flag.
D) None of these will encrypt all data on the volume.
A. You cannot encrypt an existing volume “on the fly.” You must create a snapshot and then encrypt that snapshot as you copy it to another, encrypted snapshot. You can then restore from that new snapshot.
Which of the following will allow you to bring a non-encrypted EBS volume into compliance with an “all data must be encrypted at rest” policy?
A) Stop the volume, create a snapshot, and restart from the snapshot, selecting “Encrypt this volume.”
B) Stop the volume, select “Turn on encryption,” and restart the volume.
C) Encrypt the volume via the AWS API and turn on the “encrypt existing data” flag.
D) None of these will encrypt all data on the volume.
D. None of these will work. The important thing to remember for a question like this is that you must make a copy of an unencrypted snapshot to apply encryption. There is no in-place encryption mechanism for volumes or snapshots.
Which of the following will allow you to bring a non-encrypted EBS volume into compliance with an “all data must be encrypted at rest” policy?
A) Create a new volume, attach the new volume to an EC2 instance, copy the data from the non-encrypted volume to the new volume, and then encrypt the new volume.
B) Create a new volume with encryption turned on, attach the new volume to an EC2 instance, and copy the data from the non-encrypted volume to the new volume.
C) Create a new volume, attach the new volume to an EC2 instance, and use the encrypted-copy command to copy the data from the non-encrypted volume to the new volume.
D) None of these will encrypt all data on the volume.
B. The only way to encrypt an EBS volume is to encrypt it at creation time. Remembering this one detail will help on lots of questions in this vein.
Which of the following are valid options on an EBS volume? (Choose two.)
A) Encrypt the volume.
B) Encrypt a snapshot of the volume.
C) Encrypt a copy of a snapshot of the volume.
D) Restore an encrypted snapshot to an encrypted volume.
C, D. You cannot encrypt an existing EBS volume, so A is incorrect. And you cannot encrypt a snapshot that is unencrypted, so B is incorrect. You can encrypt a copy of a snapshot and restore an encrypted snapshot to a volume that is encrypted (C and D).
Which of the following are not true about EBS snapshots? (Choose two.)
A) Snapshots of encrypted volumes are automatically encrypted.
B) When you copy an encrypted snapshot, the copy is not encrypted unless you explicitly specify.
C) You cannot copy an encrypted snapshot unless you unencrypt the snapshot first.
D) Volumes that are created from encrypted snapshots are automatically encrypted.
B, C. Snapshots of encrypted volumes stay encrypted—whether you copy them (B and C) or create volumes from them (D). So A and D are true, while B and C are false.
Can you copy a snapshot across AWS accounts?
A) Yes
B) Yes, but you first have to modify the snapshot’s access permissions.
C) Yes, but you have to be the owner of both AWS accounts.
D) No
B. You can copy snapshots across accounts, but the default permissions do not allow this. So you have to modify those permissions, and then the snapshot can be copied to any other AWS account, regardless of account owner.
You have a snapshot of an EBS volume in US East 2. You want to create a volume from this snapshot in US West 1. Is this possible?
A) Yes, create the volume in US West 1 based upon the snapshot in US East 2.
B) Yes, but you’ll need to copy the snapshot to US West 1 first.
C) Yes, but you’ll need to create the instance in US East 2 and then move it to US West 1.
D) No
B. You can only create volumes from snapshots in the same region. Since the instance is desired in US West 1, a copy of the snapshot must be made in that region first, so B is correct.
Can you copy an EBS snapshot across regions?
A) Yes, as long as the snapshot is not encrypted.
B) Yes, as long as the snapshot is marked for multi-region use.
C) Yes
D) No
C. You can copy a snapshot to a different region without any special considerations.
Which of the following does a security group attached to an instance control? (Choose two.)
A) Inbound traffic
B) HTTP error messages
C) Outbound traffic
D) Access control lists
A, C. Security groups control the inbound and outbound traffic allowed into and out of instances.
How many security groups can you attach to a single instance in a VPC?
A) None, security groups aren’t attached to instances.
B) 1
C) 1 or more
D) 2 or more
C. An instance must have a security group but can have more than that.
Which of the following can be added to a VPC, in addition to security groups on included instances, to further secure the VPC?
A) A NACL
B) A port filter
C) An ALB
D) A flow log
A. In addition to security groups, NACLs (network access control lists) can be used to further refine inbound and outbound routing into and out of a VPC. Security groups are attached to instances, and NACLs to VPCs, building a complete security picture of your VPC and its instances.
Which of the following statements is true about a custom, user-created NACL?
A) A NACL by default allows all traffic out of a VPC.
B) A NACL by default allows all traffic into a VPC.
C) A NACL is a virtual firewall for associated subnets.
D) A NACL functions at the instance level.
C. NACLs are virtual firewalls, and they operate at the subnet and VPC level rather than at an individual instance level. Also note the words custom, user-created. The default NACL does allow in and out all traffic; created NACLs do not.
What do you use to permit and restrict control of a NACL?
A) VPC
B) WAF
C) AWS Organizations
D) IAM
D. IAM roles and permissions control access to NACLs.
Which of these are true about security groups? (Choose two.)
A) Support allow and deny rules
B) Evaluate all rules before deciding whether to allow traffic
C) Operate at the instance level
D) Apply to all instances in the associated subnet
B, C. Security groups support only allow rules (A is false). They do evaluate all rules (B is true) and operate at the instance level (C is true). D is false, as security groups aren’t associated with a subnet.
Which of these are true about security groups? (Choose two.)
A) Stateful
B) Stateless
C) Process rules in order
D) Associated with an instance
A, D. Security groups are stateful and are associated with an instance (or instances), so A and D are true. They are not stateless, and they process all rules rather than processing rules in order.
Which of these are true about NACLs? (Choose two.)
A) Stateful
B) Stateless
C) Process rules in order
D) Associated with an instance
B, C. NACLs are stateless; rules must be specified for traffic going both in and out (so A is false, and B is true). They also process rules in order (C is true). They’re associated with subnets, not a particular instance (so D is false).
Which of these are true about NACLs? (Choose two.)
A) Apply to all instances in an associated subnet
B) Only apply if no security group is present
C) Support allow and deny rules
D) Evaluate all rules before deciding whether to allow or disallow traffic
A, C. NACLs are associated with a subnet (A) and support both allow and deny rules (C). B is false; NACLs and security groups work together. D is false, as rules are processed in order.
In which order are NACLs and security groups evaluated?
A) NACLs and security groups are evaluated in parallel.
B) A NACL is evaluated first, and then the security group.
C) A security group is evaluated first, and then the NACL.
D) It depends on the VPC setup.
B. NACLs are always evaluated first because they exist at the border of a subnet. As security groups are attached to instances, they are not processed until traffic passes through the NACL and into the instance’s subnet.
Which of these statements are true? (Choose two.)
A) A security group can apply to two instances at the same time.
B) A NACL applies to all instances within a subnet at the same time.
C) A security group can apply to only one instance at the same time.
D) A NACL can apply to only one instance at the same time.
A, B. Both security groups and NACLs can—and usually do—apply to multiple instances in a subnet. The NACL applies to all instances within the associate subnet, and a security group can be associated with multiple instances.
With which of the following is a NACL associated?
A) An instance
B) A subnet
C) A VPC
D) A NACL can be associated with all of these.
B. NACLs are associated with subnets.
Which of the following are true about the default NACL that comes with the default VPC? (Choose two.)
A) It allows all inbound traffic.
B) It allows all outbound traffic.
C) It disallows all inbound traffic.
D) It disallows all outbound traffic.
A, B. The default NACL allows in and out all traffic, which is somewhat unintuitive. Keep in mind that the default security group disallows inbound traffic, but the default NACL allows that traffic in.
Which of the following are true about a user-created NACL? (Choose two.)
A) It allows all inbound traffic.
B) It allows all outbound traffic.
C) It disallows all inbound traffic.
D) It disallows all outbound traffic.
C, D. Unlike the default NACL that comes with the default VPC, custom NACLs disallow all inbound and outbound traffic by default.
In which order are rules in a NACL evaluated?
A) From low to high, using the number on the rule
B) From high to low, using the number on the rule
C) From low to high, using the port of the rule
D) From high to low, using the port of the rule
A. Each rule in a NACL has a number, and those rules are evaluated using those numbers, moving from low to high.
Which of the following statements is not true? (Choose two.)
A) A network ACL has separate inbound and outbound rules.
B) Network ACLs are stateful.
C) Each subnet in your VPC must be associated with a NACL.
D) A network ACL can only be associated with a single subnet.
B, D. A and C are true. B is false; NACLs are stateless. D is false, because a NACL can be associated with multiple subnets.
With how many subnets can a NACL be associated?
A) One
B) One or more
C) A NACL is associated with instances, not subnets.
D) A NACL is associated with VPCs, not subnets.
B. A NACL is associated with a subnet, not an instance or VPC. It can be associated with a single subnet or multiple subnets.
With how many NACLs can a subnet be associated?
A) One
B) One or more
C) A subnet is associated with security groups, not NACLs.
D) A subnet is associated with VPCs, not NACLs.
A. A subnet is associated with a NACL. However, a subnet can only be associated to a single NACL at a time.
What happens when you associate a NACL with a subnet that already is associated with a different NACL?
A) Nothing, both NACLs are associated with the subnet.
B) You receive an error. You must remove the first NACL to associate the new one.
C) You receive an error. You must first merge the two NACLs to apply them to a subnet.
D) The new NACL replaces the previous NACL, and the subnet still only has one NACL association.
D. A subnet is associated with a NACL but can only be associated to a single NACL at a time.
Which of the following are part of a network ACL rule? (Choose two.)
A) An ASCII code
B) A rule number
C) An IAM group
D) A protocol
B, D. NACL rules have a rule number, a protocol, a choice of ALLOW or DENY, and a CIDR range and port or port range for inbound and outbound traffic.
Which of the following are part of a network ACL rule? (Choose two.)
A) An ALLOW or DENY specification
B) A CIDR range
C) An IP address
D) A VPC identifier
A, B. NACL rules have a rule number, a protocol, a choice of ALLOW or DENY, and a CIDR range and port or port range for inbound and outbound traffic.
Which of the following inbound rules of a custom NACL would be evaluated first?
A) Rule #800 // HTTP // TCP // 80 // 0.0.0.0/0 -> ALLOW.
B) Rule #100 // HTTPS // TCP // 443 // 0.0.0.0/0 -> ALLOW.
C) Rule * // All // All // All // 0.0.0.0/0 -> DENY.
D) Rule #130 // RDP // TCP // 3389 // 192.0.2.0/24 -> ALLOW.
B. Almost none of this detail actually matters. The only key parameter is the rule number. NACLs evaluate lowest-numbered rules first, so Rule #100 would go first, option B.
If all of the following inbound rules existed on a custom NACL, would SSH traffic be allowed?
Rule #800 // HTTP // TCP // 80 // 0.0.0.0/0 -> ALLOW
Rule #100 // HTTPS // TCP // 443 // 0.0.0.0/0 -> ALLOW
Rule * // All // All // All // 0.0.0.0/0 -> DENY
Rule #130 // RDP // TCP // 3389 // 192.0.2.0/24 -> ALLOW
A) Yes, SSH is included as a default protocol on NACLs.
B) Yes, SSH is included in the HTTPS protocol.
C) Only if the SSH access permission in IAM is granted.
D) No
D. SSH is not explicitly mentioned, so it is not allowed on a custom NACL. Every protocol must explicitly be mentioned.
If all of the following inbound rules existed on the default VPC’s default NACL, would SSH traffic be allowed?
A) Rule #800 // HTTP // TCP // 80 // 0.0.0.0/0 -> ALLOW
B) Rule #100 // HTTPS // TCP // 443 // 0.0.0.0/0 -> ALLOW
C) Yes, the default VPC’s default NACL allows all inbound traffic by default.
D) Yes, SSH is included in the HTTPS protocol.
E) Only if the SSH access permission in IAM is granted.
F) No
A. SSH is not explicitly mentioned, but because the question asks about the default NACL on the default VPC, all traffic is allowed in unless explicitly denied.
If all of the following inbound rules existed on a custom NACL, would SSH traffic be allowed?
A) Rule #800 // HTTP // TCP // 80 // 0.0.0.0/0 -> ALLOW
B) Rule #100 // HTTPS // TCP // 443 // 0.0.0.0/0 -> ALLOW
C) Rule #140 // All // All // All // 0.0.0.0/0 -> DENY
D) Rule #120 // SSH // TCP // 22 // 192.0.2.0/24 -> ALLOW
E) Yes
F) Yes, but only from the CIDR block 192.0.2.0/24.
Only if the SSH access permission in IAM is granted.
A) No
B. SSH is allowed here, but only from a specific CIDR block.
If all of the following inbound rules existed on a custom NACL, would SSH traffic be allowed?
A) Rule #800 // HTTP // TCP // 80 // 0.0.0.0/0 -> ALLOW
B) Rule #100 // HTTPS // TCP // 443 // 0.0.0.0/0 -> ALLOW
C) Rule #110 // All // All // All // 0.0.0.0/0 -> DENY
D) Rule #120 // SSH // TCP // 22 // 192.0.2.0/24 -> ALLOW
E) Yes
F) Yes, but only from the CIDR block 192.0.2.0/24.
Only if the SSH access permission in IAM is granted.
A) No
D. While there is a rule allowing SSH from the CIDR block 192.0.2.0/24, that rule would be evaluated after the lower-numbered rule 110, which disallows any traffic not allowed in from lower-numbered rules (in this case, just rule #100).
Which of the following is the most accurate statement about what the following inbound rule on a NACL will do?
A) Rule #120 // SSH // TCP // 22 // 192.0.2.0/24 -> ALLOW
B) Allows inbound SSH traffic to the associated subnets
C) Allows inbound TCP traffic to the associated subnets
D) Allows inbound TCP traffic to the associated subnets from the CIDR block 192.0.2.0/24
E) Allows inbound SSH traffic to the associated subnets from the CIDR block 192.0.2.0/24
D. Technically, B and C are correct; SSH is a type of TCP traffic. However, that is not the most specific answer, which is what the question asks. A is partially correct but does not call out the CIDR block limitation that D does. Therefore, D is the most accurate answer.
Which of the following is the most accurate statement about what the following inbound rule on a NACL will do?
A) Rule #120 // HTTP // TCP // 80 // 0.0.0.0/0 -> ALLOW
B) Allows inbound HTTP traffic to the associated subnets
C) Allows inbound IPv4 HTTP traffic to the associated subnets as long as it is not prevented by lower-numbered rules
D) Allows inbound IPv4 HTTP traffic to the associated subnets
E) Allows inbound IPv4 TCP traffic to the associated subnets
B. The most accurate answer here includes several components: the type of TCP traffic (HTTP), the allowed source CIDR block (the entire Internet), and IPv4. This rule does not explicitly allow IPv6 traffic. Further, this rule is only effective if there are no lower-numbered rules that short-circuit this rule.
What does the CIDR block 0.0.0.0/0 represent?
A) The entire Internet
B) The entire Internet, limited to IPv4 addresses
C) The entire Internet, limited to IPv6 addresses
D) Inbound traffic from the entire Internet
B. 0.0.0.0/0 represents IPv4 addresses, and the entire Internet. However, a CIDR block does not represent any type of traffic, inbound or outbound.
What does the CIDR block ::/0 represent?
A) The entire Internet
B) The entire Internet, limited to IPv4 addresses
C) The entire Internet, limited to IPv6 addresses
D) Inbound traffic from the entire Internet
C. ::/0 represents IPv6 addresses, and the entire Internet. However, a CIDR block does not represent any type of traffic, inbound or outbound.
Which of the following rules allows IPv6 outbound traffic to flow to the entire Internet through a NAT gateway with the ID nat-123456789?
A) 0.0.0.0/0 -> NAT -> nat-123456789
B) ::/0 -> nat-123456789
C) 0.0.0.0/0 -> nat-123456789
D) ::/0 -> NAT -> nat-123456789
B. ::/0 represents IPv6 addresses, so the answer must be either B or D. The route should go from all IPv6 addresses to the ID of the NAT gateway, which is nat-123456789. There is no intermediate -> NAT that should be inserted into the routes.
How many availability zones in a single region does a single VPC span?
A) None, VPCs do not span availability zones.
B) One
C) At least two
D) All of them
D. A VPC spans all the availability zones in a region.
Which of these must be specified when creating a new VPC? (Choose two.)
A) An availability zone
B) A region
C) A CIDR block
D) A security group
B, C. You must always select a region to create a VPC, and you must always provide a CIDR block. VPCs span all the AZs in a region, so that is not required, and security groups are associated at the instance level rather than at the VPC level.
How many subnets can be added to an availability zone within a VPC?
A) None
B) One
C) One or more
D) At least two
C. For a single VPC, you can add one or more subnets to each availability zone within that VPC.
To how many availability zones within a region can a single subnet in a VPC be added?
A) None
B) One
C) One or more
D) At least two
B. A subnet cannot span availability zones. It can be added to a single AZ.
How many availability zones can a subnet span?
A) None
B) One
C) One or more
D) At least two
B. A subnet cannot span availability zones. It can be added to a single AZ and can only exist within that single AZ.
How many IPv6 CIDR blocks can be assigned to a single VPC?
A) None
B) One
C) One or more
D) At least two
B. A VPC can have a single primary CIDR block assigned to it for IPv4 addresses and an optional IPv6 CIDR block. While you can add secondary IPv4 CIDR blocks, you cannot add additional CIDR blocks for IPv6 at this time.
How many IPv4 CIDR blocks can be assigned to a single VPC?
A) None
B) One
C) One or more
D) At least two
C. A VPC can have a single primary CIDR block assigned to it for IPv4 addresses and an optional IPv6 CIDR block. However, you can add additional secondary CIDR blocks to a VPC (up to four).