Giter Site home page Giter Site logo

ebs-volumes's Introduction

ebs-volumes

ebs volumes

ebs-volumes is a utility used to attach and detach AWS EBS volumes to / from an EC2 instance.

Tags set against the EC2 instance are used to designate the EBS volumes to use, and also whether volumes should be detached.

As the utility is run on the EC2 instance an IAM role must be applied with a policy that allows reading tags and assigning volumes.

Operations

All operations with ebs-volumes must be run on the EC2 instance you wish to attach or detach volumes from. For detailed options simply invoke ebs-volumes with no arguments to get help.

Attaching volumes

Tags are used to indicate which volumes the EC2 instance can attach. The format used is

volume_<device_name> = <volume_id>

For example

volume_/dev/sdh = vol-1234567890abcdef0

To run the attach operation

$ ./ebs-volumes attach

If the operation fails for any volume a non zero exit code is returned.

Detaching volumes

To detach volumes the tag detach_volumes must be set to true.

To run the detach operation

$ ./ebs-volumes detach

If the operation fails for any volume a non zero exit code is returned.

IAM Roles and Policy

The EC2 instance needs permission to read its own tags, and examine, attach and detach the designated volumes.

For example

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "ec2:DescribeTags",
        "ec2:DescribeVolumes",
        "ec2:AttachVolume",
        "ec2:DetachVolume"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}

ebs-volumes's People

Contributors

sneakybeaky avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

ebs-volumes's Issues

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.