got an error when delete static site
Hello! I'm using static site and add a s3 bucket to store output of Athena. Got an error when trying to delete svc.
clean resources: get bucket name: more than one S3 bucket with tags "copilot-application"="my-app","copilot-environment"
here is part of my addons
Resources:
# other stuffs
AthenaResultBucket:
Type: AWS::S3::Bucket
DeletionPolicy: Retain
Properties:
BucketEncryption:
ServerSideEncryptionConfiguration:
- ServerSideEncryptionByDefault:
SSEAlgorithm: AES256
BucketName: !Sub
- '${App}-${Env}-athena-result-bucket-${BucketNameSuffix}'
- BucketNameSuffix: !Select [ 0, !Split [ "-", !Select [ 2, !Split [ "/", !Ref AWS::StackId ] ] ] ]
AccessControl: Private
PublicAccessBlockConfiguration:
BlockPublicAcls: true
BlockPublicPolicy: true
IgnorePublicAcls: true
RestrictPublicBuckets: true
copilot version: 1.33.1
Hello @psYifanChen. Is AthenaResultBucket an addons resource of the static site service? So both AthenaResultBucket and the static site bucket have the same tag set?
@iamhopaul123 Yes, it's addons resources. Both two buckets has the same tag.
Gotcha. Sorry for the inconvenience but as a temporary workaround, can you set https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-bucket.html#cfn-s3-bucket-tags so that AthenaResultBucket gets a different tag value for either one of copilot-application or copilot-environment?
@iamhopaul123 Okay, I'll do this for now.