{"id":18171563,"url":"https://github.com/avishayil/secure_ec2","last_synced_at":"2025-04-01T14:32:32.543Z","repository":{"id":44769975,"uuid":"387874815","full_name":"avishayil/secure_ec2","owner":"avishayil","description":"CLI tool that helps you to provision EC2 instances securely","archived":false,"fork":false,"pushed_at":"2022-01-25T23:05:19.000Z","size":19447,"stargazers_count":6,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-15T13:34:45.862Z","etag":null,"topics":["aws","cloud-security","ec2"],"latest_commit_sha":null,"homepage":"https://avishayil.medium.com/you-shouldnt-use-the-ec2-launch-wizard-321543a962ad","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avishayil.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-20T18:03:08.000Z","updated_at":"2022-01-11T21:07:15.000Z","dependencies_parsed_at":"2022-08-29T00:50:59.095Z","dependency_job_id":null,"html_url":"https://github.com/avishayil/secure_ec2","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avishayil%2Fsecure_ec2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avishayil%2Fsecure_ec2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avishayil%2Fsecure_ec2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avishayil%2Fsecure_ec2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avishayil","download_url":"https://codeload.github.com/avishayil/secure_ec2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246604610,"owners_count":20804100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cloud-security","ec2"],"created_at":"2024-11-02T15:09:17.153Z","updated_at":"2025-04-01T14:32:31.332Z","avatar_url":"https://github.com/avishayil.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==========\nSecure EC2\n==========\n\n\n.. image:: https://img.shields.io/pypi/v/secure_ec2.svg\n        :target: https://pypi.python.org/pypi/secure_ec2\n\n.. image:: https://github.com/avishayil/secure_ec2/actions/workflows/test.yml/badge.svg\n        :target: https://github.com/avishayil/secure_ec2/actions/workflows/test.yml\n\n.. image:: https://readthedocs.org/projects/secure-ec2/badge/?version=latest\n        :target: https://secure-ec2.readthedocs.io/en/latest/?version=latest\n        :alt: Documentation Status\n\n.. image:: coverage.svg\n        :target: https://coverage.readthedocs.io/\n        :alt: Coverage\n\nCLI tool that helps you to provision EC2 instances securely\n\n\n* Free software: MIT license\n* Documentation: https://secure-ec2.readthedocs.io.\n\n\nTL;DR\n======\n\n.. code-block:: bash\n\n  $ brew tap avishayil/homebrew-taps \u0026\u0026 brew install secure-ec2 # Install secure_ec2 via homebrew\n  § secure_ec2 config # Generating secure launch configuration\n  § secure_ec2 launch # Launching instance(s) according to the generated launch configuration\n\n\nUsage \u0026 Installation\n=====================\n\n**Install via Homebrew**\n\n.. code-block:: bash\n\n    § brew tap avishayil/homebrew-taps\n    § brew install secure-ec2\n\n**Install via pip**\n\n.. code-block:: bash\n\n    § pip install secure_ec2\n\n**Usage**\n\n.. code-block:: bash\n\n    § secure_ec2\n\n      Usage: secure_ec2 [OPTIONS] COMMAND [ARGS]...\n\n        CLI tool that helps you to provision EC2 instances securely\n\n      Options:\n        --help  Show this message and exit.\n\n      Commands:\n        config\n        launch\n\n**Configuration**\n\n.. code-block:: bash\n\n    § secure_ec2 config\n\n      ? What type of OS?\n      1) Windows\n      2) Linux\n      Answer: 1\n\nThe first thing that `secure_ec2` does is to create a persistent launch configuration per operating system. The current operating systems supported are Windows and Linux, and updates to the launch configuration are being made per operating system.\n`secure_ec2` will later on look for the launch template to launch your instances, but you can also use these templates to launch instances yourself later on.\nIn the configuration phase, the following steps are done behind the scenes:\n\n* Look for the default VPC and public subnet on the selected operating region.\n* Provision a security group, with open ingress to the computer public IP according to the selected operating system port for future use.\n* Provision a launch template that utilize the VPC, subnet and security group settings\n\n**Instance Provisioning**\n\nExample for launching a Linux instance with Keypair:\n\n.. code-block:: bash\n\n    § secure_ec2 launch\n\n      ? What type of OS?  Linux\n      ? How many instances?  1\n      ? Keypair  demo-kp\n      ? Instance Type  t2.micro\n\nExample for launching a Windows instance with Session Manager access:\n\n.. code-block:: bash\n\n    § secure_ec2 launch\n\n      ? What type of OS?  Windows\n      ? How many instances?  1\n      ? Keypair  None\n      ? Instance Type  t2.micro\n\n**Command Line Usage:**\n\n.. code-block:: bash\n\n  § secure_ec2 config -t Linux # Generate launch template for Linux instances\n  § secure_ec2 config -t Windows # Generate launch template for Windows instances\n  § secure_ec2 launch -t Linux -n 3 -k None -i t2.micro # Provision 3 Linux instance with Session Manager access\n  § secure_ec2 launch -t Windows -n 1 -k demo-kp -i t2.micro # Provision a Windows instance with Keypair\n\n**CLI Configuration Parameters:**\n\n===========================  ======== ============ ===========================================================\n  Configuration Parameter      Type     Required     Description\n===========================  ======== ============ ===========================================================\n-t --os_type                 str      True         Operating system (Linux / Windows)\n-n --num_instances           int      True         Number of instances to provision securely\n-k --keypair                 str      True         Keypair name to launch the instance with\n-i --instance_type           str      True         Instance type, affects compute \u0026 networking performance\n-nc --no_clip                bool     False        Instruct the tool to not copy the SSM url to the clipboard\n-p --profile                 str      False        AWS profile name to use\n-r --region                  str      False        AWS region to use\n===========================  ======== ============ ===========================================================\n\nFeatures\n--------\n\n* Provision EC2 instance with keypair securely\n* Provision EC2 instance without keypair (Session Manager access) securely\n\n\nDemo\n----\n\nLinux\n=====\n\nThe following example runs a Linux instance with SSH access using keypair:\n\n.. image:: screenshots/linux.gif\n        :alt: Linux Example\n\nWindows\n=======\n\nThe following example runs a Windows instance with Session Manager access:\n\n.. image:: screenshots/windows.gif\n        :alt: Windows Example\n\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favishayil%2Fsecure_ec2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favishayil%2Fsecure_ec2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favishayil%2Fsecure_ec2/lists"}