Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import boto3
- import pymysql
- cliente = boto3.client('rds',region_name='us-east-2')
- token = cliente.generate_db_auth_token('endpoint.rds.amazonaws.com',3306,'usuarioiam')
- ssl = {'ca': 'rds-combined-ca-bundle.pem'}
- conexao = pymysql.connect(host='endpoint.rds.amazonaws.com',port=3306,user='usuarioiam',password=token, ssl=ssl)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement