Deploy CloudFormation Stack

Deploy the Ohlala SmartOps infrastructure in AWS

Deploy CloudFormation Stack

Deploy the complete Ohlala SmartOps infrastructure using the CloudFormation template from AWS Marketplace.

📦 What Gets Deployed

The CloudFormation stack creates:

  • ECS Fargate cluster with container services
  • API Gateway for Teams webhook
  • Network infrastructure (VPC, subnets, security groups)
  • IAM roles with appropriate permissions
  • Secrets Manager for credentials
  • CloudWatch logs for monitoring

📋 Deployment Steps

1. Open CloudFormation Console

Navigate to CloudFormation in your target region:

https://console.aws.amazon.com/cloudformation/home ↗️

2. Create New Stack

Click “Create stack” and choose “With new resources (standard)”

CloudFormation Create Stack page with “Create stack” button highlighted

3. Upload Template

  1. Select “Choose an existing template”
  2. Select “Upload a template file”
  3. Click “Choose file” and select the template downloaded from AWS Marketplace
  4. Click “Next”

CloudFormation Create Stack page with “Choose an existing template” option and file upload highlighted

4. Configure Stack Parameters

Stack Name

Enter a unique stack name: OhlalaSmartOps (or your preference)

Required Parameters

Fill in the mandatory parameters:

ParameterDescriptionExample/Value
DeploymentModeVPC configurationNewVPC (recommended)
ContainerImageTagVersion to deployv1.0.15 (default)
MicrosoftAppIdFrom Azure Bot setupYour App ID
MicrosoftAppPasswordFrom Azure Bot setupYour App Password
MicrosoftAppTenantIdFrom Azure Bot setupYour Tenant ID

CloudFormation Stack Parameters page with fields filled in

VPC Configuration (if NewVPC)

Keep defaults or customize:

  • VPCCIDR: 10.0.0.0/16
  • PublicSubnet1CIDR: 10.0.1.0/24
  • PublicSubnet2CIDR: 10.0.2.0/24
  • PrivateSubnet1CIDR: 10.0.10.0/24
  • PrivateSubnet2CIDR: 10.0.11.0/24
  • EnableNATGateway: true

Click “Next”

5. Configure Stack Options

On the stack options page:

  • Tags: (Optional) Add tags for resource organization
  • Permissions: Leave default
  • Advanced options: Leave default

Click “Next”

6. Review and Create

  1. Review all settings
  2. Check the acknowledgment box:
    • I acknowledge that AWS CloudFormation might create IAM resources with custom names

CloudFormation Stack Review page with acknowledgment checkbox highlighted

  1. Click “Submit”

CloudFormation Stack Review page with “Submit” button highlighted

7. Monitor Deployment

The stack creation takes 5-10 minutes. Monitor progress:

  1. Select your stack in the CloudFormation console
  2. Check the Events tab for real-time updates
  3. Wait for status: CREATE_COMPLETE

📊 Get Stack Outputs

Once deployment completes, get the important URLs:

  1. Select your stack
  2. Go to the Outputs tab
  3. Save these values:
OutputDescriptionUse
TeamsWebhookURLAPI Gateway endpointConfigure in Azure Bot
APIGatewayEndpointBase API URLReference only
ECSClusterCluster nameFor monitoring
ECSServiceService nameFor monitoring

🔍 Verify Deployment

Check ECS Service

  1. Go to ECS Console → Clusters
  2. Find your cluster (e.g., OhlalaSmartOps-Cluster-...)
  3. Check service shows 1 running task

Check API Gateway

  1. Go to API Gateway Console
  2. Find your API (e.g., OhlalaSmartOps-API-...)
  3. Verify endpoints are created

Check Health Endpoint

Test the health endpoint (no authentication required):

curl https://your-api-id.execute-api.region.amazonaws.com/prod-stackname/health

Should return: {"status": "healthy"}

❓ Troubleshooting

Stack Creation Failed

IAM Role Already Exists

Error: “Resource of type ‘AWS::IAM::Role’ with identifier already exists” Solution: Use a different stack name, or delete the existing role first

Insufficient Permissions

Error: “User is not authorized to perform: iam:CreateRole” Solution: Ensure you have admin permissions or required IAM policies

Service Quota Exceeded

Error: “Service quota exceeded” Solution: Request quota increase or deploy in different region

Stack Stuck in CREATE_IN_PROGRESS

  • Check Events tab for specific resource causing delay
  • ECS service can take 3-5 minutes to stabilize
  • If stuck >15 minutes, consider deleting and retrying

⏭️ Next Step

With infrastructure deployed and webhook URL ready:

Continue to Teams Integration →