Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 0 additions & 74 deletions .github/workflows/deploy-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,80 +132,6 @@ jobs:
echo "Waiting for function to be active..."
aws lambda wait function-active --function-name "$QUALIFIED_FUNCTION_NAME" --endpoint-url "$LAMBDA_ENDPOINT" --region "$AWS_REGION"

- name: Invoke Lambda function - ${{ matrix.example.name }}
env:
LAMBDA_ENDPOINT: ${{ secrets.LAMBDA_ENDPOINT_BETA }}
run: |
echo "Testing qualified function: $QUALIFIED_FUNCTION_NAME"
aws lambda invoke \
--function-name "$QUALIFIED_FUNCTION_NAME" \
--cli-binary-format raw-in-base64-out \
--payload '{"name": "World"}' \
--region "${{ env.AWS_REGION }}" \
--endpoint-url "$LAMBDA_ENDPOINT" \
/tmp/response.json \
> /tmp/invoke_response.json

echo "Response:"
cat /tmp/response.json

echo "Full Invoke Response:"
cat /tmp/invoke_response.json

echo "All Response Headers:"
jq -r '.ResponseMetadata.HTTPHeaders' /tmp/invoke_response.json || echo "No HTTPHeaders found"

# Check for function errors
FUNCTION_ERROR=$(jq -r '.FunctionError // empty' /tmp/invoke_response.json)
if [ -n "$FUNCTION_ERROR" ]; then
echo "Warning: Lambda function failed with error: $FUNCTION_ERROR"
echo "Function response:"
cat /tmp/response.json
fi

# Extract invocation ID from response headers
INVOCATION_ID=$(jq -r '.ResponseMetadata.HTTPHeaders["x-amzn-invocation-id"] // empty' /tmp/invoke_response.json)
if [ -n "$INVOCATION_ID" ]; then
echo "INVOCATION_ID=$INVOCATION_ID" >> $GITHUB_ENV
echo "Captured Invocation ID: $INVOCATION_ID"
else
echo "Warning: Could not capture invocation ID from response"
fi

- name: Find Durable Execution - ${{ matrix.example.name }}
env:
LAMBDA_ENDPOINT: ${{ secrets.LAMBDA_ENDPOINT_BETA }}
run: |
echo "Listing durable executions for qualified function: $QUALIFIED_FUNCTION_NAME"
aws lambda list-durable-executions-by-function \
--function-name "$QUALIFIED_FUNCTION_NAME" \
--statuses SUCCEEDED \
--region "${{ env.AWS_REGION }}" \
--endpoint-url "$LAMBDA_ENDPOINT" \
--cli-binary-format raw-in-base64-out \
> /tmp/executions.json
echo "Durable Executions:"
cat /tmp/executions.json

# Extract the first execution ARN for history retrieval
EXECUTION_ARN=$(jq -r '.DurableExecutions[0].DurableExecutionArn // empty' /tmp/executions.json)
echo "EXECUTION_ARN=$EXECUTION_ARN" >> $GITHUB_ENV

- name: Get Durable Execution History - ${{ matrix.example.name }}
if: env.EXECUTION_ARN != ''
env:
LAMBDA_ENDPOINT: ${{ secrets.LAMBDA_ENDPOINT_BETA }}
run: |
echo "Getting execution history for: $EXECUTION_ARN"
aws lambda get-durable-execution-history \
--durable-execution-arn "$EXECUTION_ARN" \
--region "${{ env.AWS_REGION }}" \
--endpoint-url "$LAMBDA_ENDPOINT" \
--cli-binary-format raw-in-base64-out \
> /tmp/history.json
echo "Execution History:"
cat /tmp/history.json

# - name: Cleanup Lambda function
# if: always()
# env:
Expand Down
Loading