Automatically deploy a web game to an EC2 server whenever a new game.zip is uploaded to Amazon S3.
Introduction
In this project, I built a simple but practical serverless CI/CD deployment pipeline on AWS using Amazon S3, AWS Lambda, AWS Systems Manager, Amazon EC2, IAM, CloudWatch, and Nginx.
The application itself is a small browser-based Neon Snake game . However, the main purpose of the project is not the gameβit is the automated deployment architecture behind it .
The idea is simple:
Upload game.zip β S3 detects the upload β Lambda is triggered β Lambda sends a command through SSM β EC2 downloads and extracts the game β Nginx serves it β The game becomes available in the browser.
This project demonstrates how different AWS services can work together to create a lightweight deployment pipeline without manually logging into the EC2 server every time a new version is released.
Architecture
The complete architecture looks like this:
βββββββββββββββββββββββ β Developer β β Upload game.zip ββ¦