All Projects → jbrt → Ec2cryptomatic

jbrt / Ec2cryptomatic

Licence: gpl-3.0
Encrypt EBS volumes from AWS EC2 instances

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Ec2cryptomatic

Aws Gate
Better AWS SSM Session manager CLI client
Stars: ✭ 294 (+848.39%)
Mutual labels:  aws, ec2
Rattlesnakeos Stack
Build your own privacy and security focused Android OS in the cloud.
Stars: ✭ 490 (+1480.65%)
Mutual labels:  aws, ec2
Ec2instances.info
Amazon EC2 instance comparison site
Stars: ✭ 3,619 (+11574.19%)
Mutual labels:  aws, ec2
Laravel Aws Eb
Ready-to-deploy configuration to run Laravel on AWS Elastic Beanstalk.
Stars: ✭ 247 (+696.77%)
Mutual labels:  aws, ec2
Geodesic
🚀 Geodesic is a DevOps Linux Distro. We use it as a cloud automation shell. It's the fastest way to get up and running with a rock solid Open Source toolchain. ★ this repo! https://slack.cloudposse.com/
Stars: ✭ 629 (+1929.03%)
Mutual labels:  aws, ec2
Aws Toolkit Eclipse
AWS Toolkit for Eclipse – an open-source plugin for developing, deploying, and managing AWS applications.
Stars: ✭ 252 (+712.9%)
Mutual labels:  aws, ec2
Bastillion Ec2
A web-based SSH console to execute commands and manage multiple EC2 instances simultaneously running on Amazon Web Services (AWS).
Stars: ✭ 410 (+1222.58%)
Mutual labels:  aws, ec2
Kitchen Ec2
A Test Kitchen Driver for Amazon EC2
Stars: ✭ 211 (+580.65%)
Mutual labels:  aws, ec2
Aws Security Viz
Visualize your aws security groups.
Stars: ✭ 511 (+1548.39%)
Mutual labels:  aws, ec2
Aws
A collection of bash shell scripts for automating various tasks with Amazon Web Services using the AWS CLI and jq.
Stars: ✭ 493 (+1490.32%)
Mutual labels:  aws, ec2
Komiser
☁️ Cloud Environment Inspector 👮🔒 💰
Stars: ✭ 2,684 (+8558.06%)
Mutual labels:  aws, ec2
Jungle
AWS operations by cli should be simpler
Stars: ✭ 842 (+2616.13%)
Mutual labels:  aws, ec2
Aws Ssh Config
Generate SSH config files from AWS EC2 inventory
Stars: ✭ 229 (+638.71%)
Mutual labels:  aws, ec2
Spark Jupyter Aws
A guide on how to set up Jupyter with Pyspark painlessly on AWS EC2 clusters, with S3 I/O support
Stars: ✭ 259 (+735.48%)
Mutual labels:  aws, ec2
Awsssmchaosrunner
Amazon's light-weight library for chaos engineering on AWS. It can be used for EC2, ECS (with EC2 launch type) and Fargate.
Stars: ✭ 214 (+590.32%)
Mutual labels:  aws, ec2
Bridgy
cloud inventory + ssh + tmux + sshfs
Stars: ✭ 374 (+1106.45%)
Mutual labels:  aws, ec2
Aws Cost Saver
A tiny CLI tool to help save costs in development environments when you're asleep and don't need them!
Stars: ✭ 178 (+474.19%)
Mutual labels:  aws, ec2
Gossm
💻Interactive CLI tool that you can connect to ec2 using commands same as start-session, ssh in AWS SSM Session Manager
Stars: ✭ 192 (+519.35%)
Mutual labels:  aws, ec2
Moto
A library that allows you to easily mock out tests based on AWS infrastructure.
Stars: ✭ 5,428 (+17409.68%)
Mutual labels:  aws, ec2
Ecs Refarch Continuous Deployment
ECS Reference Architecture for creating a flexible and scalable deployment pipeline to Amazon ECS using AWS CodePipeline
Stars: ✭ 776 (+2403.23%)
Mutual labels:  aws, ec2

EC2Cryptomatic

Github Action Docker Pulls Quality Gate Status

Encrypt EBS volumes from AWS EC2 instances

A serverless version of this script exists here: https://github.com/jbrt/ec2cryptomatic-serverless

Description

This tool let you :

  • Encrypt all the EBS volumes for an instance
  • If volumes already encrypted, re-encrypt these with the given key
  • Duplicate all the source tags to the target
  • Apply DeleteOnTermination flag if needs
  • Preserve the original volume or not as an option (thank to @cobaltjacket)
  • Start each instance after encrypting is complete (thank to @dshah22)

For your information, the workflow used to encrypt an EBS volume is:

  • Take a snapshot from the original volume
  • Create a new volume encrypted from that snapshot
  • Swap volumes
  • Delete source unencrypted volumes (if requested)

Note about version 2.x

Since version 1, EC2Cryptomatic was coded in Python. This version 2 is a complete rewriting of this tool in Golang.

Why Golang instead of Python ? Principally because of fun and for training for the author on that language.

Golang is also a good option for a CLI tool like this (more portable than Python).

Python version is still available at git tag 1.2.4.

Prerequisites

EC2Cryptomatic needs the following IAM rights:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Stmt1504425390448",
            "Action": [
                "ec2:AttachVolume",
                "ec2:CopyImage",
                "ec2:CopySnapshot",
                "ec2:CreateSnapshot",
                "ec2:CreateVolume",
                "ec2:CreateTags",
                "ec2:DeleteSnapshot",
                "ec2:DeleteVolume",
                "ec2:DescribeInstances",
                "ec2:DescribeSnapshots",
                "ec2:DescribeVolumes",
                "ec2:DetachVolume",
                "ec2:ModifyInstanceAttribute",
                "ec2:StartInstances"
            ],
            "Effect": "Allow",
            "Resource": "*"
        }
    ]
}

Syntax

Here is the syntax of ec2cryptomatic. You have to specify a AWS region name and one EC2 instance ID.

Encrypt all EBS volumes for the given instances

Usage:
  ec2cryptomatic run [flags]

Flags:
  -d, --discard           Discard source volumes after encryption process (default: false)
  -h, --help              help for run
  -i, --instance string   Instance ID of instance of encrypt (required)
  -k, --kmskey string     KMS key alias name (default "alias/aws/ebs")
  -r, --region string     AWS region (required)

Docker

You can build a Docker image of that tool with the Dockerfile provided in this repository :

docker build -t ec2cryptomatic:latest .

Or you can use the image already pulled into the official Docker Hub:

docker pull jbrt/ec2cryptomatic

Binaries

If you do not want to use Docker, you can use a binary version (accessible from the release section). Versions currently supported:

  • Linux (x86_64, ARM)
  • FreeBSD (x86_64, ARM)
  • MacOS/Darwin (x86_64 only)
  • Windows (x86_64 only)

Example

example

License

This project is under GPL3 license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].