Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying nested application gives false error message #2689

Closed
lvlattanzio opened this issue Mar 5, 2021 · 4 comments
Closed

Deploying nested application gives false error message #2689

lvlattanzio opened this issue Mar 5, 2021 · 4 comments

Comments

@lvlattanzio
Copy link

Description:

Prior to updating my aws-sam-cli to version 1.20.0 I had a stack with several nested stacks from the local filesystem. This was done primarily to break up my template into more manageable chunks. Now that I upgraded to v1.20.0 I am receiving the following error upon running sam deploy:
Nested application 'Application' has specified S3 location for Location which is unsupported. Skipping resources inside this nested application.

Steps to reproduce:

  1. sam init
Which template source would you like to use?
        1 - AWS Quick Start Templates
        2 - Custom Template Location
Choice: 1
What package type would you like to use?
        1 - Zip (artifact is a zip uploaded to S3)
        2 - Image (artifact is an image uploaded to an ECR image repository)
Package type: 1

Which runtime would you like to use?
        1 - nodejs14.x
        2 - python3.8
        3 - ruby2.7
        4 - go1.x
        5 - java11
        6 - dotnetcore3.1
        7 - nodejs12.x
        8 - nodejs10.x
        9 - python3.7
        10 - python3.6
        11 - python2.7
        12 - ruby2.5
        13 - java8.al2
        14 - java8
        15 - dotnetcore2.1
Runtime: 7

Project name [sam-app]: 

Cloning app templates from https://github.com/aws/aws-sam-cli-app-templates

AWS quick start application templates:
        1 - Hello World Example
        2 - Step Functions Sample App (Stock Trader)
        3 - Quick Start: From Scratch
        4 - Quick Start: Scheduled Events
        5 - Quick Start: S3
        6 - Quick Start: SNS
        7 - Quick Start: SQS
        8 - Quick Start: Web Backend
Template selection: 1

    -----------------------
    Generating application:
    -----------------------
    Name: sam-app
    Runtime: nodejs12.x
    Dependency Manager: npm
    Application Template: hello-world
    Output Directory: .
    
    Next steps can be found in the README file at ./sam-app/README.md
  1. clone template.yaml (e.g., template.1.yaml) and point to it in template.yaml:
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
  sam-app

  Sample SAM Template for sam-app

Resources:
  Application:
    Type: AWS::Serverless::Application
    Properties:
      Location: ./template.1.yaml
  1. sam build && sam deploy --debug

Observed result:

Initiating deployment
=====================
2021-03-05 19:22:22,385 | No Parameters detected in the template
2021-03-05 19:22:22,433 | 1 stacks found in the template
2021-03-05 19:22:22,434 | Nested application 'Application' has specified S3 location for Location which is unsupported. Skipping resources inside this nested application.
2021-03-05 19:22:22,434 | No Parameters detected in the template
2021-03-05 19:22:22,461 | 1 resources found in the stack 
2021-03-05 19:22:22,461 | No Parameters detected in the template
2021-03-05 19:22:22,680 | File with same data is already exists at sam-app/18d8616c5d6c8d1b9a943f9a23304210.template. Skipping upload

Waiting for changeset to be created..

Expected result:

I expect to be able to reference local templates for nested stacks as I was able to before upgrading my CLI version. It appears that the resources in the nested stack were created, so this error message might just be noise.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS:
NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"
PRETTY_NAME="Amazon Linux AMI 2018.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
  1. sam --version: 1.20.0
  2. AWS region: us-east-1

Add --debug flag to command you are running

@aahung
Copy link
Contributor

aahung commented Mar 5, 2021

Thanks for reporting, yes, as build/deploy works as expected, this message is only meant to be output during building. A fix is coming soon to avoid confusion.

@aahung aahung added area/debugging and removed stage/needs-investigation Requires a deeper investigation labels Mar 5, 2021
@aahung aahung changed the title Nested application from the local filesystem gives error with v1.20.0 Deploying nested application gives false error message Mar 5, 2021
@brysontyrrell
Copy link
Contributor

Just came across this too running sam deploy and found it very confusing.

@mndeveci
Copy link
Contributor

mndeveci commented Jun 10, 2021

The fix for the issue have been released with SAM CLI v1.21.0, resolving.

@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants