diff --git a/.github/workflows/cloud-infra.yaml b/.github/workflows/cloud-infra.yaml index 1c9c2e9c..21f6ab75 100644 --- a/.github/workflows/cloud-infra.yaml +++ b/.github/workflows/cloud-infra.yaml @@ -30,7 +30,7 @@ jobs: - name: Create AMI run: | curl -L -O https://github.com/CIROH-UA/ngen-datastream/blob/main/cloud/AWS/startup_ec2.sh - output=$(aws ec2 run-instances --image-id resolve:ssm:/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64 --instance-type $INSTANCE_TYPE region $REGION key-name datastream-github.pem security-group-ids $SECURITY_GRP --name ngen-datastream_$(env TZ=US/Eastern date +'%Y%m%d%H%M) ---user-data ./startup_ec2.sh) + output=$(aws ec2 run-instances --image-id resolve:ssm:/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64 --instance-type $INSTANCE_TYPE region $REGION key-name datastream-github.pem security-group-ids $SECURITY_GRP --name ngen-datastream_$(env TZ=US/Eastern date +'%Y%m%d%H%M') ---user-data ./startup_ec2.sh) instance_id=$(echo $output | jq -r '.Instances[0].InstanceId') aws ec2 wait instance-running --instance-ids $instance_id ami_output=$(aws ec2 create-image --instance-id $instance_id --name "My_AMI_Name" --region $REGION --description "My AMI Description")