aws / aws-sam-cli

CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM
https://aws.amazon.com/serverless/sam/
Apache License 2.0
6.5k stars 1.17k forks source link

Application Location Object must reference a AWS Serverless Application Repository application. #2477

Open mfriesen opened 3 years ago

mfriesen commented 3 years ago

Describe your idea/feature/enhancement

I would like to publish a application to the Serverless Application Repository that is using nested stacks without having to create a different Application for each Nested Stack.

My template looks as follows:

Resources:
  MyNestedApp:
    Type: AWS::Serverless::Application
    Properties:
      Location: s3://cf-templates-utgydnaf2za8-us-east-1/5451e544fdf49c365ee2ca3510611caf.template

When running: "sam publish", I get error: Error: Resource with id [MyNestedApp] is invalid. Location property must be an Application Location Object referencing a valid AWS Serverless Application Repository application.

If I publish the nested template as it's own application in the Serverless Application Repository, as shown below, everything works fine.

Resources:
  MyNestedApp:
    Type: AWS::Serverless::Application
    Properties:
      ApplicationId: arn:aws:serverlessrepo:us-east-1:{{aws_accountid}}:applications/{{NESTED_TEMPLATE}}

I wish SAM CLI would support publishing applications that supported nested stacks without having to publish each Nested Stack individually.

ssenchenko commented 2 years ago

We have a roadmap here, but we also try to take in popular feature requests based on 👍🏽 from the community. We will be adding this to our intake for prioritization.