diff --git a/src/template.yml b/src/template.yml index 6d710651d..6c0b03174 100644 --- a/src/template.yml +++ b/src/template.yml @@ -80,6 +80,9 @@ Resources: - !Sub arn:aws:s3:::${BootstrapTemplatesBucket}/* Principal: AWS: !Ref AWS::AccountId + BootstrapArtifactStorageBucket: + DeletionPolicy: Retain + Type: AWS::S3::Bucket BootstrapTemplatesBucket: Type: "AWS::S3::Bucket" DeletionPolicy: Retain @@ -413,6 +416,8 @@ Resources: Resource: - "arn:aws:s3:::serverlessrepo-aws-deplo-bootstraptemplatesbucket-*" - "arn:aws:s3:::serverlessrepo-aws-deplo-bootstraptemplatesbucket-*/*" + - !GetAtt BootstrapArtifactStorageBucket.Arn + - !Sub "${BootstrapArtifactStorageBucket.Arn}/*" - "arn:aws:s3:::adf-shared-modules-*-*" - "arn:aws:s3:::adf-shared-modules-*-*/*" - Effect: "Allow" @@ -495,7 +500,7 @@ Resources: Properties: ArtifactStore: Type: S3 - Location: !Ref BootstrapTemplatesBucket + Location: !Ref BootstrapArtifactStorageBucket RoleArn: !GetAtt CodePipelineRole.Arn Name: 'aws-deployment-framework-bootstrap-pipeline' Stages: