By using AWS re:Post, you agree to the Terms of Use

Is there a way to change the name of the artifact getting stored in s3 during build stage of codepipeline?


I want to modify the name of the artifact getting created during the build stage of codepipeline in order to maintain versions of the builds and apply a lifecycle policy on the bucket. Is there a way to achieve this?

1 Answers

If you are using CloudFormation to provision the CodeBuild project (Assuming you are using a CodeBuild Project for your Build stage) It has the override artifact name property ( that allows for the name to be overridden in the buildspec.yml file.

This should allow you to do what you want as it allows the artifact name to be defined at build time.

answered a month ago
  • I am using terraform to provision infrastructure. I tried the above solution but it did not work. Codepipeline is giving a unique name for the build everytime.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions