AWS SAM Templates: Embedding Nested Applications from Amazon S3 Buckets

Embedding Nested Applications from Amazon S3 Buckets

Prev Question Next Question

Question

You are using AWS SAM templates to deploy a serverless application.

Which of the following resource will embed nested applications from Amazon S3 buckets?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer - B.

AWS::Serverless::Application resource in AWS SAM template is used to embed application from Amazon S3 buckets.

Option A is incorrect as AWS::Serverless::API is used for creating API Gateway resources & methods that can be invoked through HTTPS endpoints.

Option C is incorrect as AWS::Serverless::LayerVersion resource type creates Lambda layered function.

Option D is incorrect as AWS::Serverless::Function resource describes the configuration for creating Lambda function.

For more information on using AWS SAM templates, refer to the following URLs-

https://aws.amazon.com/blogs/compute/announcing-nested-applications-for-aws-sam-and-the-aws-serverless-application-repository/ https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-template.html

The correct answer is B. AWS::Serverless::Application.

AWS Serverless Application Model (AWS SAM) is an open-source framework that helps to build and deploy serverless applications on AWS. It extends AWS CloudFormation to provide a simplified way of defining the Amazon API Gateway APIs, AWS Lambda functions, and Amazon DynamoDB tables needed by your serverless application.

AWS::Serverless::Application resource type allows you to specify a nested application that is stored in an Amazon S3 bucket. The nested application can include AWS SAM templates, Lambda functions, APIs, and any other AWS resource that you want to include.

By using AWS::Serverless::Application resource, you can package and reuse complex sets of resources that you have created before in separate stacks. The nested application allows you to easily manage your infrastructure as code and reduce code duplication.

AWS::Serverless::API resource type is used to define an Amazon API Gateway REST API with the specified routes, methods, models, and integration to AWS Lambda functions.

AWS::Serverless::LayerVersion resource type is used to define a Lambda layer. It contains libraries, custom runtimes, or other dependencies that are reused across multiple Lambda functions.

AWS::Serverless::Function resource type is used to define an AWS Lambda function. It contains the code that is executed in response to an event.

In summary, only the AWS::Serverless::Application resource type allows you to embed nested applications from Amazon S3 buckets.