Skip to content

A sample application for AWS re:Invent 2019 sessions with Amazon ECR

Notifications You must be signed in to change notification settings

omieomye/famous-peeps

Repository files navigation

famous-peeps

A sample application for AWS re:Invent 2019 sessions with Amazon ECR.

Dev environment setup

You will need node.js, version 10.3.+ or higher, and Docker

Then, Install the AWS CLI and Configure it. To get going quickly, use an administrator (but not root!) IAM account.

FInally, install the AWS CDK

npm install -g aws-cdk

Run the app locally

Clone the repo from Github, then set up the app's dependencies from its root folder

famous-peeps$ npm install

Test it out, make sure the tests pass and then quit the test scaffold

famous-peeps$ npm run test

Start it locally and after its up, open a web browser and go to http://localhost:3000/health, http://localhost:3000 and http://localhost:3000/movies

famous-peeps$ npm run dev

Build and run your container image

famous-peeps$ docker build -t docker-famous-peeps:latest .
famous-peeps$ docker run --init -i -p 3000:3000 docker-famous-peeps:latest

Create and configure your AWS infrastructure

Caution: Delete your AWS resources after you are done with the demo so you don't incur additional charges.

Create the AWS resources to deploy this app to. This assumes you have configured the AWS CLI with an administrator IAM user and chosen your default Region.

famous-peeps$ npm run deploy

Now,

  1. Log into your AWS console, go to ECR and enable scan on push for your newly created Repository
  2. Go to your new repository, click 'View Push Commands'
  3. Copy the login command and run it from the command line
  4. Tag your image for ECR
  5. Push your image to ECR

References

YouTube video on an ECR getting started

AWS Fargate CDK sample

A comprehensive serveless application demo in AWS

ECR Image Scanning: Rescan Code and blog

About

A sample application for AWS re:Invent 2019 sessions with Amazon ECR

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published