问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/48350535/deploy-lambda-to-s3-bucket-folder