feature/rds/auth: RDS BuildAuthToken returns certificate error when using code specified in documentation #2698
Labels
feature-request
A feature should be added or improved.
p2
This is a standard priority issue
queued
This issues is on the AWS team's backlog
Acknowledgements
go get -u github.com/aws/aws-sdk-go-v2/...
)Describe the bug
I am trying to connect to a mysql instance with IAM using the AWS SDK for go v2 and wrote code as described here and when I make queries I get back the error
tls: failed to verify certificate: x509: certificate signed by unknown authority
I was able to follow the comment seen here aws/aws-sdk-go#1248 (comment) and do something similar to handle certs manually and got it to work, but it seems like the kind of thing that could be handled by the sdk (or if that's not possible for some reason, it should be in the documentation)
Expected Behavior
I would expect the listed documentation to be enough to make a connection to mysql without a certificate error
Current Behavior
Following documentation to connect to mysql with IAM with the aws-sdk-go-v2 results in the following error
tls: failed to verify certificate: x509: certificate signed by unknown authority
Reproduction Steps
Using 8.0.mysql_aurora.3.05.2 and github.com/aws/aws-sdk-go-v2 v1.30.0
This following code (taken from aws docs) results in the error:
Possible Solution
Changing the following fixes it:
It does feel like maybe this is the kind of thing that could happen in the sdk when you call buildAuthToken, or potentially in a helper function that you reference first and appears in documentation.
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
Compiler and Version used
go version go1.22.4 darwin/arm64
Operating System and version
macOS Sonoma Version 14.5
The text was updated successfully, but these errors were encountered: