question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Undocumented options in '--help' for 'sam package'

See original GitHub issue

Description

The sam package command doesn’t document the --output-template-file in the options list. It does use it in the example, but them leaves it out of the documented options.

Also suggest it should document the --s3-prefix option.

Steps to reproduce

sam package --help

Observed result

Usage: sam package [OPTIONS] [ARGS]...

  The SAM package command creates a zip of your code and dependencies and
  uploads it to S3. The command returns a copy of your template, replacing
  references to local artifacts with the S3 location where the command
  uploaded the artifacts.

  e.g. sam package --template-file template.yaml  --output-template-file packaged.yaml
  --s3-bucket REPLACE_THIS_WITH_YOUR_S3_BUCKET_NAME

  This is an alias for aws cloudformation package. To learn about other parameters you can use,
  run aws cloudformation package help.

Options:
  --template-file PATH  The path where your AWS SAM template is located
  --s3-bucket TEXT      The name of the S3 bucket where this command uploads
                        the artifacts that are referenced in your template.
                        [required]
  --debug               Turn on debug logging to print debug message generated
                        by SAM CLI.
  --help                Show this message and exit.

Expected result

Expected --output-template-file option to be documented under ‘Options’. And suggest the --s3-prefix option should be there too.

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

  1. OS: Windows 10
  2. sam --version: SAM CLI, version 0.18.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jfusscommented, Nov 13, 2019

We have recently removed our reliance on aws cli for sam package. Starting in v0.31.0, all options are present in the help text. We are still working through deploy.

Given this issue is about package, I am going to close this one.

1reaction
jfusscommented, Oct 28, 2019

This will be addressed with #1437.

sam package shells out to aws cloudformation package in AWS CLI. Any option your installed AWS CLI version supports is supported by sam package. Which is also mentioned in the help text: “This is an alias for aws cloudformation package. To learn about other parameters you can use, run aws cloudformation package help.”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Undocumented options in '--help' for 'sam package' #1280
The sam package command doesn't document the --output-template-file in the options list. It does use it in the example, but them leaves it...
Read more >
sam build - AWS Serverless Application Model
If your functions depend on packages that have natively compiled dependencies, use this option to build your function inside a Lambda-like Docker container....
Read more >
sam package and deploy without packaged parameter file
packaged-service.yml has a codeuri field points to s3 bucket. In the above example, probably the file has no use ? How to use...
Read more >
AWS SAM CLI Cheatsheet!. A quick cheat sheet for your friend…
$ sam local invoke “HelloWorldFunction” -e events/event.json → Invoke your Lambda function directly. $ sam package → Packages a SAM application. $ sam...
Read more >
Meet AWS SAM CLI: sam init - Medium
Description: Turn on debug logging to print debug message generated by SAM CLI. -h, --help. Description: Show this message and exit. Options ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found