Skip to content

noahgift/eks-fargate-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ecs and eks fargate-tutorial or AWS App Runner

A tutorial on using EKS, ECS with fargate, or AWS App Ruuner on the AWS Cloud

Verified Deploy with AWS App Runner

ECS method

  • setup app: virtualenv + make all
  • test app local: python app.py
  • curl it to test: curl localhost:8080/change/1/34
  • create ECR Repo
  • build container
  • push container
  • run docker local: docker run -p 8080:8080 changemachine
  • deploy to fargate
  • test public service

EKS method

Build a Fargate App

  • Install kubectl and eksctl. You can follow instructions here.
  • Open up either AWS CloudShell or AWS Cloud9
  • Create a cluster at the terminal eksctl create cluster --name FargateExploration --region us-east-2 --fargate (Takes a few minutes)

You will see output similar to this

2021-02-17 17:52:07 [ℹ]  waiting for CloudFormation stack "eksctl-FargateExploration-cluster"
2021-02-17 17:52:28 [ℹ]  creating Fargate profile "fp-default" on EKS cluster "FargateExploration"
  • Verify the cluster: aws eks describe-cluster --name FargateExploration --query cluster.resourcesVpcConfig.clusterSecurityGroupId (or leave off the query and get entire description)

  • Create ECR Repo:

change-machine

AWS App Runner method

This repository can easily be converted to an AWS Runner Method in Wizard to the following:

  1. For build do: pip install -r requirements.txt
  2. To run: python app.py
  3. For port: 8080

1-aws-app-runner app-service-logs deployed-app-service

References

About

A tutorial on using EKS with fargate on the AWS Cloud

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published