3
votes

I have created a CodePipeline that takes input(files) from CodeCommit repository and deploys files to S3 bucket. When I delete files in CodeCommit repository, pipeline doesn't delete the file in the corresponding S3 bucket. In short, I want my S3 bucket to be in sync with CodeCommit repository. How can I achieve this?

My Pipeline doesn't have CodeBuild stage.

AWS-CodeCommit --> CodePipeline --> Deploy-to-Cross-Account-S3

1

1 Answers

2
votes

Unfortunately, currently there is no predefined configuration of an S3 Deploy action to delete an S3 object from the pipeline itself.

Docs

The workaround for now will be to add another action on the pipeline to use CodeBuild to perform the objects cleanup before/after deploying them.