Ops excellent Architecture Flashcards
How many times will a message be delivered when using a standard SQS queue?
A) Once and only once
B) At least once
C) Once for each request of the relevant message in the queue
D) The answer is application dependent.
B. AWS does guarantee that all SQS messages will be delivered at least once, but the message may be delivered more than once (making option A incorrect). This is not related to the number of requests to the queue or the applications using the queue; therefore, both C and D are incorrect. This leaves B, the correct answer.
Which of the following services allow you to access the underlying operating system? (Choose two.)
A) RDS
B) EC2
C) EMR
D) DynamoDB
B, C. This is a common question AWS often asks to ensure that you understand that managed services like RDS and DynamoDB are indeed completely managed: You cannot access the underlying operating system of the service. This leaves EC2 and EMR as the remaining, and correct, answers. While EMR does provide you with a lot of functionality “out of the box,” it still allows root level access, as do EC2 instances.
You are using an SQS queue in your web application. You are able to confirm that messages in the queue are being picked up by application instances for processing, but then nothing happens for over 12 hours. Then, after that period of time, the message appears in the queue again and processing restarts. What could be occurring?
A) The SQS queue has a visibility timeout that is set too high. The timeout should be reduced so that application instances can process the message more quickly.
B) SQS messages expire every 12 hours and must be reentered into the queue. The time that the message is invisible triggers the queue to ask for and receive the message from the original sender.
C) Processing is failing, or not completing, in the application instance. The message disappears because the SQS queue keeps it “invisible” for 12 hours while it is being processed. The message is then returned to the queue for processing if not handled prior to that timeout.
D) Your SQS queue needs to be restarted; it is likely not correctly queuing messages. The polling interval is also set too high, causing the long lack of visibility of the message.
C. SQS queues have a visibility timeout that controls how long a message in the queue is marked as “invisible” while being processed. This accounts for the message “disappearing.” Then, if application processing fails—as in option C—the message is remarked as visible and is available for processing again. Option A correctly notes this timeout, but reducing the timeout would not cause the message to be processed correctly. It would just reduce the time that the message is “invisible.” Option B is not how queues work; they cannot ask a sender to resend a message. Option D is incorrect as well, as the queue is operating as intended with regard to visibility of messages and timeouts.
Which of the following is a valid method of performing actions on an EBS snapshot?
A) Use the AWS console with a username and password.
B) Use the AWS CLI with an application key.
C) Use the AWS REST APIs with an application key.
D) All of the above
E) None of the above
D. Snapshots are accessible through the console via username/password and through AWS CLI and APIs via application key.
Which of the following is most like a mailing list?
A) SQS
B) SNS
C) SWF
D) S3
B. SNS is the Simple Notification Service and functions like a mailer, sending out notifications that can be subscribed to by other applications.
In which of the following managed services are messages not pushed?
A) SQS
B) SNS
C) SWF
D) Redshift
A. SNS sends out notifications to subscribed listeners, and SWF pushes out messages as they arrive. Only SQS holds messages until the queue is polled. Redshift is not a messaging service at all but rather a data warehousing solution.
In which of the following managed services can messages be pulled by an application?
A) SWF
B) SQS
C) SNS
D) S3
B. SNS and SWF operate on a push approach. SQS holds messages until they are pulled out of the queue. S3 is not a message store.
Which of the following managed services guarantees single assignment of a message?
A) S3
B) SQS
C) SNS
D) SWF
D. Both SWF and SQS deliver a message at least once, but only SWF guarantees that a message will only be delivered a single time.
Which of the following managed services calls the messages it receives tasks?
A) S3
B) SWF
C) SNS
D) SQS
B. Messages in SWF are tasks; messages in SQS are messages; messages in SNS are notifications. S3 is a storage solution, not a messaging solution.
Which of the following managed services calls the messages it receives notifications?
A) S3
B) SWF
C) SNS
D) SQS
C. Messages in SWF are tasks; messages in SQS are messages; messages in SNS are notifications. S3 is not a messaging solution at all.
Which of the following managed services calls the messages it receives “messages”?
A) S3
B) SWF
C) SNS
D) None of these
D. Messages in SWF are tasks; messages in SQS are messages; messages in SNS are notifications. S3 is not a message store. Since SQS is not an option, the answer is D, none of these.
Which of the following managed services coordinates activities between different applications?
A) S3
B) SNS
C) SWF
D) SQS
C. SWF is more than a simple queue. It automates workflow, moving a task (what SWF calls its messages) from one application component to the next in a predetermined order.
What does SWF stand for?
A) Simple Workflow Foundation
B) Simple Workflow Service
C) Sequential Workflow Service
D) Synchronous Workflow Foundation
B. SWF is not exactly a true acronym. It stands for Simple Workflow Service but is not represented by SWS. Instead, the WF refers to workflow.
What services are suitable for running compute-intensive custom scripts? (Choose two.)
A) EC2
B) S3
C) Redshift
D) ECS
A, D. Both EC2 and ECS provide environments on which your custom code can run, and both are compute services. S3 is a storage service, and Redshift is a data warehousing solution. While Redshift can be helpful in analysis of data, it is not suitable for running custom scripts.
Which AWS service is ideal for hosting a website while requiring the least amount of AWS staff and knowledge?
A) S3 website hosting
B) Amazon Lightsail
C) EC2
D) ECS
B. Of the choices available, Amazon Lightsail is the easiest solution for getting simple applications running quickly. EC2 and ECS are both much more complex. While S3 website hosting is a web hosting solution, it does require quite a bit of AWS knowledge (security, permissions, etc.).
You have a registered AMI using an EBS volume as a root device, created from a volume snapshot. However, you have detected malicious code running in the EBS volume and want to remove the AMI and delete the EBS volume and its snapshot. What steps are required? (Choose two.)
A) Immediately delete the EBS volume snapshot.
B) Immediately deregister the AMI.
C) After the EBS volume has been deleted, deregister the AMI.
D) After the AMI has been deregistered, remove the AMI, and delete the EBS volume and its snapshot.
B, D. An EBS snapshot cannot be deleted if it is the root device of a registered AMI while that AMI is in use. You’ll need to deregister the AMI first (B), and then you can delete the EBS volume and any snapshots and stop using the AMI.
Which of the following AWS CLI commands is used to operate upon EBS volumes?
A) aws ec2 [command]
B) aws ebs [command]
C) aws instance [command]
D) You cannot operate upon EBS volumes directly from the AWS CLI.
A. EBS is considered a subset of EC2 functionality. Therefore, you use the aws ec2 commands; for example, aws ec2 delete-snapshot.
You have a website running at applestoapples.net. However, many of your users have mistakenly entered in applestoapples.com as the URL in their browser. To correct this, you’ve recently purchased the additional domain applestoapples.com and now want to point all requests to this domain to applestoapples.net. Which DNS record set would you use?
A) MX
B) AAAA
C) CNAME
D) A
C. A records are used to point a specific domain or subdomain to an IP address. CNAMEs point to a different URL, which in turn can be resolved further by DNS. In this case, you’d want to create a CNAME record for applestoapples.com and point that record to applestoapples.net and then let DNS resolve that domain. Using an A record means you’d have to lock the record to a specific IP rather than the domain name for applestoapples.net. That’s a problem, though, as over time, the domain may be served by different resources with different IP addresses, making the A record dated and incorrect.
Your website has mostly static content, but you are adding a new section driven by an EC2 instance fleet behind an Elastic Load Balancer. You want to create a subdomain and direct all traffic to that subdomain toward the ELB. Which DNS record set would you use?
A) CNAME
B) AAAA
C) SOA
D) MX
A. A records are used to point a specific domain or subdomain to an IP address. CNAMEs point to URLs or other domain names. In this case, since you’re pointing at an ELB, you’d need to use a CNAME, as ELBs don’t expose a public IP address.
Your domain is hosted and managed by Route 53. You want to create a new subdomain and point it to a fleet of EC2 instances behind an application load balancer. What is the best approach to this?
A) Create an A record and configure it as an alias to the ALB.
B) Create a CNAME record pointed at the URL of the ALB.
C) Create an A record pointed at the IP address of the ALB.
D) Set the ALB to send a redirect header to clients with the IP addresses of the currently active EC2 instances.
A. This is a little trickier in terms of picking the best answer. It is possible to set a CNAME up and point that at the ALB’s URL (B). However, AWS prefers that you use an A record and configure it as an alias record, allowing you to direct traffic to the ALB. This is different than a standard A record, which can only point at an IP address. Option C is incorrect because ALBs don’t expose an IP address, and D doesn’t even make sense in this context.
Does Route 53 supports zone apex records?
A) Yes, for all domains
B) Yes, but only for domains hosted on AWS
C) Yes, but only for services hosted on AWS
D) No
A. AWS supports zone apex records for all domains. A zone apex record is a DNS record at the root, or apex, of a DNS zone. So amazon.com is an apex record (sometimes called a naked domain record). Route 53 absolutely will support zone apex records and allows alias records (of A type) at this level as well.
Which of the following statements are false? (Choose two.)
A) Route 53 does not allow aliases for naked domain names.
B) Route 53 supports zone apex records.
C) Route 53 allows aliases for domains hosted on AWS.
D) Route 53 only supports zone apex records for AWS-hosted services.
A, D. First, A is false. A zone apex record is a DNS record at the root, or apex, of a DNS zone. So amazon.com is an apex record (sometimes called a naked domain record). Route 53 absolutely will support zone apex records and allows alias records (of A type) at this level as well. D is also false; Route 53 supports zone apex records for AWS and non-AWS domains and services.