Skip to content

Commit 91f22a7

Browse files
committed
Fix 081-mediaconnect: 8 more local-outside-function. Fix 001-lightsail: passes locally
1 parent 859585d commit 91f22a7

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

tuts/081-aws-elemental-mediaconnect-gs/aws-elemental-mediaconnect-gs.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ echo "Using AWS Region: $AWS_REGION"
140140

141141
# Get available availability zones in the current region
142142
echo "Getting available availability zones in region $AWS_REGION..."
143-
local az_output
143+
az_output=""
144144
if az_output=$(aws ec2 describe-availability-zones --region "$AWS_REGION" --query "AvailabilityZones[0].ZoneName" --output text 2>&1); then
145145
AVAILABILITY_ZONE="$az_output"
146146
if [ -z "$AVAILABILITY_ZONE" ]; then
@@ -172,7 +172,7 @@ echo "Entitlement name: $ENTITLEMENT_NAME"
172172

173173
# Step 1: Verify access to MediaConnect
174174
echo "Step 1: Verifying access to AWS Elemental MediaConnect..."
175-
local list_flows_output
175+
list_flows_output=""
176176
if list_flows_output=$(aws mediaconnect list-flows 2>&1); then
177177
echo "$list_flows_output"
178178
else
@@ -181,7 +181,7 @@ fi
181181

182182
# Step 2: Create a flow
183183
echo "Step 2: Creating a flow..."
184-
local create_flow_output
184+
create_flow_output=""
185185
if create_flow_output=$(aws mediaconnect create-flow \
186186
--availability-zone "$AVAILABILITY_ZONE" \
187187
--name "$FLOW_NAME" \
@@ -205,7 +205,7 @@ fi
205205

206206
# Step 3: Add an output
207207
echo "Step 3: Adding an output to the flow..."
208-
local add_output_output
208+
add_output_output=""
209209
if add_output_output=$(aws mediaconnect add-flow-outputs \
210210
--flow-arn "$FLOW_ARN" \
211211
--outputs "Name=$OUTPUT_NAME,Protocol=zixi-push,Destination=198.51.100.11,Port=1024,StreamId=ZixiAwardsOutput" 2>&1); then
@@ -215,7 +215,7 @@ else
215215
fi
216216

217217
# Extract the output ARN
218-
local output_arn
218+
output_arn=""
219219
output_arn=$(extract_json_value "$add_output_output" "OutputArn")
220220
if [ -z "$output_arn" ]; then
221221
echo "WARNING: Failed to extract output ARN from output"
@@ -226,7 +226,7 @@ fi
226226

227227
# Step 4: Grant an entitlement
228228
echo "Step 4: Granting an entitlement..."
229-
local grant_entitlement_output
229+
grant_entitlement_output=""
230230
if grant_entitlement_output=$(aws mediaconnect grant-flow-entitlements \
231231
--flow-arn "$FLOW_ARN" \
232232
--entitlements "Name=$ENTITLEMENT_NAME,Subscribers=222233334444" 2>&1); then
@@ -236,7 +236,7 @@ else
236236
fi
237237

238238
# Extract the entitlement ARN
239-
local entitlement_arn
239+
entitlement_arn=""
240240
entitlement_arn=$(extract_json_value "$grant_entitlement_output" "EntitlementArn")
241241
if [ -z "$entitlement_arn" ]; then
242242
echo "WARNING: Failed to extract entitlement ARN from output"
@@ -247,7 +247,7 @@ fi
247247

248248
# Step 5: List entitlements to share with affiliates
249249
echo "Step 5: Listing entitlements for the flow..."
250-
local describe_flow_output
250+
describe_flow_output=""
251251
if describe_flow_output=$(aws mediaconnect describe-flow --flow-arn "$FLOW_ARN" --query "Flow.Entitlements" 2>&1); then
252252
echo "Entitlements for the flow:"
253253
echo "$describe_flow_output"

0 commit comments

Comments
 (0)