AWS::Serverless::Application
Embeds a serverless application from the Amazon Serverless Application Repository
Note
When you deploy to Amazon CloudFormation, Amazon SAM transforms your Amazon SAM resources into Amazon CloudFormation resources. For more information, see Generated Amazon CloudFormation resources for Amazon SAM.
Syntax
To declare this entity in your Amazon Serverless Application Model (Amazon SAM) template, use the following syntax.
YAML
Type: AWS::Serverless::Application Properties: Location:String | ApplicationLocationObjectNotificationARNs:ListParameters:MapTags:MapTimeoutInMinutes:Integer
Properties
- 
                Location
- 
                Template URL, file path, or location object of a nested application. If a template URL is provided, it must follow the format specified in the CloudFormation TemplateUrl documentation and contain a valid CloudFormation or SAM template. An ApplicationLocationObject can be used to specify an application that has been published to the Amazon Serverless Application Repository. If a local file path is provided, the template must go through the workflow that includes the sam deployorsam packagecommand, in order for the application to be transformed properly.Type: String | ApplicationLocationObject Required: Yes Amazon CloudFormation compatibility: This property is similar to the TemplateURLproperty of anAWS::CloudFormation::Stackresource. The CloudFormation version does not take an ApplicationLocationObject to retrieve an application from the Amazon Serverless Application Repository.
- 
                NotificationARNs
- 
                A list of existing Amazon SNS topics where notifications about stack events are sent. Type: List Required: No Amazon CloudFormation compatibility: This property is passed directly to the NotificationARNsproperty of anAWS::CloudFormation::Stackresource.
- 
                Parameters
- 
                Application parameter values. Type: Map Required: No Amazon CloudFormation compatibility: This property is passed directly to the Parametersproperty of anAWS::CloudFormation::Stackresource.
- 
                A map (string to string) that specifies the tags to be added to this application. Keys and values are limited to alphanumeric characters. Keys can be 1 to 127 Unicode characters in length and cannot be prefixed with aws:. Values can be 1 to 255 Unicode characters in length. Type: Map Required: No Amazon CloudFormation compatibility: This property is similar to the Tagsproperty of anAWS::CloudFormation::Stackresource. The Tags property in SAM consists of Key:Value pairs; in CloudFormation it consists of a list of Tag objects. When the stack is created, SAM will automatically add alambda:createdBy:SAMtag to this application. In addition, if this application is from the Amazon Serverless Application Repository, then SAM will also automatically the two additional tagsserverlessrepo:applicationId:andApplicationIdserverlessrepo:semanticVersion:.SemanticVersion
- 
                TimeoutInMinutes
- 
                The length of time, in minutes, that Amazon CloudFormation waits for the nested stack to reach the CREATE_COMPLETEstate. The default is no timeout. When Amazon CloudFormation detects that the nested stack has reached theCREATE_COMPLETEstate, it marks the nested stack resource asCREATE_COMPLETEin the parent stack and resumes creating the parent stack. If the timeout period expires before the nested stack reachesCREATE_COMPLETE, Amazon CloudFormation marks the nested stack as failed and rolls back both the nested stack and parent stack.Type: Integer Required: No Amazon CloudFormation compatibility: This property is passed directly to the TimeoutInMinutesproperty of anAWS::CloudFormation::Stackresource.
Return Values
Ref
When the logical ID of this resource is provided to the Ref intrinsic function, it returns the resource name of the underlying AWS::CloudFormation::Stack resource.
For more information about using the Ref function, see Ref in the Amazon CloudFormation User Guide. 
Fn::GetAtt
Fn::GetAtt returns a value for a specified attribute of this type. The following are
         the available attributes and sample return values. 
For more information about using Fn::GetAtt, see Fn::GetAtt in the Amazon CloudFormation User Guide. 
- Outputs.ApplicationOutputName
- 
                        The value of the stack output with name ApplicationOutputName
Examples
SAR Application
Application that uses a template from the Serverless Application Repository
YAML
Type: AWS::Serverless::Application Properties: Location: ApplicationId: 'arn:aws:serverlessrepo:us-east-1:012345678901:applications/my-application' SemanticVersion: 1.0.0 Parameters: StringParameter: parameter-value IntegerParameter: 2
Normal-Application
Application from an S3 url
YAML
Type: AWS::Serverless::Application Properties: Location: https://s3.amazonaws.com/sam-s3-demo-bucket/template.yaml