Joey Yi Zhao
Joey Yi Zhao

Reputation: 42490

How to run `AWS sam` command on ubuntu?

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

Upvotes: 1

Views: 277

Answers (1)

Joey Yi Zhao
Joey Yi Zhao

Reputation: 42490

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

Upvotes: 1

Related Questions