8787.
Deploy with CloudFormation
1
Copy the CloudFormation template
Save the following YAML as
portkey-gateway.yaml:portkey-gateway.yaml
2
Create a stack in the AWS CloudFormation console
Open the AWS CloudFormation console and choose Create stack. Upload
portkey-gateway.yaml directly or upload it to S3 first and provide the S3 URL.3
Fill in the stack parameters
4
Create the stack
Review the configuration and choose Create stack. CloudFormation provisions the instance, installs Docker, and starts the gateway container automatically via the
UserData script.5
Retrieve the gateway URL
Once the stack status shows
CREATE_COMPLETE, open the Outputs tab. The PortkeyGatewayURL value contains the public URL for your gateway:What the template provisions
- EC2 instance — Amazon Linux 2, running the
portkeyai/gateway:latestDocker image - Security group — Allows inbound TCP on port
8787from0.0.0.0/0and unrestricted outbound - Region mapping — Pre-configured Amazon Linux 2 AMI IDs for 17 AWS regions
Next steps
After the instance is running, mount aconf.json to configure credentials, plugins, and rate limits. See the configuration reference for details.