Skip to content

CloudFormation Deployment

loki-bedlam edited this page Mar 20, 2026 · 1 revision

CloudFormation Deployment

Deploy Loki using a standard AWS CloudFormation template.

Quick Start (Console)

  1. Download template.yaml
  2. Open the CloudFormation Console
  3. Upload the template
  4. Fill in parameters (defaults work for most setups)
  5. Acknowledge IAM capabilities and create the stack
  6. Wait for CREATE_COMPLETE (~8–10 minutes)

Quick Start (CLI)

aws cloudformation create-stack \
  --stack-name my-openclaw \
  --template-body file://template.yaml \
  --parameters \
    ParameterKey=EnvironmentName,ParameterValue=my-openclaw \
    ParameterKey=InstanceType,ParameterValue=t4g.xlarge \
    ParameterKey=ModelMode,ParameterValue=bedrock \
  --capabilities CAPABILITY_NAMED_IAM \
  --region us-east-1

StackSet Deployment (Organizations)

This template is designed to work with CloudFormation StackSets for deploying across AWS Organization accounts:

aws cloudformation create-stack-set \
  --stack-set-name openclaw-instances \
  --template-body file://template.yaml \
  --parameters \
    ParameterKey=EnvironmentName,ParameterValue=openclaw \
    ParameterKey=ModelMode,ParameterValue=bedrock \
  --capabilities CAPABILITY_NAMED_IAM \
  --permission-model SERVICE_MANAGED \
  --auto-deployment Enabled=true,RetainStacksOnAccountRemoval=false

aws cloudformation create-stack-instances \
  --stack-set-name openclaw-instances \
  --deployment-targets OrganizationalUnitIds=ou-xxxx-xxxxxxxx \
  --regions us-east-1

Outputs

Output Description
InstanceId EC2 instance ID
PublicIp Public IP address
SSMConnect Ready-to-use SSM connect command
RoleArn IAM role ARN
VpcId VPC ID

Notes

  • Stack creation takes ~8–10 minutes (EC2 bootstrap installs Node.js, Loki, and configures the gateway)
  • The CreationPolicy with ResourceSignal ensures the stack only completes when the instance is fully bootstrapped
  • Requires CAPABILITY_NAMED_IAM due to named IAM roles and users

Clone this wiki locally