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).