robinpellegrims / pellegrims

Nx monorepo with open source projects
MIT License
49 stars 21 forks source link

question(nx-remotecache-s3): aws credentials #62

Closed hoonoh closed 2 years ago

hoonoh commented 2 years ago

Hello,

Is there a specific reason behind why access key id & secret access key needs to be defined via either options or environment variable? https://github.com/robinpellegrims/pellegrims/blob/7a6fd7c4035b16a81a9be0126cec29c1f45c6ec1/libs/nx-remotecache-s3/src/lib/nx-remotecache-s3.ts#L25-L33 I was thinking of using this plugin on EC2 with IAM role (AWS CodeBuild) and noticed currently the above lines were blocking this type of usage. I think it might be better to remove the checks and let it fallback to aws-sdk-v3 credential provider if user defined AWS credentials are unavailable. I made an example patch here

robinpellegrims commented 2 years ago

I'm personally using it with Backblaze B2 so there both parameters are mandatory but I'm sure there will be an error from the B2 backend anyway if they are not set. So feel free to open a PR to make it compatible with your use case.

hoonoh commented 2 years ago

I'm personally using it with Backblaze B2 so there both parameters are mandatory but I'm sure there will be an error from the B2 backend anyway if they are not set. So feel free to open a PR to make it compatible with your use case.

Ah I see. I will open a PR with the changes :smile: