# Deploy Cycloid worker on Amazon Web Services with CloudFormation

AWS

The CloudFormation deployment is based on a template located under our stack-external-worker (opens new window) git repository.

The CloudFormation stack will create an AWS autoscaling group with EC2 instances as Cycloid workers.

Follow these steps to create a CloudFormation stack:

  1. Connect on http://console.cycloid.io (opens new window).
  2. Click on your top right profile picture, and select Organization settings

Manage org

  1. Go into the Workers tab and select Amazon Web Services.
  2. Select the region in which you want to deploy the workers.
  3. Click on the button Launch CloudFormation Stack. It will redirect you to Amazon Console. (See comments at the end of the page)

cloudformation-stack

  1. Configure the CloudFormation stack to match your AWS configuration
  2. Select the checkbox I acknowledge that AWS CloudFormation might create IAM resources. The stack will create an IAM role for the workers.
  3. Click on Create button to create the stack.

After the deployment of the CloudFormation stack, get back on the Workers tab in the Cycloid dashboard. It will display all your connected workers and their status:

worker-status

Note: Sometimes, CloudFormation returns an error 400 (Bad Request), we are aware about of this and we are working with AWS to help them to fix it. Meanwhile, there are two options to solve it:

  • Once you clicked on the button Launch CloudFormation Stack and have realized that you have a blank page or similar, you can copy the url and paste it in a new tab, then you will be redirected to the correct page.
  • Go to CloudFormation home page (opens new window), then click back on Launch CloudFormation Stack button and it will work as expected.

# Change Cycloid worker size

  1. Connect on AWS Management Console (opens new window)
  2. Go on the CloudFormation service page.
  3. Select the cycloid-ci-workers stack and click on the top right Update button.
    • Select the Use current template checkbox.
    • Click on next.
  4. Select the desired InstanceType.
  5. Click next up to the Update stack button.

# Update from the latest version of the stack

  1. Connect on AWS Management Console (opens new window)
  2. Go on the CloudFormation service page.
  3. Select the cycloid-ci-workers stack and click on the top right Update button.
    • Select the Replace current template checkbox.
    • Click on Amazon S3 URL.
    • Put the following url https://s3-eu-west-1.amazonaws.com/cycloid-cloudformation/external-worker-aws-cf-template.yaml.
    • Click next up to the Update stack button.

# Troubleshooting

If your worker is not running correctly, you can follow the Troubleshooting section.