# Deploy Cycloid worker on Amazon Web Services with CloudFormation
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:
- Connect on http://console.cycloid.io (opens new window).
- Click on your top right profile picture, and select
Organization settings
- Go into the
Workers
tab and selectAmazon Web Services
. - Select the region in which you want to deploy the workers.
- Click on the button
Launch CloudFormation Stack
. It will redirect you to Amazon Console. (See comments at the end of the page)
- Configure the CloudFormation stack to match your AWS configuration
- Select the checkbox
I acknowledge that AWS CloudFormation might create IAM resources.
The stack will create an IAM role for the workers. - 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:
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
- Connect on AWS Management Console (opens new window)
- Go on the CloudFormation service page.
- Select the
cycloid-ci-workers
stack and click on the top rightUpdate
button.- Select the
Use current template
checkbox. - Click on
next
.
- Select the
- Select the desired
InstanceType
. - Click
next
up to theUpdate stack
button.
# Update from the latest version of the stack
- Connect on AWS Management Console (opens new window)
- Go on the CloudFormation service page.
- Select the
cycloid-ci-workers
stack and click on the top rightUpdate
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 theUpdate stack
button.
- Select the
# Troubleshooting
If your worker is not running correctly, you can follow the Troubleshooting section.