Code build cost reduction

0

We use amazon code build to build the code from code commit and generate artifacts for deployment. It looks like it is spinning a new machine every time and executes the build, the cost for the code build is increasing for us. Are there any way to reduce the cost for code build.

We use gradle for building java+kotlin packages and react & js libraries using nodejs and npm.

asked a year ago401 views
2 Answers
0

Please see these tips that should help you reduce the cost of using Amazon CodeBuild and optimize your build process:

  • Run the 'aws codebuild batch-get-projects' command to determine which builds take the most time to complete. You can then optimize these builds by reducing the number of build dependencies or using a larger build environment.

  • Look in to Amazon CloudWatch to monitor your build usage patterns and identify opportunities to optimize your builds.

  • Look in to the AWS CodeBuild Concurrent Builds feature to run multiple builds concurrently, which can help you take advantage of idle capacity in your build environment.

  • Using a build environment that is shared by multiple builds, such as the 'Managed image' option (Use an image managed by AWS CodeBuild), can help reduce costs.

Hope this helps.

AWS
answered a year ago
0

In addition to the above points,

Use Codebuild Caching.

Try to pre-pack your requirements inside a managed docker image, and use that with Codebuild, this will ensure provisioning and installation time is reduced as you already have what you need to be baked inside the runtime codebuild container.

HTH.

profile picture
answered 10 months ago

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