V2: AWS permissions set in web UI not available in container

awscli

#1

I did add the AWS permissions on the Project Settings. This seems to be working fine in CircleCI v1.
The AWS permissions page mentions specifically that: Credentials are installed on your containers into the ~/.aws/config and ~/.aws/credentials properties files.

In v2 I get the following error when trying to ls the ~/.aws config directory

ls ~/.aws
ls: cannot access /home/circleci/.aws: No such file or directory
Exited with code 2

Using the following circle.yml should allow you to reproduce the error:

version: 2
executorType: machine
stages:
    build:
        workDir: ~/front
        steps:
            - type: checkout
            - type: shell
              name: display aws
              command: ls ~/.aws

Issue logging in to aws, missing credentials
#2

You need to set them as environment variables in your project settings for now, see the last comment in AWS credentials in machine executor


#3