Serverless Solution for Dynamic Content | AWS Certified Developer - Associate Exam DVA-C01 | Amazon

Serverless Solution for Dynamic Content

Prev Question Next Question

Question

An organization deployed their static website on Amazon S3

Now, the Developer has a requirement to serve dynamic content using a serverless solution.

Which combination of services should be used to implement a serverless application for the dynamic content? Select 2 answers from the options given below.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

Answer - A and D.

Out of the above list, Given the scenario, API Gateway and AWS Lambda are the best two choices to build this serverless application.

The AWS Documentation mentions the following.

AWS Lambda lets you run code without provisioning or managing servers.

You pay only for the compute time you consume - there is no charge when your code is not running.

For more information on AWS Lambda, please refer to the below Link-

https://aws.amazon.com/lambda/

Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale.

For more information on the API gateway, please refer to the below Link-

https://aws.amazon.com/api-gateway/

Option B is incorrect because EC2 is not a serverless offering.

To use serverless compute on Cloud, you can use Lambda.

Option C is incorrect because ECS is primarily used for hosting containers and serverless offering for the same solution is Fargate.

Option E is incorrect because Kinesis Data Streams is a scalable and durable real-time data streaming service that can continuously capture gigabytes of data per second from hundreds of thousands of sources.

It is not required in this scenario.

To serve dynamic content using a serverless solution with a static website hosted on Amazon S3, the following two services should be used:

  1. Amazon API Gateway: It is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. It can be used to create APIs that integrate with AWS Lambda functions, which are used to serve the dynamic content. The API Gateway provides features such as caching, throttling, and request/response transformation, which can help improve the performance and security of the API.

  2. AWS Lambda: It is a serverless compute service that allows developers to run code without provisioning or managing servers. Developers can use Lambda to execute code in response to events, such as API requests, and can integrate with other AWS services, such as Amazon API Gateway. Lambda functions can be written in a variety of programming languages and can be scaled automatically based on the number of requests.

Together, Amazon API Gateway and AWS Lambda can be used to create a serverless application that serves dynamic content in response to API requests. The API Gateway can act as the front-end for the application, accepting requests from clients and routing them to the appropriate Lambda function. The Lambda function can then execute the necessary logic to generate the dynamic content and return it to the client through the API Gateway.

The other options listed in the question are not relevant to this scenario:

  1. Amazon EC2: It is a web service that provides resizable compute capacity in the cloud. However, it requires the provisioning and management of servers, which is not a requirement for a serverless solution.

  2. AWS ECS: It is a container orchestration service that allows developers to run and scale Docker containers. It is not directly relevant to serving dynamic content in a serverless fashion.

  3. Amazon Kinesis: It is a streaming data service that can be used to process and analyze real-time data streams. It is not directly relevant to serving dynamic content in a serverless fashion.