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

AWS CodePipeline custom stage to read config file and call external service endpoint


Hi All,

I'm using AWS CodePipeline with CodeBuild & CodeCommit . I want to add custom stage and there I need to read configuration file & send that data to external service endpoint. Is there any option to achieve this using CodePipeline?

Please guide me through this.

1 Answers

You can use another CodeBuild stage with a standard Linux image provided by AWS (ex: aws/codebuild/standard:6.0 which is an Ubuntu 22.04) and do any commands you need. For example:

version: 0.2
  shell: bash

      - aws s3 cp s3://<myconfigbucket>/<myconfigfile> # get a config file
      - $(<command to parse config file or any other action needed>)

      - curl -X POST -d 'key1=value1' -d 'key2=value2'

This is just an example, you can put any bash command you need to match your use case.

profile picture
answered a month 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