5

Here is the command to deploy the lambda:

$ sam package --template-file sam.yaml --s3-bucket mybucket --output-template-file packaged.yaml

But can I specify a bucket prefix? so it gets deployed to subfolder instead of root of bucket?

red888
  • 27,709
  • 55
  • 204
  • 392

1 Answers1

10

You can provide the bucket prefix using --s3-prefix parameter

$ sam package --template-file sam.yaml --s3-bucket mybucket --s3-prefix path/to/file --output-template-file packaged.yaml

Under the hood sam is calling aws command and all the options listed here are valid.

Anuruddha
  • 3,187
  • 5
  • 31
  • 47
  • ahhhhh cool that makes sense. Is there a doc explaining exactly what cli calls sam is makes? like a mapping between them? – red888 Jan 19 '18 at 22:54
  • Couldn't find a sam specific doc. This is the sam clie repo readme has decent amount of information https://github.com/awslabs/aws-sam-local – Anuruddha Jan 19 '18 at 22:57