GithubHelp home page GithubHelp logo

aws's Introduction

Deploying a Golang Application on AWS EC2

Testing the project locally

  1. Clone this project
git clone https://github.com/Omkar0114/AWS.git
  1. Open your terminal go inside your cloned project directory using cd Run following command:
go run main.go
  1. Initialise and start the project Open your browser on
localhost:8080

Set up an AWS EC2 instance

  1. Create an IAM user & login to your AWS Console
    • Access Type - Password
    • Permissions - Admin
  2. Create an EC2 instance
    • Select an OS image - Ubuntu
    • Create a new key pair & download .pem file
    • Instance type - t2.micro
  3. Connecting to the instance using ssh
ssh -i instance.pem ubunutu@<IP_ADDRESS>

Configuring Ubuntu on remote VM

  1. Updating the outdated packages and dependencies
sudo apt update
  1. Install Git - Guide by DigitalOcean

Deploying the project on AWS

  1. Clone this project in the remote VM
git clone https://github.com/Omkar0114/AWS.git
  1. Open your terminal go inside your cloned project directory using cd Run following command: You need to install golang first, on the Remote VM To install golang, follow this guide Or you can use this command to install golang on Ubuntu
sudo apt install golang-go

To check if golang is installed or not, run this command

go version

Now run this command to run the project

go run main.go
  1. Initialise and start the project Open your browser on
alloted IPv4 address of EC2 instance:8080

NOTE - We will have to edit the inbound rules in the security group of our EC2, in order to allow traffic from our particular port

Project is deployed on AWS ๐ŸŽ‰

aws's People

Contributors

omkar0114 avatar

Watchers

 avatar

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.