The salient parts of the config.yml file:
version: 2.1
orbs:
aws-cli: circleci/aws-cli@2.0.0
aws-s3: circleci/aws-s3@1.0.9
jobs:
setup_aws_cli:
executor: aws-cli/default
steps:
- aws-cli/setup:
aws-access-key-id: AWS_ACCESS_KEY
aws-secret-access-key: AWS_SECRET_ACCESS_KEY
aws-region: AWS_REGION
- run:
name: "Testing AWS configuration"
command: |
# Show what's there now
aws configure list
# Retrieve security groups
current_security_group=$(aws ec2 describe-security-groups --profile profilename --group-id ${GROUP_ID})
When I run this, I get this error:
Unable to locate credentials. You can configure credentials by running “aws configure”.
The output from aws configure list
gives me a blank profile, valid key and secret values, and presumably the correct region.
If I add profile-name
to that aws-cli/setup
block, I get the same error. In addition, the key and secret values in the list command are entirely blank.
What am I missing?