You can use any bucket name that you want there. One thing you need to make sure is that the bucket is in the same region as the lambda function, so I would put the region in the bucket, but its really up to you.
“After the deploy you will see the S3 resource created initially, then removed from the CF file and the bucket created and deleted”
Does this mean that S3 bucket with randomly generated name will be created anyway even if you explicitly define deploymentBucket in serverless.yml?
I am asking because I identified a lot of S3 buckets via AWS console, but all of them except specified one are empty.
This might be due to the ‘Retain’ policy I have assigned before, but anyway. My expectation is that sls doesn’t create bucket in case if it is specified. Is this correct?
I seemed to have run into an issue trying to do a serverless deploy when using the deploymentBucket to specify a preexisting S3 bucket. Does this work in the version 1.3.0 ?
I’ve added a github issue 2888 but I’m not sure if it’s a bug or something I’m doing wrong.
For me the bucket I was original trying to use for deployment required serverside encryption. The admins had a policy on the bucket that requires you me to upload objects with SSE: AES256. serverless only supports specifying a deployment bucket but no options for out serverless uploads to that bucket.
In that ticket I suggested we implement an object for deploymentBucket, or deploymentBucketOptions so we can specify S3 upload parameters like ss3, or ss3KmsKeyId.
Probably not an issue for most people but on my end I don’t have much control over the bucket policies.