From f2a0a7945f8ce3573dda3273cc0680fc318dde7f Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Wed, 3 Jun 2026 16:04:22 -0400 Subject: [PATCH] Pin SocketMode image asset to LINUX_ARM64 (#42) The task runs ARM64, but the image asset had no explicit platform, so the amd64 CD runner built an amd64 image (QEMU alone does not change the default target). Revision :8 crash-looped with "exec format error" (50 failed task starts); CloudFormation hung on service stabilization until cancelled. Local arm64 builds masked this - deploys from this Mac always produced the right image. Same fix pattern as the org-wide QEMU+platform rule for arm64 Lambda bundling. --- lib/constructs/socket-mode.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/constructs/socket-mode.ts b/lib/constructs/socket-mode.ts index ba59c0f..585d911 100644 --- a/lib/constructs/socket-mode.ts +++ b/lib/constructs/socket-mode.ts @@ -3,6 +3,7 @@ import * as cdk from 'aws-cdk-lib'; import * as ec2 from 'aws-cdk-lib/aws-ec2'; import * as ecs from 'aws-cdk-lib/aws-ecs'; import * as ecr from 'aws-cdk-lib/aws-ecr'; +import * as ecrAssets from 'aws-cdk-lib/aws-ecr-assets'; import * as logs from 'aws-cdk-lib/aws-logs'; import * as iam from 'aws-cdk-lib/aws-iam'; import * as dynamodb from 'aws-cdk-lib/aws-dynamodb'; @@ -76,6 +77,10 @@ export class SocketModeConstruct extends Construct { taskDef.addContainer('listener', { image: ecs.ContainerImage.fromAsset( path.join(__dirname, '../../listener'), + // Explicit platform: the task is ARM64, and without this an amd64 CI + // runner builds an amd64 image even with QEMU enabled — tasks then + // crash-loop with "exec format error" (50 failed starts on 2026-06-03). + { platform: ecrAssets.Platform.LINUX_ARM64 }, ), essential: true, environment: {