https://github.com/cheran-senthil/run-on-ec2
CLI to quickly execute scripts on an AWS EC2 instance
https://github.com/cheran-senthil/run-on-ec2
aws cli ec2
Last synced: about 1 year ago
JSON representation
CLI to quickly execute scripts on an AWS EC2 instance
- Host: GitHub
- URL: https://github.com/cheran-senthil/run-on-ec2
- Owner: cheran-senthil
- License: apache-2.0
- Created: 2020-01-27T17:05:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-25T01:30:09.000Z (over 3 years ago)
- Last Synced: 2025-03-27T21:11:06.491Z (over 1 year ago)
- Topics: aws, cli, ec2
- Language: Go
- Size: 12.9 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# run-on-ec2
[![ReportCard][reportcard-image]][reportcard-url] [![GoDoc][godoc-image]][godoc-url] [![License][license-image]][license-url]
run-on-ec2 is a CLI to quickly execute scripts on an AWS EC2 instance.
## Prerequisites
1. Create an AWS IAM user, [here](https://console.aws.amazon.com/iam/home?#/users).
2. Install and configure [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html).
3. [Add a profile](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) with the name `run-on-ec2` to `~/.aws/config` (Linux & Mac) or `%USERPROFILE%\.aws\config` (Windows)
```
[run-on-ec2]
aws_access_key_id = YOUR_IAM_KEY_ID
aws_secret_access_key = YOUR_IAM_SECRET_KEY
```
## Installation
```
$ go install
```
Alternatively, you can build the binary offline with,
```
$ go build -mod=vendor
```
## Help
```
$ run-on-ec2 -h
CLI to quickly execute scripts on an AWS EC2 instance
Usage:
run-on-ec2 filename [flags]
Flags:
-d, --duration duration persistence time of ec2 instance after execution (default 10m0s)
-e, --exec execute the file (default true)
-h, --help help for run-on-ec2
-i, --instance-type string ec2 instance type (default "t2.micro")
-k, --key-path string key path of valid aws key pair (defaults to creating a new key pair)
-r, --region string aws session region (default "us-east-2")
-s, --spot request spot instances (default true)
-v, --verbose verbose logs (default false)
-m, --volume int volume attached in GiB (default 8)
```
## Apache License 2.0
Copyright (c) 2020 Cheran Senthilkumar, Mukundan Senthilkumar
[reportcard-url]: https://goreportcard.com/report/github.com/cheran-senthil/run-on-ec2
[reportcard-image]: https://goreportcard.com/badge/github.com/cheran-senthil/run-on-ec2
[godoc-url]: https://godoc.org/github.com/cheran-senthil/run-on-ec2
[godoc-image]: https://godoc.org/github.com/cheran-senthil/run-on-ec2?status.svg
[license-url]: https://opensource.org/licenses/Apache-2.0
[license-image]: https://img.shields.io/badge/License-Apache%202.0-blue.svg