mirror of
https://github.com/serverless/serverless.git
synced 2025-12-08 19:46:03 +00:00
880 B
880 B
Read this on the main serverless docs site
Reference AWS S3 Objects
You can reference S3 values as the source of your variables to use in your service with the s3:bucketName/key syntax. For example:
service: new-service
provider: aws
functions:
hello:
name: ${s3:myBucket/myKey}-hello
handler: handler.hello
In the above example, the value for myKey in the myBucket S3 bucket will be looked up and used to populate the variable.
Buckets from all regions can be used without any additional specification due to AWS S3 global strategy.