Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gabotechs/free-ec2-instance
Infrastructure as code using AWS CDK to deploy an EC2 instance with just one command. This project allows to quickly deploy an EC2 instance for playing around without incurring in bigger costs
https://github.com/gabotechs/free-ec2-instance
aws cdk ec2 ec2-instance infrastructure-as-code yarn
Last synced: about 2 months ago
JSON representation
Infrastructure as code using AWS CDK to deploy an EC2 instance with just one command. This project allows to quickly deploy an EC2 instance for playing around without incurring in bigger costs
- Host: GitHub
- URL: https://github.com/gabotechs/free-ec2-instance
- Owner: gabotechs
- License: mit
- Created: 2022-10-17T16:16:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-01T10:00:28.000Z (about 2 months ago)
- Last Synced: 2024-12-01T11:18:30.896Z (about 2 months ago)
- Topics: aws, cdk, ec2, ec2-instance, infrastructure-as-code, yarn
- Language: TypeScript
- Homepage:
- Size: 1.56 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Free Ec2 instance
Deploy an instance in AWS for you to play around.
> **NOTE**: ⚠️ This project will deploy a t4g.micro ec2 instance
in the configured account, last time I checked, that was free, but
make sure to check it again.## Install
Clone the project
```shell
git clone https://github.com/gabotechs/free-ec2-instance
cd free-ec2-instance
```Install the dependencies
```shell
npm install
```
create a `.env` file with your credentials in the root of the project,
next to the `package.json` file
```dotenv
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your-access-key-id
AWS_SECRET_ACCESS_KEY=your-access-key-secret
```## Deploy
Deploy the new EC2 instance
```shell
npm run deploy
```
It should take a couple of minutes. After the deployment is completed,
you can connect to your instance with:
```shell
npm run connect
```## Destroy
Whenever you want to tear down the EC2 instance just use:
```shell
npm run destroy
```## Disclaimer
> **NOTE**: ⚠️ The contributors of this project are not responsible for
costs created in your AWS account, people that use this project are responsible for
their own AWS costs.