aws / aws-sdk-java-v2

The official AWS SDK for Java - Version 2
Apache License 2.0
2.2k stars 848 forks source link

Guidance for generating an RDS IAM token using v2 SDK #3557

Open philipowen opened 1 year ago

philipowen commented 1 year ago

Describe the issue

Following on from #1157 it would be great if documentation could be provided to indicate how to obtain an RDS IAM token using the V2 SDK. In V1 this was achieved with com.amazonaws.services.rds.auth.RdsIamAuthTokenGenerator but this class does not appear to have an equivalent in V2 (that I could find).

Links

Existing V1 mechanism in the RDS documentation

philipowen commented 1 year ago

I think I may have found what I'm looking for in the Jave SDK V2 examples May be worth something more prominent.

Thanks.

yasminetalby commented 1 year ago

Hello @philipowen ,

Thank you very much for your feedback. We have am example page in the AWS Java SDK Developer guide for v2 that covers how to perform actions and implement common scenarios by using the AWS SDK for Java 2.x with Amazon RDS.

This page also redirect to the AWS docs repository mentioned above for more examples and use cases. I was wondering if you had any suggestion on improvement we can make to the currently available documentation/ any suggestion of what you would like to see?

Thank you very much for you feedback and contribution.

Sincerely,

Yasmine

philipowen commented 1 year ago

Hi @yasminetalby

Yes, I think a section in there on how to generate an IAM token using the V2 SDK would be useful. If only because it would hopefully come up when you google for AWS IAM SDK V2 or similar. The example in github was very helpful, but not easily found from a search engine.

I appreciate that at least it is somewhere though 😉

yasminetalby commented 1 year ago

Hello @philipowen ,

This make sense, it would save a lot of research time. I will bring this up to the doc team so that they can make this documentation available directly on the dev guide for better visibility Thank you for your feedback!

Sincerely,

Yasmine

philipowen commented 1 year ago

Thank you Yasmine.

LeonardGC commented 1 year ago

Hi @yasminetalby ,

The examples in Connecting to your DB instance using IAM authentication and the AWS SDK for Java still uses V1 instead of V2. But the link to AWS SDK for Java (at the bottom of the page) points to V2.

What would be really helpful (for all code in the documentation) is the addition of:

Now I had to first search in what package the classes were. This didn't make sense at all, because I was already using V2, but didn't knew that there is also an earlier version. Finding code for this new version was very hard, though. It was only here that I found the sample code.

Kind regards

yasminetalby commented 1 year ago

Hello @LeonardGC ,

Thank you very much for your submission. Your feedback is extremely helpful.

I will bring this up to the RDB documentation team so that they can work on adding V2 documentation in the Amazon RDB user guide.

The AWS Java SDK V2 documentation points to the AWS Java SDK V2 examples because it is a user guide specifically for the V2 SDK. (There exist user guides both for the V1 and V2 Java SDK both containing example in the appropriate version) I agree it would be very beneficial for the RDB user guide to specify which version is being used). In the meantime there is a quick way to check on answer for both of your question:

The code samples contain the dependency being used. Java SDK V1 dependencies start with com.amazonaws, Java SDK V2 dependencies start with software.amazon.awssdk.

I will raise the need to provide documentation for the V2 SDK on the service developer guide as well as explicitly specifying which version of the SDK is being used.

In the meantime, a quick way to access documentation for the AWS Java SDK V2 is to check out the Java V2 section of the awsdocs/aws-doc-sdk-examples repository. This section contains example code for different services and use cases using solely the AWS Java SDK V2. If you would like to see specific use case documented, it is also the place to submit a documentation request to the AWS Documentation team.

Let me know if you have any further questions or feedback.

Sincerely,

Yasmine

yangfan15 commented 1 year ago

Hello, @yasminetalby , I meet the same problem, how is the progress now?

Thanks

yasminetalby commented 1 year ago

Hello @yangfan15 ,

Thank you very much for bringing this up to my attention. The documentation not being owned by the SDK Team but rather by the service team. Are you missing any documentation/blocked by this? I have linked all currently available documentation for the V2 SDK. As mentioned above, If you would like to see specific use case documented, it is the place to submit a documentation request to the AWS Documentation team.

Let me know if you have any further questions or inquiries.

Best regards,

Yasmine