-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AmazonS3InstallationService should accept aws credential in constructor #1165
Comments
Thanks for the feature suggestion! We would love a pull request for this addition if you think it is something you can contribute 😄 |
BTW , it seems AWS_REGION , AWS_ACCESS_KEY_ID , AWS_SECRET_ACCESS_KEY is not sufficient.
After digging into s3's code , it seems it needs additional 3 system properties : aws.region , aws.accessKeyId , aws.secretKey Anyway , I don't suggest using After I set the 3 values : aws.region , aws.accessKeyId , aws.secretKey . When event comes , bolt output :
No stacktrace :( I think maybe the AWS storage didn't run test outside AWS's image ? While using
|
Hey @smallufo
I don't think so. At least, this is not always true. From my past experience, the default resolver works very well with those env variables. As long as you provide sufficient env variables, Java AWS SDK works for you without any issues. I don't have time to discuss details right now, but I recommend checking https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/DefaultAWSCredentialsProviderChain.html The default credential resolver tries to read env variables first, then Java system properties, and so on. Also, I believe that it's the best recommended way to resolve credentials on AWS infra (and even on your local machine).
What about enabling slf4j debug-level logging? The debug logs by this SDK and AWS SDK may provide more detailed information, which can be helpful for you. Lastly, as for your PR to add a new constructor to add a new way to initialize the credentials, I am open to add such in addition to the current default one. But I still don't agree the current approach is not recommended. I will check your PR next week. Thanks again for your inputs and contribution. |
https://slack.dev/java-slack-sdk/guides/app-distribution
I realize you utilize
DefaultAWSCredentialsProviderChain.getInstance().getCredentials()
to retrieve credentials from env. But it truly sucks (lacks flexibility)You should provide a constructor that accepts these 3 parameters in constructor : awsAccessKey , awsSecretKey , region , and build AWS credential in the constructor.
The text was updated successfully, but these errors were encountered: