question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problems connecting to AWS RDS Instance using new IAM Authentication Feature

See original GitHub issue

Has anyone been able to connect successfully to an AWS RDS instance using the new IAM authentication feature? I am able to generate the ephemeral authentication token with no problem, but when I pass it as a password when connecting to database I get this error:

<-- ErrorPacket
ErrorPacket {
  fieldCount: 255,
  errno: 1251,
  sqlStateMarker: '#',
  sqlState: '08004',
  message: 'Client does not support authentication protocol requested by server; consider upgrading MySQL client' }

I am using version 2.13 of the driver.

AWS Documentation:

Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
elephantjimcommented, Jun 3, 2017

For anyone else who lands here, mysql_clear_password is needed to be able to connect to an Aurora database on AWS RDS when using IAM auth tokens. The connection to the RDS instance is over SSL, and the authentication token is sent in the clear (because it’s already an HMAC signature).

Switching to mysql2 and applying @angiolep’s fix in https://github.com/sidorares/node-mysql2/issues/438#issuecomment-255343793 worked for me.

0reactions
maulerjancommented, Feb 1, 2019

For me it worked after specifying ssl: 'Amazon RDS' in options.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve issues connecting to Amazon RDS for PostgreSQL or ...
IAM authentication is turned off; Insufficient IAM role permissions or incorrect policy; Database user is improperly configured; Incorrect ...
Read more >
How do I troubleshoot Access Denied errors when I connect to ...
... shows you how to troubleshoot Access Denied errors when I connect to RDS for MySQL with IAM authentication. Subscribe: More AWS videos ......
Read more >
Troubleshooting for RDS Proxy - 亚马逊云科技
IAM authentication failed for user user_name . Check the IAM token for this user and try again. This error might be due to...
Read more >
RDS IAM Authentication with Spring Boot - secure password ...
Enabling IAM authentication alone is not enough. When you create a new database user for your application, you also need to grant the...
Read more >
IAM Database Authentication for RDS - Trend Micro
Ensure IAM Database Authentication feature is enabled for your AWS RDS MySQL and PostgreSQL database instances.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found