Simple AWS EC2 CLI
Formula is available at dtan4/homebrew-dtan4.
$ brew tap dtan4/dtan4
$ brew install ec2c
Precompiled binaries are available at GitHub Releases.
$ go get -d github.com/dtan4/ec2c
$ cd $GOPATH/src/github.com/dtan4/ec2c
$ make
$ make install
Before using ec2c, ensure that you have credentials in ~/.aws/credentials
, which might look like:
[default]
aws_access_key_id = AKID1234567890
aws_secret_access_key = MY-SECRET-KEY
Alternatively, you can set the following environment variables:
export AWS_ACCESS_KEY_ID=AKID1234567890
export AWS_SECRET_ACCESS_KEY=MY-SECRET-KEY
In addition to credentials, you must specify the region by the environmental variable:
export AWS_REGION=ap-northeast-1
Alternatively, you can enable support for the shared config ~/.aws/config
.
See the aws-sdk-go documentation for further information.
Cancel the specified EC2 Spot Instance requests
Launch new EC2 instance
List EC2 instances
List Spot Instance requests
Request new Spot Instances
Tagging to EC2 instance
Delete tag from the specified EC2 instance
Terminate the specified EC2 instance
- Fork (https://github.com/dtan4/ec2c/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
go test ./...
command and confirm that it passes - Run
gofmt -s
- Create a new Pull Request