Let's learn how to build, release and operate your containerized applications to Amazon ECS and AWS Fargate using AWS Copilot.

Overview

๐Ÿš€ Welcome to AWS Copilot Workshop

In this workshop, you'll learn how to build, release and operate your containerised applications to Amazon ECS and AWS Fargate using AWS Copilot.

Tl;dr Get Started!

Click here to Get Started with Labs

๐Ÿ’ป What we are going to build

In this workshop, we are going to deploy an API to convert a website page into a PDF. We are using containers to build the application and deploy them into Amazon ECS using AWS Fargate as the computing option.

Show me how it looks like!

Hereโ€™s a quick look on what youโ€™re going to build.

Quick Look

Diagram architecture

This is the full diagram architecture that we will build in this workshop.

Diagram Architecture

There are 2 main components in this applications, 1) internet facing API, and 2) private worker to process request. The API is responsible to handle to validate and process the initial request. The API then will publish a topic with message "request_received" to Amazon SNS.

How does it work?

The flow works when we trigger HTTP POST method with JSON payload to the API endpoint /process. As the system is running on asynchronous communication between services, we won't get the PDF immediately. The return response from /process would be a request ID. In order to get the PDF file, we need to pass the request ID to the /status/ endpoint. Using that endpoint, we can also check the status of the request.

To build the application, defining the release pipeline and operate the application, we will be using AWS Copilot. AWS Copilot is an open-source CLI tool that makes it easy for us to run containers on AWS. If you'd like to know more about AWS Copilot, please refer to the
documentation page

To understand how we can build and operate our containerized applications, the workshop is break down into 5 labs. The labs provided in this workshop are structured to build understanding how to use AWS Copilot from ground up.

๐Ÿ“– About This Workshop

This is L100-300 workshop and specifically structured for developers from any levels.

โœ… Requirements

This workshop requires following applications and tools properly configured. Please follow the instruction provided on the links for each applications/tools.

1. AWS CLI

The AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts.

There are 2 versions of the AWS CLI, and we strongly recommend for you to use AWS CLI version 2.

https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html

2. AWS credentials

Once that you have your AWS CLI installed, you also need to configure the settings. The configurations that you need to configure includes your security credentials, the default output format, and the default AWS Region. 

https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html

3. Docker Desktop

Docker is required in this workshop as we are going to package the application using Docker and Amazon ECS will run the application using Docker engine.

https://docs.docker.com/engine/install/

4. Copilot CLI

The AWS Copilot CLI is a tool for developers to build, release and operate production ready containerized applications. At the point of building this workshop, AWS Copilot supports deployment to AWS AppRunner, Amazon ECS and AWS Fargate.

If you have homebrew installed on your platform, you can use following command to install AWS Copilot

brew install aws/tap/copilot-cli  

Otherwise, you need to follow the instructions listed on this page https://github.com/aws/copilot-cli to install AWS Copilot for your platform.

โš ๏ธ Cleaning Up

This workshop uses AWS services that are mostly covered by the Free Tier allowance - ONLY if your account is less than 12 months old. For accounts passed the free tier eligibility, it may incur some costs. To minimize the cost, make sure you delete resources used in this workshop when you are finished.

Please refer to Lab 5: Cleaning Up for more information.

๐Ÿ’ป Let's Get Started!

If you have all the requirements needed to run this workshop, now it's time to deploy some apps!

Get Started!

You might also like...
Django-Kubernetes - Learn how to deploy a docker-based Django application into a Kubernetes cluster into production on DigitalOcean
Build Netbox as a Docker container

netbox-docker The Github repository houses the components needed to build Netbox as a Docker container. Images are built using this code and are relea

This Docker container is build to run on a server an provide an easy to use interface for every student to vote for their councilors
This Docker container is build to run on a server an provide an easy to use interface for every student to vote for their councilors

This Docker container is build to run on a server and provide an easy to use interface for every student to vote for their councilors.

A tool to convert AWS EC2 instances back and forth between On-Demand and Spot billing models.
A tool to convert AWS EC2 instances back and forth between On-Demand and Spot billing models.

ec2-spot-converter This tool converts existing AWS EC2 instances back and forth between On-Demand and 'persistent' Spot billing models while preservin

A honey token manager and alert system for AWS.
A honey token manager and alert system for AWS.

SpaceSiren SpaceSiren is a honey token manager and alert system for AWS. With this fully serverless application, you can create and manage honey token

Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions
Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

Prometheus exporter for AWS Simple Queue Service (SQS)
Prometheus exporter for AWS Simple Queue Service (SQS)

Prometheus SQS Exporter Prometheus exporter for AWS Simple Queue Service (SQS) Metrics Metric Description ApproximateNumberOfMessages Returns the appr

CDK Template of Table Definition AWS Lambda for RDB
CDK Template of Table Definition AWS Lambda for RDB

CDK Template of Table Definition AWS Lambda for RDB Overview This sample deploys Amazon Aurora of PostgreSQL or MySQL with AWS Lambda that can define

Lima is an alternative to using Docker Desktop on your Mac.
Lima is an alternative to using Docker Desktop on your Mac.

lima-xbar-plugin Table of Contents Description Installation Dependencies Lima is an alternative to using Docker Desktop on your Mac. Description This

Comments
  • fix(lab3): leverage service discovery env variable

    fix(lab3): leverage service discovery env variable

    • The SVC_API_ENDPOINT does not hold a value
    • Leverage COPILOT_SERVICE_DISCOVERY_ENDPOINT environment variable to access svc-api
    • Clarify associated documentation
    opened by charles-salmon 1
  • Lab 3: S3 Bucket Name is Not Unique

    Lab 3: S3 Bucket Name is Not Unique

    Task 5 of Lab 3 suggests that the bucket be named s3-pdf-requests. When concatenated with the application name and environment name specified earlier, this does not result in a globally unique name. I personally executed:

    "s3-pdf-requests-" + [Guid]::NewGuid().ToString().Substring(0,8)
    

    in PowerShell, but figured that you may have a more elegant solution in mind, so thought that I'd highlight this. Sorry that I forgot to point this one out yesterday!

    enhancement 
    opened by charles-salmon 1
Owner
Donnie Prakoso
Cafรฉ racer enthusiast. Self-proclaimed barista. Technology Evangelist at Amazon Web Services. Codes are my own.
Donnie Prakoso
Cado Response Integration with Amazon GuardDuty using AWS Lambda

Cado Response Integration with Amazon GuardDuty using AWS Lambda This repository contains a simple example where: An alert is triggered by GuardDuty T

Cado Security 4 Mar 2, 2022
Universal Command Line Interface for Amazon Web Services

aws-cli This package provides a unified command line interface to Amazon Web Services. Jump to: Getting Started Getting Help More Resources Getting St

Amazon Web Services 13.3k Jan 1, 2023
This repository contains code examples and documentation for learning how applications can be developed with Kubernetes

BigBitBus KAT Components Click on the diagram to enlarge, or follow this link for detailed documentation Introduction Welcome to the BigBitBus Kuberne

null 51 Oct 16, 2022
Define and run multi-container applications with Docker

Docker Compose Docker Compose is a tool for running multi-container applications on Docker defined using the Compose file format. A Compose file is us

Docker 28.2k Jan 8, 2023
gunicorn 'Green Unicorn' is a WSGI HTTP Server for UNIX, fast clients and sleepy applications.

Gunicorn Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's a pre-fork worker model ported from Ruby's Unicorn project. The Gunicorn

Benoit Chesneau 8.7k Jan 8, 2023
More than 130 check plugins for Icinga and other Nagios-compatible monitoring applications. Each plugin is a standalone command line tool (written in Python) that provides a specific type of check.

Python-based Monitoring Check Plugins Collection This Enterprise Class Check Plugin Collection offers a package of more than 130 Python-based, Nagios-

Linuxfabrik 119 Dec 27, 2022
Honcho: a python clone of Foreman. For managing Procfile-based applications.

___ ___ ___ ___ ___ ___ /\__\ /\ \ /\__\ /\ \ /\__\ /\

Nick Stenning 1.5k Jan 3, 2023
Build and Push docker image in Python (luigi + docker-py)

Docker build images workflow in Python Since docker hub stopped building images for free accounts, I've been looking for another way to do it. I could

Fabien D. 2 Dec 15, 2022
This is a tool to develop, build and test PHP extensions in Docker containers.

Develop, Build and Test PHP Extensions This is a tool to develop, build and test PHP extensions in Docker containers. Installation Clone this reposito

Suora GmbH 10 Oct 22, 2022