Website | Blog | Documentation | imgproxy Pro | Docker | Twitter | Discord
imgproxy is a fast and secure standalone server for resizing and converting remote images. The main principles of imgproxy are simplicity, speed, and security.
This repository contains a troposphere script that generates an AWS CloudFormation template to deploy imgproxy to AWS ECS. The script can generate different templates depending on your needs.
We prepared a few pre-built templates that you can use right away. Just click on a link, set the required options, and you're ready to process your images.
Note
The links in the README point to the templates built from the master
branch. If you want to use a specific version, you can find the links in the releases section.
These templates create all the required resources, plug-n-play:
- Networks (VPC, subnetworks, internet gateway, routing tables, etc)
- Security groups
- Application Load Balancer
- ECS cluster
- ECS capacity provider (Fargate or EC2)
- EC2 autoscaling group (EC2 only)
- ECS task definition
- ECS service
- Autoscaling rules
- CloudFront distribution (optional)
Launch type | |
---|---|
Fargate | |
EC2 |
If you already have an Application Load Balancer and networks configured, you may want your imgproxy installation to use them. These templates create all the required resources except for networking:
- ECS cluster
- ECS capacity provider (Fargate or EC2)
- EC2 autoscaling group (EC2 only)
- ECS task definition
- ECS service
- Autoscaling rules
These templates require the following resources to be provided via template parameters:
- VPC
- Subnetworks
- Security group
- Application Load Balancer listener
Launch type | |
---|---|
Fargate | |
EC2 |
If you already have an ECS cluster, you may want to deploy imgproxy to it. These templates create all the required resources except for the cluster and networking:
- ECS task definition
- ECS service
- Autoscaling rules
These templates require the following resources to be provided via template parameters:
- VPC
- Subnetworks (Fargate only)
- Security group (Fargate only)
- Application Load Balancer listener
- ECS cluster
Important
The created service will use the default capacity provider of the cluster. If you want to use a different capacity provider, you need to modify the template.
Launch type | |
---|---|
Fargate | |
EC2 |
If you want to customize the template, you can build it yourself. You need to have Python and pip installed.
-
Clone this repository:
git clone https://github.com/imgproxy/imgproxy-cloudformation.git
-
Install dependencies:
pip install -r requirements.txt
-
Run the script:
./template.py
If you want the script to write the template to a file instead of printing it to stdout, use the --output
option:
./template.py --output template.yml
By default, the script will generate a template for Fargate. You can change the launch type by passing the --launch-type
option:
./template.py --launch-type ec2
If you don't want the template to include networking resources, use the --no-network
option:
./template.py --no-network
If you don't want the template to include the ECS cluster, use the --no-cluster
option:
./template.py --no-cluster
Important
Since the Fargate and EC2 launch types require ECS services to be configured differently, make sure to use the --launch-type
option corresponding to your ECS cluster's default capacity provider launch type.
Important
When the --no-cluster
and --launch-type=ec2
options are used together, the --no-network
option is required.
See the script's help (./template.py -h
) for more options.
imgproxy-cloudformation is licensed under the MIT license.
See LICENSE for the full license text.
To report a security vulnerability, please contact us at security@imgproxy.net. We will coordinate the fix and disclosure.