CloudFormation ECS Fargate Basic Template
  • Dark
    Light

CloudFormation ECS Fargate Basic Template

  • Dark
    Light

Overview

This article details how to install the Matillion CDC Agent on Amazon ECS Fargate using a CloudFormation template.

These steps can only be taken after completing the preliminary steps found in AWS Installation: Templated Installations and assumes you have done so.

It is highly recommended you read the documentation and prerequisites before beginning this process. It is likely you will require input from your organisation's cloud administrator for access and permissions.

Created Resources

This template will create the following resources in your AWS account:

  • ECS Task Definition
  • ECS Fargate Cluster and Service

Visualization

image.png

Prerequisites

Edit the template

Users should inspect the template in a text editor and ensure the values are as-expected before proceeding. In particular, the PLATFORM_WEBSOCKET_ENDPOINT environment variable should be edited to match the expected endpoint and region. See Environment Variables for more information.

Resources

The basic template assumes you have certain resources already set up in your AWS stack. You will also be required to provide details on these resources such as names, paths and ARNs.

User Access

You as a user are also expected to have access to certain details and permissions:

  • Access to a Matillion Hub account and Matillion Data Loader.
  • CDC Agent Environment Variables (generated in Matillion Data Loader when creating a new agent)
  • Matillion Data Loader platform key (generated once per Matillion Data Loader account the first time you make an agent)
  • Access to AWS with the ability to create a stack on a billable account. You may require an administrator from your organisation to either give access or perform this process with you.

Create Agent Stack

You should have your Platform Key and Agent Identity Environment Variables ready before beginning this process. If you do not have these, please first consult the Creating Agents documentation.

Important

You will require permissions to create and manage resources in your AWS or Azure account. Please contact your administrator. Matillion's provided templates will not work if you have insufficient permissions.**

Using the CloudFormation Template

  1. Download the ECS Fargate (CloudFormation) Basic template files:
  2. Log in to your AWS account and navigate to the CloudFormation service
  3. Choose Create Stack
  4. Select Template is ready
  5. Select Upload a template file and then Choose File
  6. Upload your template .json and click Next to move to the next screen

Specify stack details

Complete the form with the required details:

Field Description
Stack name An arbitrary name for your new stack.
AgentID The ID_AGENT attained during agent creation.
ClusterName Name the ECS Fargate cluster that will be created from the template. This is where your agent is hosted.
ExecutionRoleArn The ARN of the IAM Role that Task Execution will use. See the Task Execution Role in IAM Roles for more information.
ImageUrl The agent image location. Do not edit this field.
LogGroupPath Name of an existing CloudWatch log group to be used for agent logging.
OrganizationID ID_ORGANIZATION attained during agent creation.
PlatformKeyName The name of the secret generated to hold your Platform Key. If you are following our recommended install, this will be agent-rsa. Note that your Task Role policy must include the ARN for this secret.
Region The name of the region you want to create these resources in.
RoleArn The ARN of the IAM Role the Task will use. See the Task Role in IAM Roles for more information.
SecurityGroups Select the Security Group that your service will create log streams in.
ServiceName A unique name for the new ECS Service you want to run tasks under.
SubnetIDs The Subnet ID for your intended subnet.
TaskDefinitionName A unique name for agent tasks to run under.

Next Steps:

  1. When your details are entered, click Next
  2. Configure Stack Options: No action is required on this page. Click Next
  3. Review: Select Acknowledge the template has changed and click Create

When your stack has been fully created (will take some time) you can return to Matillion CDC and view the Agents list. Your new agent should appear on the list and have the "Connected" status if all has gone well. If not, please consult the Troubleshooting documentation.

If you are creating a Pipeline and have completed this step, consult the CDC Pipelines documentation to review the process and find your next steps.

Downloads

This article covers the Basic Template installation. The template itself can be downloaded here:

And an accompanying parameters file for those installing via CLI: