Support AWS profile for reg-publish-s3-plugin
csohei opened this issue · 4 comments
Is your feature request related to a problem? Please describe.
Currently, I'm working on preparing for the VRT for some project and found that the plugin is not supposing the aws-profile for S3 upload.
As the S3Config provides the feature to use profile as an IdentityProvider function, we cannot specify it through the config file and it's a bit troublesome when having several profile in local.
I am wanting to let our developers to choose profile so that they do not have to specify it through the environment variable everytime they run.
Describe the solution you'd like
Support AWS profile in plugin config and use it for S3 client.
Describe alternatives you've considered
Currently, I'm implementing some script to register profile name and export it before running reg-suit.
However, thinking that this is a bit redundant.
Additional context
Add any other context or screenshots about the feature request here.
Does the following work for you ?
export AWS_PROFILE=PRFILE_FOR_S3_UPLOAD
npx reg-suit run
@Quramy hi, thanks for your reply!!
Unfortunately no, it's what I'm doing as workaround, as described in alternative.
As the profile name for AWS account is not always the same among developers, I've prepared installation shell scripts and stored the setting data as JSON.
And running the VRT as following command.
AWS_PROFILE=$(jq -r ".aws_profile" ./config/setting.json) reg-suit run
However, asking each developers to run installation every time is a bit redundant and this script only works for Linux/Mac users.
Also, I would like to avoid asking each developer to install jq(or any JSON parser) just for this script.
Is it possible to ask you for review if I make PR for this issue??
Hi @csohei
Thanks for the detailed explanation of the workaround.
I have not yet been able to imagine the code for the pull request you envision, but at least at this point I disagree with your proposed feature.
I am completely comfortable delegating to the aws-sdk how to identify AWS credentials. We do not want to complicate this process.