Closed dprotsiv closed 2 years ago
I can attest to this being the case. In fact I found a way through testing to get the tags to apply.
All your tags will be created and will persist through deployments if no changes are made to the tags
+1 ran into the same issue. Any update on a fix for this?
I just put up a PR to fix this issue; I've been hitting it as well and that change should fix it
@ROSeaboyer Thanks, merged and released in v1.5.2!
Version: 1.5.1 Issue:
For existing deployment bucket, after configuring "tags" property with new tags, it is not possible to add new tags. This seem to only work when bucket is either being created or if the bucket has at least one tag.
Steps to reproduce: Step 1: Configure vanilla serverless.yml with serverless-deployment-bucket. Bucket configuration in custom section:
Then deploy (no tags).
Step 2: Change deploymentBucket to following:
Then deploy - observe that bucket tags are empty.
Preliminary issue notes: Best I can surmise is that issue itself comes from DeploymentBucketPlugin.hasChangedBucketTags in index.json where
const response = await this.provider.request('S3', 'getBucketTagging', { Bucket: name })
throws an exception:{"code":"AWS_S3_GET_BUCKET_TAGGING_NO_SUCH_TAG_SET","providerError":{"message":"The TagSet does not exist","code":"NoSuchTagSet","region":null,"time":"2021-06-28T17:46:11.101Z","requestId":".....","extendedRequestId":".......","statusCode":404,"retryable":false,"retryDelay":94.99932161936133},"providerErrorCodeExtension":"NO_SUCH_TAG_SET"}
And has DeploymentBucketPlugin.hasChangedBucketTags returns false. This in turn causes applyDeploymentBucket to not apply new tags