Skip to Content

SOA-C02: What is the MOST cost-effective way to access web application through CloudFront

Question

A company runs a web application that users access using the name www example com. The company manages the domain name example.com using Amazon Route 53. The company created an Amazon CloudFront distribution in front of the application and would like www.example.com to access the application through CloudFront. What is the MOST cost-effective way to achieve this?

A. Create a CNAME record in Amazon Route 53 that points to the CloudFront distribution URL.
B. Create an ALIAS record in Amazon Route 53 that points to the CioudFront distribution URL.
C. Create an A record in Amazon Route 53 that points to the public IP address of the web application,
D. Create a PTR record in Amazon Route 53 that points to the public IP address of the web application.

Answer

B. Create an ALIAS record in Amazon Route 53 that points to the CioudFront distribution URL.

Explanation 5

The correct answer is B. Create an ALIAS record in Amazon Route 53 that points to the CloudFront distribution URL.

This solution can achieve the goal of accessing the web application through CloudFront using www.example.com in the most cost-effective way because:

  • It can create a DNS record that maps www.example.com to the CloudFront distribution URL. Amazon Route 53 is a service that provides reliable and scalable DNS routing for your domains. You can use Route 53 to create different types of DNS records, such as A, CNAME, ALIAS, or PTR, to point your domain names to your AWS resources or other endpoints. An ALIAS record is a Route 53-specific extension of a CNAME record that can map one DNS name to another DNS name. You can use an ALIAS record to point www.example.com to the CloudFront distribution URL, which is a DNS name that identifies your CloudFront distribution.
  • It can leverage the benefits of using Amazon CloudFront for your web application. Amazon CloudFront is a service that provides fast and secure content delivery for your web applications. You can use CloudFront to distribute your web content, such as HTML, CSS, JavaScript, images, or videos, to a global network of edge locations that are closer to your users. This can improve the performance, availability, and security of your web application.
  • It can avoid any additional charges or limitations for using Route 53. Unlike CNAME records, which charge you for each query that they receive, ALIAS records are free of charge for queries that are resolved within AWS. This means that you do not pay anything extra for using an ALIAS record to point www.example.com to the CloudFront distribution URL. Moreover, unlike CNAME records, which cannot be used at the zone apex (the root domain name), ALIAS records can be used at any level of a domain name. This means that you can use an ALIAS record to point example.com (without www) to the CloudFront distribution URL as well.

The other options are incorrect because:

  • Option A is incorrect because creating a CNAME record in Amazon Route 53 that points to the CloudFront distribution URL would not be as cost-effective as using an ALIAS record. A CNAME record is a type of DNS record that maps one DNS name to another DNS name. You can use a CNAME record to point www.example.com to the CloudFront distribution URL, which is a DNS name that identifies your CloudFront distribution. However, unlike ALIAS records, CNAME records charge you for each query that they receive, which can increase your Route 53 costs. Additionally, unlike ALIAS records, CNAME records cannot be used at the zone apex (the root domain name), which means that you cannot use a CNAME record to point example.com (without www) to the CloudFront distribution URL.
  • Option C is incorrect because creating an A record in Amazon Route 53 that points to the public IP address of the web application would not allow you to access the web application through CloudFront using www.example.com. An A record is a type of DNS record that maps a DNS name to an IPv4 address. You can use an A record to point www.example.com to the public IP address of your web application, which is an IPv4 address that identifies your EC2 instance or load balancer. However, this would bypass CloudFront and directly access your web application from its origin server. This would not leverage the benefits of using CloudFront for your web application, such as improved performance, availability, and security.
  • Option D is incorrect because creating a PTR record in Amazon Route 53 that points to the public IP address of the web application would not allow you to access the web application through CloudFront using www.example.com. A PTR record is a type of DNS record that maps an IPv4 address to a DNS name. You can use a PTR record to point the public IP address of your web application to www.example.com, which is a DNS name that identifies your domain name. However, this would not affect how you access your web application from your web browser. A PTR record is mainly used for reverse DNS lookup, which is a process of finding the domain name associated with an IP address. A PTR record does not affect how you access your web application from its domain name.

Therefore, the best solution to access the web application through CloudFront using www.example.com in the most cost-effective way is to create an ALIAS record in Amazon Route 53 that points to the CloudFront distribution URL.

Reference

Amazon AWS Certified SysOps Administrator – Associate certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Amazon AWS Certified SysOps Administrator – Associate exam and earn Amazon AWS Certified SysOps Administrator – Associate certification.