1
votes

I am using AWS sam to package and deploy my lambda functions. But I found the sam command doesn't work well in ubuntu linux.

Below is the output of sam package command from ubuntu-16.04. It looks like the command arguments error but the same command can be run on Mac. I don't know what wrong with this command.

$ sam package --template-file sam.yaml --s3-bucket mybucket --output-template-file packaged.yaml
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument operation: Invalid choice, valid choices are:
...
$ sam --version
SAM CLI, version 0.16.0
1
Does --debug give you any more information?jarmod

1 Answers

1
votes

It turns out that the problem was that the awscli version was too old. Solved it by upgrading awscli since it is used underneath.