design: sam deploy also packages built artifacts#1521
design: sam deploy also packages built artifacts#1521sanathkr merged 3 commits intoaws:release-v0.32.0from
sam deploy also packages built artifacts#1521Conversation
jfuss
left a comment
There was a problem hiding this comment.
Generally this looks good. Just a couple questions/nits.
designs/package_during_deploy.md
Outdated
|
|
||
| `sam deploy --stack-name sam-package-on-deploy --capabilities CAPABILITY_IAM --s3-bucket sam-package-bucket` | ||
|
|
||
| There is no explicit need to pass in a `--template-file` parameter, if one is not passed in it to defaults to trying to find the template.yaml that was generated by `sam build` which is located at `.aws-sam/build/template.yaml` |
There was a problem hiding this comment.
If sam build was never run what happens? Do we pick up the default template from the cwd or fail? All of our other commands pick up the default but could see a case to fail and leave the door open for a deploy that builds, packages, and deploys. Would be worth describing what will happen here.
There was a problem hiding this comment.
yeah, we pick up the default template. Can describe that case.
| Future of `sam package`? | ||
| --------------------- | ||
|
|
||
| * `sam package` will continue to exist in the state it is today and will continue to be improved upon separately. |
There was a problem hiding this comment.
Just for clarification, if we update package this new deploy flow will also get those updates?
There was a problem hiding this comment.
correct. all changes will go into PackageContext instead, which deploy will reap the benefits of.
designs/package_during_deploy.md
Outdated
| CLI Changes | ||
| ----------- | ||
|
|
||
| * Add new arguments `--metadata`, `--use-json` and modify existing `--template-file` to look for a default `template.yaml` that exists under `.aws-sam/build/` |
There was a problem hiding this comment.
What value does --use-json provide in the deploy experience?
There was a problem hiding this comment.
If a given template file is above 51,200 bytes. that corresponding template also gets uploaded to an s3 bucket, if --use-json is provided, that uploaded template_file will be in the json format.
| * If a pre-packaged template is specified, an attempt to package does not change the template and the same template is used for deploy. | ||
| * The parameters that share the same name across package and deploy are collapsed together. eg: `--kms-key-id` , if a kms-key-id is specified that same key is used across both packaging and deploy purposes. | ||
|
|
||
| `.samrc` Changes |
There was a problem hiding this comment.
We should update the template in the sam config so this gets reflected in new designs going forward. Just noticing this now but not really apart of this pr directly.
designs/package_during_deploy.md
Outdated
| Documentation Changes | ||
| ===================== | ||
| * Required nature of `--template-file` parameter has a series of defaults that are looked at during `sam deploy` similair to `sam package`. | ||
| * If `--template-file` points to a non-packaged template-file, `--s3-bucket` becomes required to be able to effectively package and deploy in one command using `sam deploy`. |
|
|
||
| Parameters that dont need to be added. | ||
|
|
||
| * `--output-template-file` |
There was a problem hiding this comment.
Can we print this with --debug and document this so people can use this when debugging?
make prpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.