Skip to content

Commit

Permalink
Fix for AWS' filter syntax being terrible
Browse files Browse the repository at this point in the history
  • Loading branch information
webvictim committed Aug 9, 2019
1 parent 1974742 commit c7ba0ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/marketplace/files/make-amis-public.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ BUILD_TIMESTAMP=$(<"${TIMESTAMP_FILE}")

# Write AMI ID for each region to AMI ID file
for REGION in ${REGION_LIST}; do
aws ec2 describe-images --region ${REGION} --filters Name=tag:BuildTimestamp,Values=${BUILD_TIMESTAMP},Name=tag:BuildType,Values=production > "${BUILD_DIR}/${REGION}.json"
aws ec2 describe-images --region ${REGION} --filters "Name=tag:BuildTimestamp,Values=${BUILD_TIMESTAMP}" "Name=tag:BuildType,Values=production" > "${BUILD_DIR}/${REGION}.json"
AMI_ID=$(jq --raw-output '.Images[0].ImageId' "${BUILD_DIR}/${REGION}.json")
if [[ "${AMI_ID}" == "" || "${AMI_ID}" == "null" ]]; then
echo "Error: cannot get AMI ID for ${REGION}"
Expand Down

0 comments on commit c7ba0ba

Please sign in to comment.