Skip to content

s3cmd is not working with AWS web identity token #1218

@snakebyte91

Description

@snakebyte91

Image: registry.gitlab.com/gitlab-org/build/cng/gitlab-toolbox-ee:v14.4.1
s3cmd version: 2.2.0

$ s3cmd ls s3://my-bucket-name
ERROR: /home/git/.s3cfg: None
ERROR: Configuration file not available.
ERROR: Consider using --configure parameter to create one.

Configuration file is available:

$ cat /home/git/.s3cfg
[default]
bucket_location = eu-central-1

Environment variables are set:

$ env | grep AWS
AWS_DEFAULT_REGION=eu-central-1
AWS_REGION=eu-central-1
AWS_ROLE_ARN=arn:aws:iam::123456789:role/my-iam-role
AWS_WEB_IDENTITY_TOKEN_FILE=/var/run/secrets/eks.amazonaws.com/serviceaccount/toke

aws sts get-caller-identity shows me the correct IAM role from the service account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions