Quantcast
Channel: CircleCI Discuss - Latest posts
Viewing all articles
Browse latest Browse all 14895

How to set AWS_REGION with orbs?

$
0
0

Hi @luckyvalentine! In looking at the aws-ecr orb’s source:

region:
        default: AWS_REGION
        description: |
          Name of env var storing your AWS region information, defaults to AWS_REGION
        type: env_var_name

By default, CircleCI will use the credentials saved within the project environment variables or contexts settings. You can find AWS Orb examples here: https://circleci.com/docs/2.0/deployment-integrations/#aws-orb-examples.

You can then set the default region in your config.yml as follows:

workflows:
  build_and_push_image:
    jobs:
      - aws-ecr/build_and_push_image:
          account-url: AWS_ECR_ACCOUNT_URL_ENV_VAR_NAME
          aws-access-key-id: ACCESS_KEY_ID_ENV_VAR_NAME
          aws-secret-access-key: SECRET_ACCESS_KEY_ENV_VAR_NAME
          context: myContext #if you are using contexts
          region: AWS_REGION_ENV_VAR_NAME 

Viewing all articles
Browse latest Browse all 14895

Latest Images

Trending Articles



Latest Images