Upgrade fog-aws to v3.12.0
What does this MR do?
This upgrade properly supports regional STS endpoints as well as the ability to set the minimum and maximum multipart chunk size.
- Diff: https://github.com/fog/fog-aws/compare/v3.9.0..v3.12.0
- Gem diff: https://my.diffend.io/gems/fog-aws/3.9.0/3.12.0
How to setup and validate locally (strongly suggested)
Set up is a bit of a pain, but to test regional STS endpoints you need to somehow get an AWS Web Identity Token.
I got mine from setting up a K8S cluster with IAM Service Role (https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts-technical-overview.html). Then on some other machine, I saved
AWS_WEB_IDENTITY_TOKEN_FILE
TO a /tmp/identity.txt
:
AWS_STS_REGIONAL_ENDPOINTS=regional AWS_WEB_IDENTITY_TOKEN_FILE=/tmp/identity.txt AWS_ROLE_ARN=arn:aws:iam::855262394183:REDACTED /opt/gitlab/embedded/bin/ruby -Ilib test-identity.rb
To test fog-aws
directly (https://github.com/fog/fog-aws/), I used this script:
require 'fog-aws'
connection = Fog::Storage.new({provider: 'AWS', region: 'us-west-2', use_iam_profile: true})
dir = connection.directories.new(key: 'stanhu-s3-workhorse-testing')
data = "test" * 1024
f = dir.files.create(
key: 'test.txt',
body: data
)
puts f
Does this MR meet the acceptance criteria?
Conformity
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) -
I have added/updated documentation, or it's not needed. (Is documentation required?) -
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) -
I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) -
I have tested this MR in all supported browsers, or it's not needed. -
I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.
Edited by Stan Hu