In this guide, you'll set up and deploy an Amazon Elastic Container Service (ECS) agent in an existing VPC using CloudFormation. Amazon ECS agents are used to launch user code in ECS tasks.
Our CloudFormation template allows you to quickly spin up the ECS agent stack in an existing VPC. It also supports using a new or existing ECS cluster. The template code can be found here. Refer to the CloudFormation docs for more info about CloudFormation.
For info about deploying an ECS agent in a new VPC, check out the ECS agents in new VPCs guide.
To complete the steps in this guide, you'll need:
In Dagster+:
In Amazon Web Services (AWS):
enableDnsHostnames
and enableDnsSupport
DNS attributes. Refer to the AWS DNS attributes documentation for more info.In this step, you'll generate a token for the Dagster+ agent. The Dagster+ agent will use this to authenticate to the agent API.
Keep the token somewhere handy - you'll need it to complete the setup.
Click the Launch Stack button to install the CloudFormation stack in your AWS account:
Note: Creating the CloudFormation stack may take a few minutes. Refresh the AWS console Stacks page to check the status.
After the stack is installed, you'll be prompted to configure it. In the ECS wizard, fill in the following fields:
The page should look similar to the following image. In this example, our organization name is hooli
and our deployment is prod
:
After you've finished configuring the stack in AWS, you can view the agent in Dagster+. To do so, navigate to the Status page and click the Agents tab. You should see the agent running in the Agent statuses section:
Now that you've got your agent running, what's next?
If you're getting Dagster+ set up, the next step is to add a code location using the agent.
If you're ready to load your Dagster code, refer to the Adding Code to Dagster+ guide for more info.
If you need to upgrade your ECS agent's CloudFormation template, refer to the upgrade guide for more info.