Search code examples
amazon-web-servicestokenconfigbotogsutil

Configure gsutil .boto file to use AWS STS assume_role


Struggling to to work out if the stand alone version of gsutil (zip file which can be downloaded from : https://cloud.google.com/storage/docs/gsutil_install) supports downloading from S3 buckets using (AWS Security Token Service (STS) with an assume_role)?

I am on Windows 7 and wanted to know what the .boto file would look like to make this happen for an assume_role to fetch from an s3 bucket?

thanks


Solution

  • gsutil uses the older boto library (as opposed to boto3, which was not written with support for GCS resources), which doesn't seem to support AWS session tokens [1] like you'd get back from assume-role in the AWS CLI [2].

    [1] https://github.com/boto/boto/pull/3767

    [2] https://docs.aws.amazon.com/cli/latest/reference/sts/assume-role.html