Code Monkey home page Code Monkey logo

app-runner-short-clip-demo's Introduction

AWS App Runner - Page Impression Counter App

This repository was built for demoing how to deploy a "Bring your own code" project to AWS App Runner, following a short clip that was uploaded to YouTube in Hebrew. In the short clip you will be able to see a step by step console demo, and this repository will demonstrate how to deploy the app using AWS Cli.

The application is a very simple page impression counter nodejs app for demo purposes only, that is built and deployed to AWS App Runner service, the app will use a DynamoDB table as described in the following diagram as a counter.

diagram

Prerequisite

  1. awscli >= 2.2.34, if you are using AWS CLI version 1, you might get errors on --no-cli-pager switch of Unknown options, you can remove it from the scripts.
  2. In AWS App Runner console, create a GitHub connection, and named it github as described in our documentation.

Deploying the App

In the ./scripts folder are all the scripts that you can use to deploy this app.

Steps:

  1. 1_prep_dynamodb.sh - Creates the counter DynamoDB table.
  2. 2_permissions.sh - Creates proper permissions for app runner task to access DynamoDB securely.
  3. Create App Runner service with Github hook auto deployment 3_apprunner_github.sh, Make sure to update the REPO_URL variable with yours before running the script. the AWS Connector that was configured in the prerequisite, should have access to this repo.
  4. showing the auto scale with stressing the application with wrk using 4_stress_test.sh

Optional Deployment from ECR

In AWS App Runner, in addition built and run your code, as described above, you also have the option to run your container. In order to deploy your container, you will need to build this app using the Dockerfile and push it to your ECR Repository.

Make sure you have Docker installed and running, and you have IAM permissions to create and push to an ECR repository.

Steps:

  1. To create an ECR repository, build and push the application docker image 5_create_ecr_build_push.sh
  2. Create access role, to allow App Runner to pull images from ECR using 6_permissions_ecr.sh
  3. Create App Runner service with ECR auto deployment 7_apprunner_ecr.sh

Security

See CONTRIBUTING for more information.

License

This repository is licensed under the MIT-0 License. See the LICENSE file.

app-runner-short-clip-demo's People

Contributors

amazon-auto avatar dependabot[bot] avatar omerh avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  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.