File tree Expand file tree Collapse file tree
046-aws-systems-manager-gs
055-amazon-vpc-lattice-gs
081-aws-elemental-mediaconnect-gs
085-amazon-ecs-service-connect Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ MAX_ATTEMPTS=60
233233ATTEMPTS=0
234234while [ $ATTEMPTS -lt $MAX_ATTEMPTS ]; do
235235 SNAPSHOT_STATE=$( aws lightsail get-instance-snapshot --instance-snapshot-name " $SNAPSHOT_NAME " --region " $AWS_REGION " --query ' instanceSnapshot.state' --output text 2> /dev/null || echo " unknown" )
236- if [ " $SNAPSHOT_STATE " == " completed " ]; then
236+ if [ " $SNAPSHOT_STATE " == " available " ]; then
237237 echo " Snapshot creation completed"
238238 break
239239 fi
Original file line number Diff line number Diff line change @@ -80,7 +80,8 @@ CREATED_RESOURCES+=("Email identity: $EMAIL_ADDRESS")
8080echo " A verification email has been sent to $EMAIL_ADDRESS ."
8181echo " Please check your inbox and click the verification link before continuing."
8282echo " "
83- echo " Press Enter after you've verified your email address..."
83+ echo " Waiting for email verification (auto-skipping in non-interactive mode)..."
84+ sleep 2
8485sleep 1
8586
8687# Check verification status
@@ -217,7 +218,8 @@ if [[ "$SEND_TEST" =~ ^[Yy] ]]; then
217218 echo " A verification email has been sent to $RECIPIENT_EMAIL ."
218219 echo " Please check the inbox and click the verification link before continuing."
219220 echo " "
220- echo " Press Enter after you've verified the recipient email address..."
221+ echo " Waiting for recipient verification (auto-skipping)..."
222+ sleep 2
221223 sleep 1
222224
223225 # Check recipient verification status
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ echo ""
114114CURRENT_REGION=$( aws configure get region)
115115if [[ -z " $CURRENT_REGION " ]]; then
116116 echo " No AWS region configured. Please specify a region:"
117- read -r CURRENT_REGION
117+ CURRENT_REGION= " ${AWS_DEFAULT_REGION :- us-west-2} "
118118 if [[ -z " $CURRENT_REGION " ]]; then
119119 echo " ERROR: A region must be specified" | tee -a " $LOG_FILE "
120120 exit 1
@@ -537,7 +537,7 @@ echo "==========================================="
537537echo " CLEANUP CONFIRMATION"
538538echo " ==========================================="
539539echo " Do you want to clean up all created resources? (y/n): "
540- read -r CLEANUP_CHOICE
540+ CLEANUP_CHOICE= " y "
541541
542542if [[ " $CLEANUP_CHOICE " =~ ^[Yy]$ ]]; then
543543 echo " Cleaning up resources..." | tee -a " $LOG_FILE "
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ validate_input() {
4747 fi
4848
4949 # Validate against common injection patterns
50- if [[ " $input " =~ [' ;$`|&<>(){ }] ]]; then
50+ if [[ " $input " =~ [\;\$\`\|\&\<\>\(\)\{\ } ] ]]; then
5151 echo " ERROR: $param_name contains invalid characters" | tee -a " $LOG_FILE "
5252 return 1
5353 fi
@@ -78,7 +78,7 @@ wait_for_resource() {
7878 status_output=$( eval " $command " 2>&1 ) || true
7979 echo " $status_output " >> " $LOG_FILE "
8080
81- # For service networks, they don ' t have a status field in the output
81+ # For service networks, they do not have a status field in the output
8282 # We'll consider them active if we can retrieve them
8383 if [[ " $resource_type " == " Service Network" ]]; then
8484 if [[ " $status_output " == * " $resource_id " * ]]; then
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ trap cleanup_resources EXIT
121121validate_aws_cli
122122
123123# Get the current AWS region
124- local aws_region
124+ aws_region= " "
125125if aws_region=$( aws configure get region 2> /dev/null) ; then
126126 if [ -z " $aws_region " ]; then
127127 handle_error " Failed to get AWS region. Please make sure AWS CLI is configured."
Original file line number Diff line number Diff line change @@ -570,7 +570,7 @@ main() {
570570 echo " CLEANUP CONFIRMATION"
571571 echo " ==========================================="
572572 echo " Do you want to clean up all created resources? (y/n): "
573- read -r CLEANUP_CHOICE
573+ CLEANUP_CHOICE= " y "
574574
575575 if [[ " $CLEANUP_CHOICE " =~ ^[Yy]$ ]]; then
576576 cleanup_resources
You can’t perform that action at this time.
0 commit comments