Define application resources in your Amazon SAM template - Amazon Serverless Application Model
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Define application resources in your Amazon SAM template

You define the Amazon resources your serverless application uses in the Resources section of your Amazon SAM template. When you define a resource, you identify what the resource is, how it interacts with other resources, and how it can be accessed (that is, the permissions of the resource).

The Resources section of your Amazon SAM template can contain a combination of Amazon CloudFormation resources and Amazon SAM resources. Additionally, you can use Amazon SAM's short-hand syntax for the following resources:

Amazon SAM short-hand syntax

What it does with a related Amazon resource

AWS::Serverless::Api

Creates a collection of API Gateway resources and methods that can be invoked through HTTPS endpoints.

AWS::Serverless::Application

Embeds a serverless application from the Amazon Serverless Application Repository or from an Amazon S3 bucket as a nested application.

AWS::Serverless::Connector

Configures permissions between two resources. For an introduction to connectors, see Managing resource permissions with Amazon SAM connectors.

AWS::Serverless::Function

Creates an Amazon Lambda function, an Amazon Identity and Access Management (IAM) execution role, and event source mappings that trigger the function.

AWS::Serverless::GraphQLApi

creates and configures an Amazon AppSync GraphQL API for your serverless application.

AWS::Serverless::HttpApi

Creates an Amazon API Gateway HTTP API, which enables you to create RESTful APIs with lower latency and lower costs than REST APIs.

AWS::Serverless::LayerVersion

Creates a Lambda LayerVersion that contains library or runtime code needed by a Lambda Function.

AWS::Serverless::SimpleTable

Creates a DynamoDB table with a single attribute primary key.

AWS::Serverless::StateMachine

Creates an Amazon Step Functions state machine, which you can use to orchestrate Amazon Lambda functions and other Amazon resources to form complex and robust workflows.

The above resources are also listed in Amazon SAM resources and properties.

For reference information for all the Amazon resource and property types Amazon CloudFormation and Amazon SAM support, see Amazon resource and property types reference in the Amazon CloudFormation User Guide.