I am trying to use orbs for the first time. I’m trying to use the circleci aws-ecr and aws-ecs to build a docker image, upload it to ECR then deploy it to ECS.
I’ve reduced my config.yml to that ORB example for “build_and_push_image”. When I run it, the first thing it does is try to set the region with “aws configure”. Where in the circle-ci can I define the region?
Can I define it in the workflow? Can I make a job or executor and define it there? I’m guessing I can assign it in the project settings but I’d like to keep it as a variable.
I can’t find a working example of using the aws-ecr orb.
Hi @luckyvalentine! In looking at the aws-ecr orb’s source:
Name of env var storing your AWS region information, defaults to AWS_REGION
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:
context: myContext #if you are using contexts