Skip to content

Fix the S3 downloading functionality by passing in the AWS region #818

@ThomasHickman

Description

@ThomasHickman

If you use the S3 downloading functionality on a local machine, the downloading jobs fail with:

+ aws s3 cp s3://bucket/item __out/
fatal error: Could not connect to the endpoint URL: "https://bucket.s3.nov.amazonaws.com/item"

To fix this, I just passed in MINIWDL__TASK_RUNTIME__ENV='{"AWS_DEFAULT_REGION": "<REGION_OF_THE_BUCKET>"}'. It would be great if miniwdl did this itself at

try:
b3creds = boto3.session.Session().get_credentials()
host_aws_credentials["AWS_ACCESS_KEY_ID"] = b3creds.access_key
host_aws_credentials["AWS_SECRET_ACCESS_KEY"] = b3creds.secret_key
host_aws_credentials["AWS_SESSION_TOKEN"] = b3creds.token
except Exception:
pass
though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions