- Create a certificate-signed RDP shortcut via Group Policy - Fri, Aug 9 2019
- Monitor web server uptime with a PowerShell script - Tue, Aug 6 2019
- How to build a PowerShell inventory script for Windows Servers - Fri, Aug 2 2019
Fargate manages the majority of the infrastructure, so prereqs are limited. You'll need:
- An AWS account with an Identity & Access Management (IAM) user and security group set up with appropriate ECS permissions
- The AWS Management Console region set to either Northern Virginia, Ohio, Oregon, or Ireland—these are the only regions Fargate is currently available in
Getting started ^
The first step to create a Fargate container is to run the ECS First Run Wizard. Using this wizard is a quick and easy way to set up a container with the appropriate containers, roles, and user permissions.
If you want to follow along, sign into your AWS account and run the AWS ECS First Run Wizard. This link is for the us-east-2 (Ohio) region, so if you need to change regions to where you have any additional infrastructure set up, do so before proceeding.
Container definition ^
We first need to create our container. Since this is a fresh environment, and because image creation is out of scope for this document, we'll select the nginx prebuilt image.
Task definition ^
Next, we need to specify the task definition. We'll call our task the fargate-first-run-task, and we can also specify the task's memory and processor settings. Click Edit next to the Task definition subheading to specify the task settings.
Configure service ^
Next up, we can specify settings like the target number of tasks to run at the same time, the security group, IP range, and so on. Once you're satisfied, click Save to create the service.
Configure cluster ^
Lastly, we configure the Fargate cluster. There's no need to create any specific virtual private clouds (VPCs) here. It will automatically create everything for you. I'm going to rename my cluster since I'd like to keep the cluster created in this walkthrough separate from other clusters. After naming it, we can click Next to reach the last step of our first run before clicking Create.
After we click Create, we can watch our services spin up.
Once this step is complete, our Fargate container is created! We can now monitor the services. There you have it! You've configured and run your very first Fargate container. To monitor the number of running services, you can enter the AWS Elastic Container Service section in the Management Console to see the actual cluster built.
Viewing your Fargate deployment ^
Under the Elastic Container Service menu, you can select the Task Definitions submenu to view the task you just created.
By selecting your task, you can review all the information about the task you created. You can see the task size and any required attributes. You can even view the JSON configuration for the task if you wanted to copy it and use it for additional configurations via the command line later on.
By using Fargate to launch containers, administrators save a ton of time with infrastructure, and as you've seen, it makes bringing up containers seamless. For more introductory information on getting started with AWS Fargate, check out Introducing Fargate – Run Containers without Managing Infrastructure.