How to I authenticate to an Amazon RDS DB instance using IAM credentials? IAM Access To RDS

Поделиться
HTML-код
  • Опубликовано: 31 янв 2025
  • НаукаНаука

Комментарии • 28

  • @AlagurajaIndiafilings
    @AlagurajaIndiafilings 2 года назад +1

    Thanks for the video, this is my starting point in MySQL-IAM

  • @mattcarlin2873
    @mattcarlin2873 5 лет назад

    Some questions that aren't clear from the video:
    1) I just use the EC2 service for the IAM role, correct?
    2) Does the IAM role need to be attached to a specific instance?
    3) What or who's credentials am I meant to be using for AWS CLI access in order to run the "aws RDS generate-db-auth-token" command?
    I've followed the guide precisely but some areas aren't detailed enough and I'm failing to log in with the authtoken that I'm generating.
    Thanks.

    • @ValaxyTechnologies
      @ValaxyTechnologies  5 лет назад

      In the pre-requisite 3 of the document, you see the permissions that are attached to the role. The ec2 instance will leverage these permission to generate the token and use the same to communicate to the RDS Instance.

  • @Jargal200
    @Jargal200 5 лет назад +1

    Here you explained, it is not suitable for production, what your suggested best practice for production. Thank you.

    • @ValaxyTechnologies
      @ValaxyTechnologies  5 лет назад +1

      (YMMV)If the number of connections to your database is going to be very low, then you can still use this in production. But those kind of uses cases are very rare.
      Ideally, you will have a userid/password for your db to connect.

  • @nagarajubalusa2598
    @nagarajubalusa2598 5 лет назад +1

    This really gave good insights to how to connect to MySQL with IAM. Do you have any video on PostgreSQL with same requirement...if not would love to see one. Thanks!

    • @ValaxyTechnologies
      @ValaxyTechnologies  5 лет назад +1

      PostgreSQL should (most probably) use similar syntax. Shouldn't be too difficult to set it up yourself based on this one. If you have any difficulty let us know, We can help. Good Luck; Happy Learning

  • @himagreshmasuri4263
    @himagreshmasuri4263 5 лет назад

    We are using postgre rds and we tried all this procedures for IAM authentication to postgrerds but it's not working can you please post a video regarding postgre rds

  • @leoswaldo
    @leoswaldo 5 лет назад +1

    you dont need to have mysql service running in the "tux" box, you only need to have the mysql client installed

    • @ValaxyTechnologies
      @ValaxyTechnologies  5 лет назад

      Correct! Can you raise a 'Pull Request(PR)"?

    • @leoswaldo
      @leoswaldo 5 лет назад +1

      @@ValaxyTechnologies More than happy to ;) github.com/miztiik/AWS-Demos/pull/9

  • @TheSreemanth
    @TheSreemanth 2 года назад

    thanks for Video. So if I have 100 users should I attach 100 inline policies to my EC2? Do I still need to attach inline policy, even after creating db account for user and configuring him with RDS to connect through IAM?

    • @Rickety3263
      @Rickety3263 Год назад

      Inline policies can't be attached, as they only live inside a single place inside a role. The permissions he's adding is the ROLE that the EC2 will ASSUME when interacting with the database. It simply allows the EC2 permissions to "rds:connect" to the resource (user@database). Any number of ec2's could assume that role simultaneously.
      You could also create a single policy attached to a single iam group and add your users there.
      If there's a use case where your EC2 might have to connect to a database as 100 different users, I would suggest adding a wildcard to the policy expression where the username is, but my gut says there's a better overall solution for what you might be trying to accomplish.

  • @stevenroman21
    @stevenroman21 5 лет назад

    There is a way to use IAM to connect with MySQLWorkbench?

    • @ValaxyTechnologies
      @ValaxyTechnologies  5 лет назад

      Interesting question, I dont know the features of workbench.
      I would look to see if workbench can leverage the role/credentials from environment variables.

    • @ricardoramirez1069
      @ricardoramirez1069 5 лет назад +3

      aws.amazon.com/blogs/database/use-iam-authentication-to-connect-with-sql-workbenchj-to-amazon-aurora-mysql-or-amazon-rds-for-mysql/

  • @kamalakshigovali7349
    @kamalakshigovali7349 6 лет назад

    The screen was not clear..

    • @ValaxyTechnologies
      @ValaxyTechnologies  6 лет назад +1

      This video is available in High Definition @ 1080p. Can you please try changing the resolution of the video when you are watching? RUclips usually adjusts it based on your internet speed.

  • @BoYcLuE
    @BoYcLuE 2 года назад

    I was able to genrate the token without token variable, however, when I try to authenticate the last step I get the following error: ERROR 1045 (28000): Access denied for user 'db_iam_user'@'172.x.x.xxx' (using password: YES). I haven't figured it out yet...