Deploying Super Mario on AWS Fargate: A Step-by-Step Guide ๐ŸŽฎ๐Ÿš€

Deploying Super Mario on AWS Fargate: A Step-by-Step Guide ๐ŸŽฎ๐Ÿš€

ยท

3 min read

Exciting news, fellow tech enthusiasts! I recently embarked on a thrilling journey of deploying the iconic Super Mario game on AWS using Fargate, and I'm here to guide you through the process step by step.

Today, we'll walk through the process of deploying Super Game using AWS ECS.

A big shoutout to the creator and maintainer of the Docker image (kaminskypavel/mario) on Docker Hub.

Keep in mind that using certain AWS services for these tasks may result in associated costs.

It's beneficial to have a basic understanding of AWS Cloud to make the most out of this project.

1. Setting Up Security Groups

Our first task is to establish security groups. We create two groupsโ€”one for the ECS Container and another for the ALB:

  • ALB Security Group: Open HTTP port to the public.

  • ECS Container Security Group: Allow access to port 8080, exclusively permitting the LoadBalancer group.

2. Creating a Target Group and LoadBalancer

Time to set up the LoadBalancer infrastructure. Follow these key steps:

  • Create Target Group: Ensure to choose IP Addresses and set the protocol to HTTP (listening on port 80). Once created it should look like the below screenshot

  • Create LoadBalancer: Opt for an internet-facing Application LoadBalancer, selecting our VPC, and associating it with the previously created security group and target group. Once created it will look like the below screenshot

3. AWS Fargate Cluster Creation

Build the foundation by creating an ECS Cluster:

  • Name Your Cluster: Select AWS Fargate as the launch type. It will take sometime to create the cluster, while its creating you can go ahead and create task definition.

4. Task Definition

Define the blueprint for your containers:

  • Create Task Definition: Choose AWS Fargate, name your container, specify the image URI (e.g., kaminskypavel/mario), and set the container port to 8080.

5. Creating the ECS Service

Now, let's create the ECS service:

  • Name Your Service: Define the desired number of tasks (e.g., two for continuous running).

  • Network Settings: Associate the ECS security group, and from the Load Balancing option, select the existing load balancer created earlier.

6. Launching Super Mario

Copy the LoadBalancer DNS and witness the magic:

  • Visit the LoadBalancer DNS: Voila! Super Mario is now live, hosted seamlessly with AWS ECS.

And there you have itโ€”a Super Mario adventure brought to life on AWS Fargate! Feel free to dive into the AWS console, explore the configurations, and embark on your own gaming deployment journey.

Ready to play?

Super Mario has officially entered the AWS arena, ready to jump, dash, and conquer levels in the cloud!

Until next time, happy learning and may your deployments be as seamless as a perfect Mario jump! ๐Ÿ„๐Ÿš€

ย