SAP-C01 Exam QuestionsBrowse all questions from this exam

SAP-C01 Exam - Question 875


A media company has a video-streaming application that runs on smart TVs. The application is written in HTML and JavaScript. A configuration exists for each smart TV type to control application behavior, such as whether the application should offer high-definition content. The configuration typically changes each quarter.

The company serves the application from a fleet of Amazon EC2 instances that handle the requests from the smart TVs. On each request, an application template and smart TV configuration are retrieved from Amazon S3 and are merged to produce the customized application.

The company's current solution produces high response times during peak load. The company wants to use Amazon CloudFront to deliver and cache the application.

Which combination of steps should a solutions architect take to meet these requirements? (Choose three.)

Show Answer
Correct Answer: ABF

To improve the response times and effectively cache the application using Amazon CloudFront, the solutions architect should take the following steps: Firstly, create a CloudFront distribution with the EC2 instances as an origin. This will allow CloudFront to cache the responses from EC2 instances, reducing the load on the instances and improving response times. Secondly, utilize a Lambda@Edge function to inspect the user agent in the request, determine the smart TV type, and modify the request URI to point to the appropriate application file in the S3 bucket. This enables dynamic customization based on the smart TV type. Lastly, modify the application build process to create a single application file for each configuration, upload the files to the S3 bucket with an incremented version number in the object name, and set up S3 webpage redirects to the latest version of the file. This ensures that new versions are easily accessible and cached by CloudFront, avoiding issues with stale content and improving content delivery efficiency.

Discussion

10 comments
Sign in to comment
sb333Options: BEF
Oct 3, 2022

Should be BEF E: EC2 is a custom origin, so that is what needs to be selected. F: By putting a version number in the application file name for each config, changes to the application files will result in the new files being cached by CloudFront. If you retain the same file name for each new application file, it will not cache the new file until the TTL of the cache expires (or you have to invalidate the cache, which takes time and costs money).

wassb
Oct 17, 2022

Great clarification. tx

pinhead900Options: BDE
Sep 23, 2022

Should be BDE, as EC2 is a custom origin: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DownloadDistS3AndCustomOrigins.html#concept_CustomOrigin

dcdcdc3Options: BEF
Oct 6, 2022

In support of sb333, AWS recommends filenames changed: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/UpdatingExistingObjects.html

Rocketeer
Sep 1, 2022

I think ABD

cloududeOptions: ABD
Sep 2, 2022

agree ABD

JohnPiOptions: BDE
Oct 12, 2022

The configuration typically changes each quarter.

nhatvuOptions: BDE
Oct 27, 2022

Agree BDE

AjayD123Options: BEF
Jan 21, 2023

Should be BEF

dev112233xxOptions: BEF
Apr 28, 2023

BEF makes more sense to me

WhyIronManOptions: BEF
Jul 16, 2024

Should be BEF If you retain the same file name for each new application file, it will not cache the new file until the TTL of the cache expires or invalidate the cache