Automated-AWS is an open-source Go package that automates provisioning/management of AWS resources (ec2, elbv2, and autoscaling). Cobra is used for the CLI.
To set up the development environment for the project, follow the steps below: Make sure you have the following prerequisites installed on your system:
-
Go (version 1.16 or later)
-
Cobra
go get -u github.com/spf13/cobra
-
Docker (optional, if you want to run the application in a container)
-
AWS CLI (to interact with AWS services)
git clone https://github.com/AbhiAlest/Automated-AWS.git
Change to the project directory:
cd Automated-AWS
Install the Go dependencies:
go mod download
aws configure
go run main.go
If you want to run the application in a Docker container, build the Docker image first:
docker build -t myapp .
Then, run the Docker container:
docker run -p 8080:8080 myapp
go test ./...
# Create VPC
go run main.go -create-vpc
# Create S3 bucket
go run main.go -create-s3-bucket
# Launch 2 EC2 instances
go run main.go -launch-ec2-instances=2
# Create ALB
go run main.go -create-alb
- Make the necessary code changes in the project files.
- Run the application or tests to verify your changes.
- Commit the changes to your local Git repository.
- Push the changes to the remote Git repository (if applicable).
That's it! You now have your development environment set up for the project. Happy coding!
Rough overview of the file structure for this project (changes may have occurred).
Automated-AWS
├── .github
│ └── CODEOWNERS
│ └── CONTRIBUTING.md
├── cmd
│ └── main.go
├── config
│ └── aws.go
│ └── config.yaml
├── mocks
| ├── elbv2_mock.go
├── pkg
│ ├── autoscaling
│ │ └── autoscaling.go
│ ├── ec2
│ │ └── ec2.go
│ └── elbv2
│ └── elbv2.go
├── test
│ ├── autoscaling
│ │ └── autoscaling_test.go
│ ├── ec2
│ │ └── ec2_test.go
│ └── elbv2
│ └── elbv2_test.go
├── Dockerfile
├── README.md
└── LICENSE