These workshops assume that we will have multiple workloads on both production and staging environments. We will achieve this goal step by step, section by section.
Amazon Elastic Container Service (Amazon ECS) allows us to easily run, scale, and secure Docker container applications on AWS, which is very suitable for a developer or a team lacking of dedicated time to take care about infrastructure.
- We will use as latest Laravel LTS version as possible. We will use Laravel v6.18.35 at the moment.
- Using dwchiang/nginx-php-fpm as the docker base image to simplify the container configuration works and make us focusing on the Laravel application-first.
- Using AWS CDK to define our own cloud infrastructure as code (IaC) in a programming language.
- Finish all the workshop preparations in less than 5 minutes.
The workshop includes multiple elements across local development environment, cloud environment, Laravel configurations and more. To make sure we enjoy all the core knowledge content of the workshop, please finish the Preparations section before attending the workshop.
No worries, it just take less than 5 minutes :)
You don't need to know or learn about AWS ECS, EC2, Fargate, or even CDK before our diving deeper, you can still enjoy the getting started sections. You only need to have an AWS account or an IAM account. We will guide you to know each parts of this architecture in the later sections.
The first two sections is getting to know there are two launch types in Amazon ECS:
- Section 1: Getting Started on ECS Fargate Launch Type
- Section 2: Getting Started on ECS EC2 Launch Type
Then we move on to introduce fundamental requirements for running a Laravel service on Amazon ECS:
- Section 3: Prepare a project repository
- Section 4: Using AWS Certificate Manager (ACM) to deploy SSL/TLS certificates
- Section 5: Enable Laravel Logging
- Section 6: Handling Environment Variables
- WIP
- 2020-11-05: Workshop: Running Laravel on Amazon ECS Part 1 (Section 1 and Section 2), PahudDev X ErnestChiang, Online LIVE.
The workshops will go through from running single app on Fargate to multiple apps on ECS Capacity Provider across Fargate and EC2 launch types by using AWS CDK to define our own cloud infrastructure as code (IaC).
Running single app on ECS Fargate launch type with a high availability design.
Running single app on ECS EC2 launch type with a high availability design.
Have SSL/TLS connection is the basic implementation nowadays.
Direct Laravel logs in the container to Amazon CloudWatch Logs.
Bridging Laravel .env
file, ECS Container Definition valueFrom
and AWS SSM Parameter Store to load environment variables.