Giter Site home page Giter Site logo

dawn's Introduction

Dawn - AWS Aurora Serverless Client

A Command-line client to talk with Aurora Serverless Cluster.

Requirements

  1. Python 3.8+ (May work on 3.x versions, not tested. Feedbacks are welcome)
  2. Aurora Serverless Cluster with Data API Enabled (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html)
  3. AWS Client Credentials configured (https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html)

Installation

From PyPI Repository

Yet to be published ;)

TBD

From Source

You do not have to wait for an Official release on PyPI. Clone this repository and run:

python setup.py install

Running

$ dawncli <cluster-arn> <secret-arn> <database>

See the example below:

somedb | mysql> select 1 from dual;
{
    "ResponseMetadata": {
        "HTTPHeaders": {
            "content-length": "58",
            "content-type": "application/json",
            "date": "Sun, 13 Sep 2020 13:10:17 GMT",
            "x-amzn-requestid": "4f2f1808-2a7c-4c4a-8148-d2208cc1079a"
        },
        "HTTPStatusCode": 200,
        "RequestId": "4f2f1808-2a7c-4c4a-8148-d2208cc1079a",
        "RetryAttempts": 0
    },
    "numberOfRecordsUpdated": 0,
    "records": [
        [
            {
                "longValue": 1
            }
        ]
    ]
}

somedb | mysql> 

So far the output is JSON. A tabular output is planned!

dawn's People

Contributors

leonardossz avatar

Watchers

 avatar

dawn's Issues

Tabular view

A tabular view (like the standard mysql client) requires parsing the result from rds-data API client.

Error terminates the console

Pretty much any error terminates the console.

somedb | mysql> select x
Traceback (most recent call last):
  File "/home/leo/.local/share/virtualenvs/mysql-dawn-MQ0Qwhqr/bin/dawncli", line 11, in <module>
    load_entry_point('dawncli==0.0.1', 'console_scripts', 'dawncli')()
  File "/home/leo/.local/share/virtualenvs/mysql-dawn-MQ0Qwhqr/lib/python3.8/site-packages/dawncli-0.0.1-py3.8.egg/dawncli/client.py", line 47, in main
  File "/home/leo/.local/share/virtualenvs/mysql-dawn-MQ0Qwhqr/lib/python3.8/site-packages/dawncli-0.0.1-py3.8.egg/dawncli/client.py", line 21, in execute
  File "/home/leo/.local/share/virtualenvs/mysql-dawn-MQ0Qwhqr/lib/python3.8/site-packages/botocore-1.17.60-py3.8.egg/botocore/client.py", line 337, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/leo/.local/share/virtualenvs/mysql-dawn-MQ0Qwhqr/lib/python3.8/site-packages/botocore-1.17.60-py3.8.egg/botocore/client.py", line 656, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.BadRequestException: An error occurred (BadRequestException) when calling the ExecuteStatement operation: Unknown column 'x' in 'field list'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.