aws / aws/aws-sam-cli

sam publish supports publishing applications recursively

Open
#1,443 3 comments 11 reactions 0 assignees View on GitHub
area/nested-stacks area/publish maintainer/need-response type/feature
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

### Describe your idea/feature/enhancement

sam publish command currently only publish the template to SAR. But if the template has nested applications in it that is referenced to local templates, it does not publish the nested applications.

For example, I have the following two templates:

parent.template.yaml
```
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'

Metadata:
AWS::ServerlessRepo::Application:
Name: parent-application
Description: >-
This is my parent application.
Author: luhong
SpdxLicenseId: Apache-2.0
SemanticVersion: 0.1.1
LicenseUrl: LICENSE
ReadmeUrl: README.md

Resources:
NestedApp:
Type: 'AWS::Serverless::Application'
Properties:
Location: 'nested.template.yaml'
```

nested.template.yaml
```
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'

Resources:
queue:
Type: 'AWS::SQS::Queue'
```

When I run `sam publish -t parent.template.yaml`, it should publish both parent.template.yaml and nested.template.yaml to SAR. In parent.template.yaml, the location should be changed to the applicationId and semanticVersion of nested.template.yaml app in SAR.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.