ecs-connect


Nameecs-connect JSON
Version 3.1.2 PyPI version JSON
download
home_pagehttps://github.com/saurabhjambhule/ecs_connect
SummarySeamlessly connect to containers running in ECS.
upload_time2022-12-22 08:42:24
maintainer
docs_urlNone
authorSaurabh Jambhule
requires_python>=3.5
licenseMIT license
keywords ecs_connect ecs
VCS
bugtrack_url
requirements click boto3 botocore ConfigParser websockets inquirer
Travis-CI
coveralls test coverage No coveralls.
            ===========
ECS Connect
===========


.. image:: https://img.shields.io/pypi/v/ecs_connect.svg
        :target: https://pypi.python.org/pypi/ecs_connect


Seamlessly connect to containers running in ECS.

Requirements
------------
EC2 Based
#########
For EC2 based ECS deploymnets, you need SSM Session Manager enabled on the EC2 instances. For enabling SSM Sessions refer `this. <https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html>`__

Make sure you have set proper IAM permissions for the developer going to access containers deployed in EC2 using ecs-connect tool.

Fargate Based
##############
For Fargate based ECS deploymnets, the SSM Session Manager can't be enabled directly as undelying EC2 instances are managed by AWS. So a Bastion node, an EC2 instances with SSM Session Manager enabled is required. For enabling SSM Sessions refer `this. <https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html>`__

Also, the SSHD must be installed on the container to which you want to connect. And you need to create SSH keys and place them in the container and the bastion node. To setup SSH keys refer `this. <https://linuxize.com/post/how-to-setup-passwordless-ssh-login/>`_ Make sure you have placed SSH key in bastion node at **home/ssm-user/bastion** (where *bastion* is a key name)

Usage
--------
``ecs_connect --profile <profile> --cluster <cluster name> --service <service name> --cmd <init cmd>``


Example
--------
``ecs_connect``

If nothing is provided, then config will be pulled from default profile saved in ~/.ecs_connect config file.

Optional flags:

* **--profile** Name of the profile to use in ~/.ecs-connect. If none is provided, then the default profile will be used.
* **--cluster** Name of the ECS cluster.
* **--service** Name of the service.
* **--task** Started by name. If provided, the service will be ignored.
* **--cmd** Initilization command to run, will be executed once connected to container. If provided, then parameter from profile will be overridden.
* **--all** Displays all running containers, for ECS EC2 based running tasks/services.
* **--verbose** More verbose output.
* **--debug** Very verbose output. Useful for debugging.

Additional options available in only config file:
* **--ssh_user** User name for ssh into fargate based service.
* **--ssh_key** SSH key path on bastion node.

Note
--------

* Set **cmd** to **sh** or **bash** depending on container os to get shell access.
* <service name> will be used to filter containers.

Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


=======
History
=======

0.1.0 (2020-03-02)
------------------

* First release on PyPI.

1.2.0 (2020-06-10)
------------------

* Added support for referencing task using started by value

1.2.3 (2020-09-09)
------------------

* Make task parameter optional for service based deploys

2.0.0 (2020-10-22)
------------------

* Add support for selecting aws profile

2.0.1 (2021-10-28)
------------------

* Add support for specifying ssh user and path of the ssh key in bastion node

3.0.0 (2022-06-29)
------------------

* Add support for ecs exec command

3.1.0 (2022-08-11)
------------------

* Add support for interactive mode

3.1.1 (2022-08-23)
------------------

* Fix list returns limited results

3.1.2 (2022-12-22)
------------------

* Fix exec command when task is given



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/saurabhjambhule/ecs_connect",
    "name": "ecs-connect",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": "",
    "keywords": "ecs_connect,ecs",
    "author": "Saurabh Jambhule",
    "author_email": "saurabhjambhule@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1e/59/bcd6855cec652938a0b6ff6296621fbb26eaca559c18b135fc3920a22feb/ecs_connect-3.1.2.tar.gz",
    "platform": null,
    "description": "===========\nECS Connect\n===========\n\n\n.. image:: https://img.shields.io/pypi/v/ecs_connect.svg\n        :target: https://pypi.python.org/pypi/ecs_connect\n\n\nSeamlessly connect to containers running in ECS.\n\nRequirements\n------------\nEC2 Based\n#########\nFor EC2 based ECS deploymnets, you need SSM Session Manager enabled on the EC2 instances. For enabling SSM Sessions refer `this. <https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html>`__\n\nMake sure you have set proper IAM permissions for the developer going to access containers deployed in EC2 using ecs-connect tool.\n\nFargate Based\n##############\nFor Fargate based ECS deploymnets, the SSM Session Manager can't be enabled directly as undelying EC2 instances are managed by AWS. So a Bastion node, an EC2 instances with SSM Session Manager enabled is required. For enabling SSM Sessions refer `this. <https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html>`__\n\nAlso, the SSHD must be installed on the container to which you want to connect. And you need to create SSH keys and place them in the container and the bastion node. To setup SSH keys refer `this. <https://linuxize.com/post/how-to-setup-passwordless-ssh-login/>`_ Make sure you have placed SSH key in bastion node at **home/ssm-user/bastion** (where *bastion* is a key name)\n\nUsage\n--------\n``ecs_connect --profile <profile> --cluster <cluster name> --service <service name> --cmd <init cmd>``\n\n\nExample\n--------\n``ecs_connect``\n\nIf nothing is provided, then config will be pulled from default profile saved in ~/.ecs_connect config file.\n\nOptional flags:\n\n* **--profile** Name of the profile to use in ~/.ecs-connect. If none is provided, then the default profile will be used.\n* **--cluster** Name of the ECS cluster.\n* **--service** Name of the service.\n* **--task** Started by name. If provided, the service will be ignored.\n* **--cmd** Initilization command to run, will be executed once connected to container. If provided, then parameter from profile will be overridden.\n* **--all** Displays all running containers, for ECS EC2 based running tasks/services.\n* **--verbose** More verbose output.\n* **--debug** Very verbose output. Useful for debugging.\n\nAdditional options available in only config file:\n* **--ssh_user** User name for ssh into fargate based service.\n* **--ssh_key** SSH key path on bastion node.\n\nNote\n--------\n\n* Set **cmd** to **sh** or **bash** depending on container os to get shell access.\n* <service name> will be used to filter containers.\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.1.0 (2020-03-02)\n------------------\n\n* First release on PyPI.\n\n1.2.0 (2020-06-10)\n------------------\n\n* Added support for referencing task using started by value\n\n1.2.3 (2020-09-09)\n------------------\n\n* Make task parameter optional for service based deploys\n\n2.0.0 (2020-10-22)\n------------------\n\n* Add support for selecting aws profile\n\n2.0.1 (2021-10-28)\n------------------\n\n* Add support for specifying ssh user and path of the ssh key in bastion node\n\n3.0.0 (2022-06-29)\n------------------\n\n* Add support for ecs exec command\n\n3.1.0 (2022-08-11)\n------------------\n\n* Add support for interactive mode\n\n3.1.1 (2022-08-23)\n------------------\n\n* Fix list returns limited results\n\n3.1.2 (2022-12-22)\n------------------\n\n* Fix exec command when task is given\n\n\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Seamlessly connect to containers running in ECS.",
    "version": "3.1.2",
    "split_keywords": [
        "ecs_connect",
        "ecs"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "c02deaa9228aca98874892f7c956a9b7",
                "sha256": "9fe3b92870c67837ff703604b35ed921cfd0ab06b07c1af9b1334573924aeeb8"
            },
            "downloads": -1,
            "filename": "ecs_connect-3.1.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c02deaa9228aca98874892f7c956a9b7",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.5",
            "size": 10209,
            "upload_time": "2022-12-22T08:42:22",
            "upload_time_iso_8601": "2022-12-22T08:42:22.625065Z",
            "url": "https://files.pythonhosted.org/packages/54/e3/a73a4ac7c8732f6465228acf54593b07e840cdf11c7a227e06fa75f2bc69/ecs_connect-3.1.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "3f49208dba1304d45b42281e1581ff8a",
                "sha256": "306daf11349d62414530c15d69fe6aeaec44c54f98d26971a7fdd8e4e0288778"
            },
            "downloads": -1,
            "filename": "ecs_connect-3.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "3f49208dba1304d45b42281e1581ff8a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5",
            "size": 12458,
            "upload_time": "2022-12-22T08:42:24",
            "upload_time_iso_8601": "2022-12-22T08:42:24.164899Z",
            "url": "https://files.pythonhosted.org/packages/1e/59/bcd6855cec652938a0b6ff6296621fbb26eaca559c18b135fc3920a22feb/ecs_connect-3.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-22 08:42:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "saurabhjambhule",
    "github_project": "ecs_connect",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "click",
            "specs": [
                [
                    ">=",
                    "7.0"
                ]
            ]
        },
        {
            "name": "boto3",
            "specs": [
                [
                    ">=",
                    "1.16.9"
                ]
            ]
        },
        {
            "name": "botocore",
            "specs": [
                [
                    ">=",
                    "1.19.9"
                ]
            ]
        },
        {
            "name": "ConfigParser",
            "specs": [
                [
                    ">=",
                    "4.0.2"
                ]
            ]
        },
        {
            "name": "websockets",
            "specs": [
                [
                    ">=",
                    "8.1"
                ]
            ]
        },
        {
            "name": "inquirer",
            "specs": [
                [
                    ">=",
                    "2.10.0"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "ecs-connect"
}
        
Elapsed time: 0.02301s