Home > front end >  Glue database connection update username aws cli/boto3
Glue database connection update username aws cli/boto3

Time:10-29

Trying to update Glue database JDBC connection username and keep failing. choices are CLI or boto3. CLI docs are so limited.
https://docs.aws.amazon.com/cli/latest/reference/glue/update-connection.html

  update-connection
[--catalog-id <value>]
--name <value>
--connection-input <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Can someone guide, how to pass username to update here. Also similar in boto3. Throwing exception of invalid parameter.

response = client.update_connection(
        Name='test-db',
        ConnectionInput={
            'Name': 'test-db',

            'ConnectionType': 'JDBC' ,
            'ConnectionProperties': {
                'Username': username
            }
        }
    )

CodePudding user response:

Try:

'ConnectionProperties': {
            'USER_NAME': 'your_user_name',
            'PASSWORD' : 'your_user_password'
        }

Caution: Above is not tested. Its based on Glue Boto3 documentation from here.

CodePudding user response:

So it supposed to be like this.

  'USERNAME': username,
  'PASSWORD': password
            },
   'PhysicalConnectionRequirements': PhysicalConnectionRequirements
        }
    )

  • Related