Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

UrlShortner

UrlShortner using Amazon Web Services, Serverless Application Model. For this service we use CloudFormation to build a stack composed by API Gateway, Lambda and DynamoDB powered by DAX.

Architecture

architecture

Development

For local development, follow the steps below:

  1. First, we need to setup a local DynamoDB. For this, run the command from the root project. This will run docker with the configurations in the docker-compose.yml file
    docker-compose up -d
  2. Install node dependencies
    npm install
  3. Now, we are ready to go. To run lambda, you just need to run the command provided below and change json payload on lambda/test.js file, which represents the payload lambda will receive from API Gateway
    npm run local

Deployment

  1. Make a zip file with necessary folders
    zip -qur urlshortner node_modules lambda
  2. Create a S3 bucket in case you don't have one
    aws s3 mb s3://<bucket-name>
  3. Create an AWS CloudFormation package of the code in that bucket
    aws cloudformation package --template-file template.yaml --output-template-file packaged-template.yaml --s3-bucket <bucket-name>
  4. Finally, deploy the AWS CloudFormation stack which will create all the resources defined in the YAML file
    aws cloudformation deploy --template-file packaged-template.yaml --stack-name urlshortner

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages