red888
red888

Reputation: 31652

deploy lambda to s3 bucket folder?

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?

Upvotes: 5

Views: 2567

Answers (1)

Anuruddha
Anuruddha

Reputation: 3245

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.

Upvotes: 11

Related Questions