Cost-effective Architecture Flashcards
You have a data analysis application that uses high compute instances along with RDS to do biological analysis on large datasets. The computations are not time sensitive and can be run anytime throughout the day. However, because of the high compute resources required, the processing is quite expensive. What could you do to defray these costs? (Choose two.)
A) Purchase reserved instances and pay entirely up front for the instance usage charges.
B) Use the spot market, setting a bid price lower than the current on-demand pricing.
C) Lower the instance class to a less costly class and allow the processing to run longer at lower per-instance costs.
D) Contact AWS and ask for discounted instance pricing based on your recurring usage.
A, B. When instance cost is the issue, the answers are almost always to consider some form of lowered instance pricing. AWS provides reserved instances and spot instances and the spot market for this purpose. Further, paying for reserved instances all up front is the most cost-effective means of getting reserved instances. Therefore, A and B are correct. C is problematic, as running a smaller instance for longer is not necessarily any cheaper than running a large instance for shorter amounts of time. Option D has some validity, but AWS is almost certainly going to point you back to either reserved instances or the spot market (A and B).
Which of the following are valid payment options for reserved instances? (Choose two.)
A) Actual usage pricing
B) Predictive pricing
C) All up-front pricing
D) Nothing up-front pricing
C, D. Reserved instances can be paid for in no up-front, partial up-front, and all up-front models, where all up-front is the least expensive and no up-front is the most expensive.
How do you move a reserved instance from one region to another?
A) Shut the instance down, change its region via the console or CLI, and restart the instance.
B) Contact your AWS billing resource to manually move the instance and its associated billing.
C) Make a snapshot of the instance, copy the snapshot to the new region, and start the instance from the snapshot.
D) You cannot move reserved instances across regions.
D. Reserved instances are locked to the region in which they are created, so D is correct. You would need to create a new reserved instance in the new region.
Which of the following allows you the least expensive access to compute resources?
A) On-demand instances
B) Reserved instances
C) Spot instances
D) Dedicated hosts
C. This should be an easy correct answer: Spot instances via the spot market are the potentially least expensive option, given that your compute has flexible timing and needs.
Which of the following are not reasons to select an on-demand instance? (Choose two.)
A) Applications with short-term, spiky workloads
B) Applications that have flexible start and end times
C) Applications with steady-state usage
D) Applications being developed or tested on EC2 for the first time
B, C. Applications with spiky workloads are reasons to use on-demand, as on-demand can scale up and down quickly. Flexible start and end times is a criterion for choosing spot instances, and steady-state usage is ideal for reserved instances. Anytime you’re testing a new application, on-demand is a good choice
Which of the following are reasons to select a spot instance? (Choose two.)
A) Applications with short-term, spiky workloads
B) Applications that have flexible start and end times
C) Applications with steady-state usage
D) Applications that are only feasible at very low compute prices
B, D. Applications with spiky workloads are reasons to use on-demand, as on-demand can scale up and down quickly. Flexible start and end times is a criterion for choosing spot instances, and steady-state usage is ideal for reserved instances. Spot instances also make heavy compute affordable when it would not be on other instance types.
Which of the following are not reasons to select a reserved instance? (Choose two.)
A) Applications that may require reserved capacity
B) Applications with steady-state usage
C) Users with urgent computing needs for large amounts of additional capacity
D) Users that cannot make any up-front payment or long-term commitment
C, D. The first option is easy, as it actually has reserved in the wording. Steady-state usage is also a use case for reserved instances, to gain cost savings. Large and immediate additional capacity needs are best facilitated by spot instances, and on-demand instances are best for users with no initial payment ability.
Which of the following are reasons to select the S3 standard storage class? (Choose two.)
A) Need for high durability
B) Need for highest available throughput
C) Infrequent access of objects
D) Objects can easily be re-created if lost.
A, B. S3 shares the durability of all S3 storage classes at 11 9s. It also provides the highest availability throughput of all S3 storage classes. Infrequent access is a use case for S3-IA, while the ability to re-create objects would suggest S3 One Zone-IA.
You are the architect for a web application that exists on a cluster of EC2 instances all within an Auto Scaling group. During periods of high activity, the group scales up— adding instances—and then quickly scales back down. However, this occurs multiple times within a two-hour window, incurring significant costs. How could you reduce costs while ensuring that demand is still met? (Choose two.)
A) Modify the Auto Scaling group’s cool-down timers.
B) Modify the Auto Scaling group to use scheduled scaling.
C) Lower the CloudWatch alarm threshold that causes the Auto Scaling group to scale up.
D) Modify the CloudWatch alarm period that causes the Auto Scaling group to scale down.
A, D. The problem here is that instances are scaling down too quickly. This results in them then being restarted, which incurs cost. The solutions here should be ones that cause instances to stay around a bit longer, which meets demand. Both A and D do this. Cool-down timers increase the time for the group to ensure that previous scaling actions were completed (A), and the CloudWatch alarm period for scaling down should also be increased (D).
Your company needs a storage solution that can support millions of customers accessing billing data. The data should be instantly accessible for users, but individual bills are not accessed that often. What is the most cost-efficient storage for this use case?
A) Glacier with expedited retrieval
B) S3 with Transfer Acceleration
C) Standard S3
D) S3-IA
D. This is a pretty “by the book” question, and in this case, is the exact use case for which S3-IA (Infrequent Access) was built. Instant access with less frequent requests is ideal for S3-IA.
Is the S3-IA storage class less expensive than S3?
A) Yes
B) No
C) Their costs are identical.
D) It depends on how the storage class is used.
A. S3-IA is less expensive than S3, regardless of use case. It is certainly possible that S3-IA is not appropriate for a certain use case, but it is less expensive on a “per byte retrieved” case.
You have a website running on a fleet of EC2 instances behind an ELB. You also have an Auto Scaling group running across multiple availability zones. The instances are serving files from an EFS file system, but you are incurring lag and significant cost from serving these files from disk over and over. What would you recommend as a solution for reducing costs while still handling high traffic without degradation?
A) Move the files into S3 standard.
B) Use Elastic Transcoder to reduce the file sizes.
C) Cache the files using CloudFront.
D) Use reserved EC2 instances instead of on-demand instances.
C. CloudFront will allow you to cache files that are frequently accessed. In this case, that should actually reduce costs. While CloudFront does incur a new additional cost, it would likely be offset by reduced egress from the EFS as well as the compute of additional EC2 instances to handle requests.
You have a large archive of documents that must be backed up. The documents will be accessed very infrequently, if at all. However, when the documents are accessed, they must be delivered within 10 minutes of a retrieval request. What is the most cost-effective option for storing these documents?
A) S3
B) S3-IA
C) Glacier
D) Glacier with expedited retrieval
D. All the description here suggests using Glacier. The documents are a large archive, and many will never be accessed. However, the requirement for quick retrieval points to a need for expedited retrieval. Glacier with expedited retrieval is still going to cost less than S3-IA for access that isn’t that frequent.
Your application has a 200 GB database running on an EC2 instance. You cannot move the database to RDS because of a custom spatial plug-in. The application is currently peaking in the morning and the evening, but the peaks are small and usage throughout the day is minimal. You need to ensure solid performance but keep costs low. What storage type would you use?
A) EFS
B) EBS with a General Purpose SSD
C) EBS with a provisioned IOPS SSD
D) EBS with a magnetic HDD
B. First, EBS is a much better choice than EFS for a single-instance application. While a database would certainly benefit from IOPS, there’s no need; peaks are small, and usage overall is low. A General Purpose SSD is sufficient here.
Which EBS volume type is most appropriate for use with a large database workload?
A) EBS with a throughput optimized HDD
B) EBS with a General Purpose SSD
C) EBS with a provisioned IOPS SSD
D) EBS with a magnetic HDD
C. If you have a larger database workload, provisioned IOPS SSD is ideal.
Which of the following is the least expensive EBS volume type?
A) Throughput optimized HDD
B) General Purpose SSD
C) Provisioned IOPS SSD
D) Cold HDD
D. A cold HDD is the least expensive EBS volume type.
Your application currently stores all its data on EBS volumes. You want to ensure that these volumes are backed up durably. However, you also want to use as few different managed services as possible in order to keep backup costs low. What option would you recommend?
A) Take regular EBS snapshots manually.
B) Set up a Lambda function to take EBS snapshots and trigger the function through CloudWatch alarms.
C) Create a script to copy the EBS data to S3 and run it on an EC2 instance.
D) Mirror data across two EBS volumes.
A. This is a tough question. You can eliminate B and C because both involve additional services: CloudWatch, Lambda, and additional EC2 instances. Taking EBS snapshots is good, and by moving those snapshots into S3 (which is the default), you get durability automatically. Mirroring data is also a great option—providing fault tolerance—but this does not provide a durability component, something the question specifically requires. Therefore, A is the best answer.
You are the architect for a highly available and highly scalable accounting application. All transaction records in the application’s data stores must be available for immediate retrieval for three months, but then they should be purged to reduce storage costs. How can you most easily address this requirement?
A) Store the transaction records on EBS and delete the volume after three months.
B) Store the transaction records in S3 and use lifecycle management to delete the records after three months.
C) Store the transaction records in Glacier and use lifecycle management to delete the records after three months.
D) Store the transaction records in EBS and use lifecycle management to delete the records after three months.
B. There are two components to this question: which storage medium is appropriate, and how should older records be deleted. To get both immediate retrieval and lifecycle management, you’d need S3, as in option B. (Also, EBS does not offer lifecycle management, in option D.)
You have heavy load on an RDS data instance. You want to avoid the overhead and cost of upgrading the instance to a larger instance size. What other options should you consider? (Choose two.)
A) RDS read replicas
B) RDS Multi-AZ
C) ElastiCache
D) Kinesis
A, C. RDS read replicas would take some of the read load off of the database instance, as would ElastiCache. The first allows reads to go to other instances, and the second caches already accessed data.
You are in charge of storage for large datasets at a predictive analytics firm. You are tasked with minimizing storage costs. You need to store data 30–59 days old in a storage class that makes the data immediately available and data older than 60 days in a class that makes the data available within 10 hours. You want to use the least expensive classes available. Which two storage classes would you choose? (Choose two.)
A) S3 standard
B) S3 Infrequent Access
C) S3 RRS
D) Glacier
B, D. Glacier is the easy choice, as it can handle the oldest data and still meet the 10-hour retrieval time. S3 RRS is deprecated and shouldn’t be considered. This leaves S3 and S3-IA. S3-IA is always less expensive than S3, so it’s the better option here.
You want to optimize performance and cost of your application by creating a placement group rather than hosting separate copies of your application in multiple availability zones. Across how many availability zones can a placement group span?
A) One
B) One or more
C) Two or more
D) Placement groups are not in availability zones.
B. Placement groups are typically in a single availability zone, but now spread placement groups can be placed across availability zones.
Across how many availability zones can a spread placement group be stretched?
A) One
B) One or more
C) Two or more
D) Placement groups are not in availability zones.
B. It is typical to think of a spread placement group as a group spread across availability zones, but that is a misnomer. The spread in spread placement group means that the instances are spread across distinct underlying hardware, and although they can be spread across availability zones, they don’t have to be.
How many instances can run in a single availability zone for a spread placement group?
A) One
B) Five
C) Seven
D) Nine
C. A spread placement group can have a maximum of seven running instances per AZ.
Which of the following are advantages of a spread placement group over using non-grouped instances? (Choose two.)
A) A spread placement group can span peered VPCs in the same region.
B) A spread placement group is less expensive than the same number of on-demand instances not in a group.
C) A spread placement group allows instances to talk with negligible network lag.
D) A spread placement group reduces IO in an instance within that group.
A, C. Spread placement groups primarily offer reduced network lag between instances (C). They also allow for cross-VPC spanning of instances (A).
Which of the following statements about placement groups is false?
A) A spread placement group can span peered VPCs in the same region.
B) A clustered placement group has instances all in a single availability zone.
C) A spread placement group allows instances to talk across regions without network lag.
D) A clustered placement group involves fewer availability zones than a spread placement group.
C. The only false statement here is C: Spread placement groups cannot be set up across regions, and therefore this entire statement is untrue.
Which of the following actions incur costs within AWS? (Choose two.)
A) Data ingress from the Internet
B) Data egress to the Internet
C) Transferring data across regions
D) Transferring data from one instance to another within the same availability zone
B, C. Egress always has a cost associated with it (B), while ingress is always free. Transferring data across regions is treated the same as transfers to the Internet. Only inter-AZ data transfer is guaranteed to be costless (D), making C the other correct answer.
Which of the following costs the least?
A) Retrieving a file from S3 to a local desktop client
B) An instance retrieving data from S3 in the same region
C) Uploading a file to S3 from a local desktop client
D) An instance retrieving data from S3 in a different region
C. The least cost is always going to be “free,” so look for anything that might be ingress. In this cost, uploading to S3 is straight ingress and is therefore free and the cheapest option.
Which of the following costs the least?
A) Retrieving a file from S3 to a local desktop client
B) An instance retrieving data from another instance in the same availability zone
C) An instance storing data in S3 in a different region
D) An instance retrieving data from S3 in a different region
B. There are no ingress options here, so nothing is guaranteed to be free. In that case, you should then look for something that moves data within the same availability zone. That’s always the least expensive (and usually free, depending on IP addresses), and in this case, that’s option B: inter-AZ data transfer between instances.
Which of the following might help reduce data transfer costs? (Choose two.)
A) Set up CloudFront to cache content.
B) Ensure that any instances communicating with other instances in the same region have private IP addresses.
C) Set up an RDS instance with read replicas.
D) Set up S3 buckets with versioning.
A, B. First, CloudFront is always a good option. It’s free to move data from EC2 to CloudFront, so that could reduce how far data must travel, and associated costs. Then, private IPs allow for communication that doesn’t route out to the Internet, and generally AWS charges less for communication from private IP to private IP.
Which of the following is not a level of AWS support?
A) Developer
B) Free tier
C) Enterprise
D) Business
B. Although there is a free tier, it’s a billing option and not an actual support level. That makes B the non-level in this answer set.
Which of the following is reduced as part of AWS’s total cost of ownership approach?
A) Developer salaries
B) DevOps salaries
C) Capital expenditures
D) Organizational head count
C. AWS reduces the need for large capital expenditures and provides a pay-as-you-go model instead.
Which of the following payment models does AWS employ to reduce total cost of ownership?
A) Pay up front
B) Pay-as-you-go
C) Pay after use
D) Quarterly pay
B. AWS uses a pay-as-you-go model for all of its services.
Which of the following is not a key tenet of the AWS pricing philosophy?
A) Pay-as-you-go
B) Pay less when you reserve.
C) Pay less per unit by using more.
D) Pay more only when AWS grows.
D. D is incorrect; you actually pay even less as AWS grows, due to economies of scale.
Which of the following is not a pricing model for instances?
A) On demand
B) Reserved
C) Migration only
D) Spot instance
C. “Migration only” is not a pricing model for instances. The only model not mentioned here is dedicated hosts.
When calculating total cost of ownership, what instance pricing model does AWS suggest using?
A) On demand
B) Reserved
C) Dedicated hardware
D) Spot instance
B. AWS suggests using reserved instance pricing in TCO calculations, as it is closest to on-premises servers in an apples-to-apples comparison.
How does the cost of standard reserved instances compare with the cost of on-demand instances?
A) Standard reserved instances cost significantly less than on-demand instances.
B) Standard reserved instances cost about the same as on-demand instances.
C) Standard reserved instances cost significantly more than on-demand instances.
D) Standard reserved instances cost a little bit less than on-demand instances.
A. Standard reserved instances often provide up to a 75% discount as compared to on-demand instances.
Which of the following is not a valid payment option for reserved instances?
A) No upfront
B) Partial upfront
C) Half upfront
D) All upfront
C. There is no “half upfront” payment option. The valid options are no upfront, partial upfront, and all upfront.