Skip to content

Commit 7f68c0b

Browse files
committed
quick fix
1 parent 6e8b268 commit 7f68c0b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

AWS/prepare-build-cloud.bash

+5-1
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,12 @@ if [[ "${INSTANCE_ID}" == null ]]; then
108108
AMI_ID="$(aws_execute -r -s "ec2 describe-images \
109109
--owners \"amazon\" \
110110
--filters \"Name=name,Values=al2023-ami-2023*-x86_64\" \"Name=state,Values=available\" \
111-
--query \"sort_by(Images, &CreationDate)[-1].[templateId]\" \
111+
--query \"sort_by(Images, &CreationDate)[-1].[ImageId]\" \
112112
--output \"text\"")"
113+
if [[ "${AMI_ID}" == "None" ]]; then
114+
error "Unable to find AMI ID for Amazon Linux 2023..."
115+
exit 1
116+
fi
113117
INSTANCE=$(aws_execute -r "ec2 run-instances \
114118
--image-id \"${AMI_ID}\" \
115119
--instance-type \"${AWS_BUILD_CLOUD_INSTANCE_TYPE}\" \

0 commit comments

Comments
 (0)