Skip to content

ValueError: port should be of type int, when connecting MySQL with Secrets Manager #1484

@Kit-Ok

Description

@Kit-Ok

Describe the bug

When connecting MySQL with Secrets Manager, pymysql.connect method raises the ValueError.

How to Reproduce

import awswrangler as wr
import boto3

SECRET_MANAGER_ARN = 'secret_manager_arn_here'

session = boto3.Session(profile_name='your-profile-name')
wr.mysql.connect(secret_id=SECRET_MANAGER_ARN, boto3_session=session)

I could not find the way to specify the data type of the value in Secrets Manager.

Expected behavior

Successfully connect to MySQL.

I think It's better to cast the port number on this line, same as this line

Your project

No response

Screenshots

No response

OS

Mac (macOS Monterey)

Python version

3.9.13

AWS DataWrangler version

2.16.1

Additional context

I'm new to OSS project.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions