Skip to main content

AWS Aurora Serverless interactive terminal

Project description

AWS Aurora Serverless interactive terminal.

Introduction

The aurora-term app allows you to run SQL statements against Aurora Serverless databases without establishing a persistent connection, this is easily achieved thanks to the Data-API.

Besides the non-persistent connection it works just as any other interactive terminal like mysql-cli and psql.

Requirements

  • Python 3 and Pip.

  • An AWS IAM user authorized to access the Data API (with the AmazonRDSDataFullAccess policy for example).

  • Access key and secret access key properly configured for the same user (it can be done using the aws-cli).

Installation

The easiest and recommended way to install it is using Pip.

pip install aurora-term

Usage

Just specify the database cluster ARN, the secret manager ARN and the database name.

aurora-term --cluster="arn:aws:rds:..." --secret="arn:aws:secretsmanager:..." mydb

TIP:

There are a few environment variables that might come in handy, you can set them to avoid the need to pass all the credentials when starting aurora-term.

  • AWS_PROFILE Profile to be used.

  • RDS_CLUSTER_ARN Aurora cluster ARN.

  • RDS_SECRET_ARN Secret manager ARN.

  • RDS_DB_NAME Database name.

e.g.

export RDS_CLUSTER_ARN="arn:aws:rds:..."
export RDS_SECRET_ARN="arn:aws:secretsmanager:..."

aurora-term mydb

The interactive terminal looks like as follow.

aurora-term (0.1.0)
Type "help" or "?" for help.

mydb=#

For more usage details.

aurora-term -h

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aurora-term-0.1.0.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

aurora_term-0.1.0-py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page