From 27f32680e674ddc94225fb887cde2d1fbf828729 Mon Sep 17 00:00:00 2001 From: "D." Date: Tue, 31 Mar 2026 22:36:38 +0100 Subject: [PATCH] fix: use /dev/sda1 for block device mapping to prevent duplicate volumes. The AMI root device is /dev/sda1, but the launch config was creating volumes on /dev/xvda, resulting in two volumes per instance instead of one. This was consuming 2x the expected EBS storage. --- providers/aws-functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/providers/aws-functions.sh b/providers/aws-functions.sh index 7b202825..c8027c67 100644 --- a/providers/aws-functions.sh +++ b/providers/aws-functions.sh @@ -19,7 +19,7 @@ create_instance() { disk="20" fi - disk_option="--block-device-mappings DeviceName=/dev/xvda,Ebs={VolumeSize=$disk,VolumeType=gp2,DeleteOnTermination=true}" + disk_option="--block-device-mappings DeviceName=/dev/sda1,Ebs={VolumeSize=$disk,VolumeType=gp2,DeleteOnTermination=true}" security_group_name="$(cat "$AXIOM_PATH/axiom.json" | jq -r '.security_group_name')" security_group_id="$(cat "$AXIOM_PATH/axiom.json" | jq -r '.security_group_id')" @@ -699,7 +699,7 @@ create_instances() { return 1 fi - disk_option="--block-device-mappings DeviceName=/dev/xvda,Ebs={VolumeSize=$disk,VolumeType=gp2,DeleteOnTermination=true}" + disk_option="--block-device-mappings DeviceName=/dev/sda1,Ebs={VolumeSize=$disk,VolumeType=gp2,DeleteOnTermination=true}" count="${#names[@]}"