Hello Fargate, This is your Copilot speaking
July 22, 2021
Clear skies so far with AWS Fargate
AWS Fargate as a technology has been on my mind ever since it was announced. It was extremely appealing to me, to use something that meant I no longer had virtual machines to monitor and instead, just focus on my containers. I will admit though, that initial learning curve with Fargate is a little steep. See, before Kubernetes was a thing, AWS had Elastic Container Service, or ECS, which is effectively their own container orchestration software. Then Kubernetes happened and while they now have Elastic Kubernetes Service (EKS), ECS has stuck around. So what probably did not help me was trying to learn how ECS worked in terms of clustering. I made good progress going my own way initially with it, but after an evening of virtually smashing my head, I stumbled upon something that would make things far easier.
Fargate and a few other services from AWS (most recently launched, AWS App Runner included too). Now it’s a bit unfortunate that Github now have a tool called Copilot, I spent a week hearing about Copilot and thinking, ‘AWS or Github Copilot?’. Copilot introduces some additional objects and terms that help to sort of level up from the raw resources under the hood. I did struggle initially to get things understood in my head, but once I did, it was very straightforward.
To start with, you have environments which are basically the foundational resources that if you used AWS before with, you’ll be familiar with as your VPC, subnets, internet gateways, etc. Copilot will create a VPC for you and I believe you’re encouraged to have VPCs per environment, which is a good practice to separate things out by dev, prod, etc. However, it’s only me here and my primary VPC is configured quite nicely, so I was able to just import the resources and use them directly. Once you have an environment, you can initialize either a Service (Long running Fargate container or App Runner), Job (Schedule based Fargate containers) or Tasks (Once off container runs). For me and my website, initializing a Service, backed by a load balancer was the go to, but I do want to experiment with App Runner down the line. You also have a concept of applications which colocate environments and services.
After I had the terminology figured out, it was only a few commands to get my website up and running. I manually configured a TLS listener for CloudFlare on the application load balancer and updated my DNS to that ALB. I also configured some Jobs for a few things I’ve running on a schedule and again, just a handful of commands. All in all, I’m very impressed with Copilot. It took something that was very complex to me and wrapped it all up into a set of commands. Sure, I lose some control perhaps or knowledge cause its a bit of a black box. But, I’ve gained an ability to move quick and also only pay for containers as versus whole clusters of VMs and what have you. Expect more on Copilot in this space!
Thank you!
You could of consumed content on any website, but you went ahead and consumed my content, so I'm very grateful! If you liked this, then you might like this other piece of content I worked on.
Controlling Cloud CostPhotographer
I've no real claim to fame when it comes to good photos, so it's why the header photo for this post was shot by Timelab Pro . You can find some more photos from them on Unsplash. Unsplash is a great place to source photos for your website, presentation and more! But it wouldn't be anything without the photographers who put in the work.
Find Them On UnsplashSupport what I do
I write for the love and passion I have for technology. Just reading and sharing my articles is more than enough. But if you want to offer more direct support, then you can support the running costs of my website by donating via Stripe. Only do so if you feel I have truly delivered value, but as I said, your readership is more than enough already. Thank you :)
Support My Work