Is it possible to use an AWS CodeStar connection via the SDK to pull code?

283 views Asked by At

Is it possible to use an existing AWS CodeStar Connection in code to pull a repo outside of using it in CodePipeline?

I have a CodeBuild project that I want to trigger via an automated process with different environment variable values, and the only way I see of being able to pull the code into the CodeBuild execution is a git pull in the build container. The pull would require a Personal Access Token that would in turn need to be updated periodically.

Thoughts?

1

There are 1 answers

0
DimitriosK On

If I understand correctly, goal is to use the connection you have set up in AWS (CodeStar) in order to run something like

git clone aws-codestar-connection-url

Disclaimer, I have not tried this myself. Have a look if this gives a hint or two. Suggests it is (or was) possible: https://pooya.io/how-to-access-github-and-bitbucket-using-aws-codestar/

Important note - CodeStar itself was discontinued, so the above suggestion may be out and connections might by fully integrated to