Giter Club home page Giter Club logo

aws-url-shortener-terraform's Introduction

AWS URL Shortener Terraform

License: MIT

Terraform Introduction

erraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions.

Install terraform

install terraform for your OS. Download Link

AWS authentification

The AWS provider is used to interact with the many resources supported by AWS. The provider needs to be configured with the proper credentials before it can be used. Setup AWS CLI and add your accounts access and secret keys. so that you don't have to add this into code.

Run the program

First clone this repo

git clone https://github.com/harshalkondke/aws-url-shortener-terraform.git

Before terraform apply we need to download the provider plugin

terraform init

Display plan before building stack

terraform plan

Apply building stack

terraform apply

If you wish to destory all the resources that terraform created, use this

terraform destroy

How to use?

After building stack you will get API endpoint as an output.

you can use postman to post a request to API or use any programming language to interact with API

If using postman,

In url box, Enter the API endpoint followed by /app

Select method as POST. In Body select raw and type json

Enter sample input:

{
"url":"http://google.com",
"id":"google"
}

now when you hit send button, You will get http 200 response when data added to dynamodb database

Verify

Paste the API endpoint in browser followed by key i.e. google in this case (use your api endpoint here)

https://<apikey>.execute-api.ap-south-1.amazonaws.com/prod/google

Boom you are redirected to google.com

Contribution

I would love to see what you add to this project and make it better. Everyone is welcome to contribute. Cheers

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.