A serverless AWS application that uses AI to extract structured data from Welding Procedure Qualification Records (WPQR) and Welding Procedure Specifications (WPS) documents.
- AI-Powered Document Processing: Uses Meta Llama 3.3 70B model for intelligent document extraction
- Cross-Region Inference: Lambda functions in eu-west-2 calling Bedrock in us-east-1
- Dual Document Support: Processes both WPQR and WPS documents
- RESTful API: Simple HTTP endpoints for document upload and retrieval
- Real-time Status Tracking: Monitor processing status via DynamoDB
- Secure Access: API key authentication for all endpoints
https://ophsbkbt99.execute-api.eu-west-2.amazonaws.com/Prod
VhT1DLBGwS329LLrX0OGE1xxPpbNNQqW7GJ5g0WI
Endpoint: GET /get-upload-url
Parameters:
file: Filename for the documenttype: Document type (wpqrorwps)
Example:
curl -H "x-api-key: VhT1DLBGwS329LLrX0OGE1xxPpbNNQqW7GJ5g0WI" \
"https://ophsbkbt99.execute-api.eu-west-2.amazonaws.com/Prod/get-upload-url?file=my_wpqr.pdf&type=wpqr"Response:
{
"uuid": "12345678-1234-1234-1234-123456789012",
"upload_url": "https://weldit-genai-poc-bucket-123.s3.eu-west-2.amazonaws.com/input/wpqr/...",
"required_key": "input/wpqr/12345678-1234-1234-1234-123456789012_my_wpqr.pdf"
}Method: PUT to the pre-signed URL
Example:
curl -X PUT -T "document.pdf" -H "Content-Type: application/pdf" \
"https://weldit-genai-poc-bucket-123.s3.eu-west-2.amazonaws.com/input/wpqr/..."Endpoint: GET /status
Parameters:
uuid: Document UUID from step 1
Example:
curl -H "x-api-key: VhT1DLBGwS329LLrX0OGE1xxPpbNNQqW7GJ5g0WI" \
"https://ophsbkbt99.execute-api.eu-west-2.amazonaws.com/Prod/status?uuid=12345678-1234-1234-1234-123456789012"Response:
{
"status": "complete",
"output_key": "processed/wpqr/12345678-1234-1234-1234-123456789012_my_wpqr.json",
"updated_at": "2025-10-22T22:33:06.158075"
}Endpoint: GET /json
Parameters:
uuid: Document UUID from step 1
Example:
curl -H "x-api-key: VhT1DLBGwS329LLrX0OGE1xxPpbNNQqW7GJ5g0WI" \
"https://ophsbkbt99.execute-api.eu-west-2.amazonaws.com/Prod/json?uuid=12345678-1234-1234-1234-123456789012"Extracts information including:
- Document details (WPQR_No, Revision, Date)
- Welding parameters (current, voltage, heat input)
- Base materials and filler metals
- Welding positions and processes
- Quality control information
Extracts information including:
- WPS number and revision
- Welding methods and positions
- Base material specifications
- Filler material details
- Welding parameters
- Heat treatment requirements
# 1. Get upload URL
RESPONSE=$(curl -s -H "x-api-key: VhT1DLBGwS329LLrX0OGE1xxPpbNNQqW7GJ5g0WI" \
"https://ophsbkbt99.execute-api.eu-west-2.amazonaws.com/Prod/get-upload-url?file=wpqr_document.pdf&type=wpqr")
# 2. Extract UUID and upload URL
UUID=$(echo $RESPONSE | jq -r '.uuid')
UPLOAD_URL=$(echo $RESPONSE | jq -r '.upload_url')
# 3. Upload document
curl -X PUT -T "wpqr_document.pdf" -H "Content-Type: application/pdf" "$UPLOAD_URL"
# 4. Wait for processing (check status)
sleep 30
curl -H "x-api-key: VhT1DLBGwS329LLrX0OGE1xxPpbNNQqW7GJ5g0WI" \
"https://ophsbkbt99.execute-api.eu-west-2.amazonaws.com/Prod/status?uuid=$UUID"
# 5. Get extracted JSON
curl -H "x-api-key: VhT1DLBGwS329LLrX0OGE1xxPpbNNQqW7GJ5g0WI" \
"https://ophsbkbt99.execute-api.eu-west-2.amazonaws.com/Prod/json?uuid=$UUID"# 1. Get upload URL for WPS
RESPONSE=$(curl -s -H "x-api-key: VhT1DLBGwS329LLrX0OGE1xxPpbNNQqW7GJ5g0WI" \
"https://ophsbkbt99.execute-api.eu-west-2.amazonaws.com/Prod/get-upload-url?file=wps_document.pdf&type=wps")
# 2. Extract UUID and upload URL
UUID=$(echo $RESPONSE | jq -r '.uuid')
UPLOAD_URL=$(echo $RESPONSE | jq -r '.upload_url')
# 3. Upload document
curl -X PUT -T "wps_document.pdf" -H "Content-Type: application/pdf" "$UPLOAD_URL"
# 4. Wait and get results
sleep 30
curl -H "x-api-key: VhT1DLBGwS329LLrX0OGE1xxPpbNNQqW7GJ5g0WI" \
"https://ophsbkbt99.execute-api.eu-west-2.amazonaws.com/Prod/json?uuid=$UUID"processing: Document is being processedcomplete: Processing finished successfullyerror: Processing failednot_found: Document UUID not found
Missing API Key:
{
"message": "Forbidden"
}Invalid UUID:
{
"status": "not_found"
}Processing Error:
{
"status": "error",
"error_message": "Processing failed"
}- API Gateway: RESTful API endpoints
- Lambda Functions: Serverless processing
- S3: Document storage and retrieval
- DynamoDB: Processing status tracking
- EventBridge: Event-driven processing
- Bedrock: AI model inference (cross-region)
- SNS: Notifications (optional)
- API key authentication required for all endpoints
- Pre-signed URLs for secure document uploads
- IAM roles for service-to-service communication
- CORS enabled for web applications
- Processing Time: Typically 15-30 seconds per document
- Concurrent Processing: Supports multiple documents simultaneously
- Model: Meta Llama 3.3 70B (cross-region inference)
- Region: Lambda in eu-west-2, Bedrock in us-east-1
All endpoints have been tested and verified:
- β WPQR document processing
- β WPS document processing
- β Status tracking
- β JSON extraction
- β Error handling
- β Cross-region inference
Postman is an excellent tool for testing and exploring APIs. Here's how to test the WeldIT API using Postman:
- Create a new Collection in Postman
- Go to the Collection settings -> Authorization
- Select "API Key" as the type
- Enter the following details:
- Key:
x-api-key - Value:
VhT1DLBGwS329LLrX0OGE1xxPpbNNQqW7GJ5g0WI - Add to: "Header"
- Key:
- Click "Save"
- Create a new GET request
- URL:
https://ophsbkbt99.execute-api.eu-west-2.amazonaws.com/Prod/get-upload-url - Add query parameters:
file:my_wpqr.pdftype:wpqr
- Send the request
- Save the returned
uuidandupload_url
- Create a new PUT request
- URL: Use the
upload_urlfrom the previous step - Go to the "Body" tab, select "binary"
- Click "Select File" and choose your WPQR or WPS PDF document
- Send the request (Note: Unlike the Collection authorization, this request doesn't need the API key as it uses a pre-signed URL)
- Create a new GET request
- URL:
https://ophsbkbt99.execute-api.eu-west-2.amazonaws.com/Prod/status - Add query parameter:
uuid: Use the UUID from step 2
- Send the request
- Check that the status is "complete"
- Create a new GET request
- URL:
https://ophsbkbt99.execute-api.eu-west-2.amazonaws.com/Prod/json - Add query parameter:
uuid: Use the UUID from step 2
- Send the request
- Review the extracted JSON data
Save all these requests as a collection for easy reuse. You can also create environments to test with different documents and parameters.
For issues or questions, please check the CloudWatch logs for the Lambda functions or contact the development team.
Last Updated: October 22, 2025
Version: 1.0.0
Status: Production Ready β