Cherry
Cherry

Reputation: 33598

How get generated deployment bucket name in serverless?

By default, Serverless creates a bucket with a generated name like <service name>-serverlessdeploymentbuck-1x6jug5lzfnl7 to store your service's stack state. But how can I get this name inside serverless.yml?

Important

using provider.deploymentBucket.name is not en option because it where you set this name not where you can get it especially when it generated by serverless itself.

Upvotes: 3

Views: 2745

Answers (1)

Aaron Stuyvenberg
Aaron Stuyvenberg

Reputation: 3787

You can use !Ref ServerlessDeploymentBucket. It's created as part of the rest of your application stack, so you can reference it within the template.

More information is available here

Upvotes: 3

Related Questions