-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Nested Application from the Local File System build does not work properly #1470
Comments
@jfuss How can we update the documentation? Because there is a particular session that states exactly this scenario. And the cli completes successfully. It even generates a zip file with the 'unbuild' app.
|
@lucasam Which part(s) of the docs leads you to this? Skimming through, I can't find where we have claimed this to work. You can also suggest updates by submitting the changes to https://github.com/awsdocs/aws-sam-developer-guide |
we really need support for nested stacks :-( Is there an idea if that will come? |
Hey guys, @jfuss Do you already have some news about this request? UPDATE: I also created my own small shell script that just executes sam build --build-dir <BUILD_DIR> --template <TEMPLATE_PATH> before executing sam build on the top level of the application. This workaround is okay for me. |
+1 for this feature |
Hi, I have followed the workaround above for a python nested application. However, it is still does not work. I have the following folder structure
I followed the instructions above to build the nested app
However, I get the error Am I missing something? Thanks for the help! |
+1 on fixing this issue. |
+1 - Nested applications are a common pattern! |
+1 |
1 similar comment
+1 |
@jfuss #1470 (comment), |
Without this feature I'm not sure how I'm going to prevent my |
It's a must have. |
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
To make nested applications, I first do `
` under Resources. |
Building resources in nested stack is enabled by default in #2662, to be released |
released in v1.20.0 |
Nested stacks seemed to work fine for me before I upgraded my CLI to 1.20.0. Now I'm getting the following errors and there are no search results on the internet that I can find:
I am defining the nested application as follows:
Again, this was working before I updated my CLI. The nested stack contains a few standard resources and two AWS::Serverless::Function resources. |
Hi @lvlattanzio, looks like this is generated from |
@aahung I just run My stacks updated and deployed appropriately so I think this error message might just be noise but I could be wrong. |
thx, I will reply in the new issue |
Nested Application from the Local File System build does not work properly
Issue description
According the documentation
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-template-nested-applications.html
The
AWS::Serverless::Application
can point to another template file (check Defining a Nested Application from the Local File System)if you trigger the commands sam build; sam package, sam deploy the result of the nested application is a broken zip file.
Scenario
Parent template references javaproject/template.yaml as AWS::Serverless::Application`
The sequence
sam build; sam package; sam deploy
when triggered from parent directory completes. But the zipfile for the function under the nested application is wrongly built.Let's check step by step using the sample code https://github.com/lucasam/sambuildissue2
Cloning sample code
git clone https://github.com/lucasam/sambuildissue2 cd sambuildissue2
sam build
sam package
sam deploy
Everything looks fine so far. BUT
If you inspect the nested application you will find
Issue
Workaround
sam build
andsam package
at the nested application. Then point at parent template thepackaged.yaml
instead oftemplate.yaml
The text was updated successfully, but these errors were encountered: