-
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
"sam package": Upload AWS::Include'd files to S3 and/or inline local includes #654
Comments
Absolutely. Marking this as a feature request for "sam package" command. We need to include these when we port package command from AWS CLI to SAM CLI |
I implemented this feature and submit a PR to aws-cli and am awaiting review. I wasn't aware package command was being moved to SAM cli |
@ekcrisp feature was merged into awscli recently, so now its possible to do have a template that has a local path to an Include, that will get automatically uploaded and stored in S3 when the package command is run. This means we can create a Here's an example resource
however with this template, attempting to run a
this commit deploys via cloudformation This also affects |
@georgealton i did notice some things in sam local that were a little off but since my team is not blocked we are moving on. Also I'm not sure what the difference is between SAM validate and CF validate but we haven't had any issues with aws cloudformation validate command. |
after running DefinitionBody:
Fn::Transform:
Name: AWS::Include
Parameters:
Location: oas-sub.yaml and then |
Try updating awscli, I think it was added in a newer version |
it looks like it's an issue with my Location: ../../oas-sub.yaml
|
actually, it looks like |
Am I right in thinking that aws cli added support for this recently? Currently I believe I'm able to use the following to include a local import (and get the right substitutions):
|
Hi Guys, |
any updates? I have this issue working with local swagger file.
Update: For now I've solved this issue by uploading the swagger file to s3 before the sam package command in our deployment pipeline. And I reference the s3 file in my sam template.
|
What's the status of this? |
We have a whole new set of changes for Feel free to re-open the Issue if this is not the case. |
I still get this error referencing to local path.
|
@karthikvadla this was added to aws cli cloudformation package, not sam cli. You can try using https://docs.aws.amazon.com/it_it/cli/latest/reference/cloudformation/package.html |
aws/aws-cli#3708 this problem exists with sam cli too. Files included by include transform are not uploading to s3 by "sam deploy" or "sam package" |
(Copied from aws/serverless-application-model#567 as it seems to make more sense in this repo)
Originally described in aws/serverless-application-model#345 (comment)
This would allow us to break large unwieldy SAM definitions into more manageable logical chunks.
Alternatively, supporting some form of 'local include' or 'local inline' as part of the
package
step would also solve this in a nice way (potentially even in a better way..). I would see this as reading a yaml file from a local path, and inlining it at the section of theAWS::Include
in the 'packaged' yaml. This could then be deployed as normal.Potentially relevant:
samtranslator
)The text was updated successfully, but these errors were encountered: