CircleCI Ideas

Set AWS Credentials via API

Our Organization used to deploy AWS Environment.

We set AWS credential manually from GUI. But it is troublesome.

I think it is very useful to get create github event and set AWS Permissions via API.



  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Jul 23 2018
  • Duplicate
  • Attach files
  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    28 Jul, 2018 02:49am

    It looks like there may be syntax problem and missing key in your payload -- your data structure has a key called AWS_ACCESS_KEY_ID, but then your other value does not have a NAME field:

    {"Name": "AWS_ACCESS_KEY_ID", "Value":"AKIAIXXXXXXX"},


  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    28 Jul, 2018 01:36am

    I try to set command, but get this message.


      "message" : "You must choose a name for this environment variable"



    I post this command.

    `curl -X POST --header "Content-Type: application/json" -d '[{"Name": "AWS_ACCESS_KEY_ID", "Value":"AKIAIXXXXXXX"}, "Value":"je7MtGbClwBF/2Zp9Utk/h3yCo8nvbireamgpet"}]' --request POST<token>`

  • Admin
    Alexey Klochay commented
    25 Jul, 2018 02:01pm

    Thank you for submitting this idea!

    Our AWS Keys settings section is not available on CircleCI 2.0. We suggest configuring AWS CLI via the environment variables as described in the AWS documentation here. It is possible to create environment variables via the API (please see this doc for an example) so using environment variables should help you achieve your goal.

    Please let me know if this helps!