How get generated deployment bucket name in serverless?

Viewed 1219

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.

1 Answers

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

Related