drone-plugins / drone-s3-cache

Caches build artifacts to S3 compatible storage backends
http://plugins.drone.io/drone-plugins/drone-s3-cache
Apache License 2.0
29 stars 30 forks source link

Support Getting Credentials From Credentials File #62

Closed kirbyjs closed 3 years ago

kirbyjs commented 3 years ago

Description

It would be awesome if you guys would support getting creds with NewFileAWSCredentials, where you are fetching credentials. Seems like you could also use the NewChainCredentials, to simplify the logic and just pass your credentials providers to the chain, and then the chain will try to resolve getting creds from any of the providers that you specified.

Expected

This plugin should be able to load and use credentials from ~/.aws/credentials.

Actual

Currently getting the error Access Denied when using this plugin when aws credentials are in the shared credentials file.

Context

donny-dont commented 3 years ago

@kirbyjs can you give some more information here on what would be passed into NewFileAWSCredentials? What additional values would the config need? PRs are definitely welcome if you'd like.