Skip to content

Multi-Cloud Function Providers Guide ​

This guide is the multi-cloud entry point for TPF function deployments. It shows how the same FUNCTION platform mode can target AWS Lambda, Azure Functions, and Google Cloud Run functions while keeping the typed business flow unchanged.

Overview ​

TPF supports three major cloud function platforms:

ProviderExtensionHandler InterfaceLocal Testing
AWS Lambdaquarkus-amazon-lambdaRequestHandler<I, O>Mock event server
Azure Functionsquarkus-azure-functionsHTTP trigger + RESTCore Tools v4.x
Google Cloud Run functionsquarkus-google-cloud-functionsHttpFunctionFunctions Framework

Important runtime constraint:

  • FUNCTION currently requires REST transport. gRPC is not a supported FUNCTION transport in the current implementation.
  • Google's current product name is Cloud Run functions, while the current Quarkus extension name remains quarkus-google-cloud-functions.

Architecture ​

Step-Level Handlers ​

Step-level pipeline handlers (e.g., CrawlSourceFunctionHandler, ParseDocumentFunctionHandler) are fully multi-cloud ready. The framework generates provider-specific handlers based on:

  1. Explicit configuration: -Dpipeline.function.provider=aws|azure|gcp
  2. Auto-detection: Based on Quarkus extension in classpath
  3. Default: AWS Lambda

Orchestrator Handlers ​

The orchestrator handler (PipelineRunFunctionHandler) generates provider-specific handlers for each cloud platform:

  • AWS Lambda: Implements RequestHandler<I, O> with Lambda Context
  • Azure Functions: POJO with ExecutionContext parameter
  • Google Cloud Run functions: Implements HttpFunction with HttpRequest/HttpResponse

All providers preserve FUNCTION platform semantics (cardinality, failure handling) and support async handlers (run-async, status, result). Azure and GCP FUNCTION deployments use the required REST transport approach, where HTTP triggers route requests to Quarkus REST endpoints while preserving FUNCTION semantics.

What this guide covers and does not cover ​

This guide covers the current repo-supported FUNCTION targets:

  1. AWS Lambda
  2. Azure Functions
  3. Google Cloud Run functions

It does not currently document or implement:

  1. Google Cloud Run services as a generic container/service target,
  2. Azure Durable Functions as a separate TPF runtime model,
  3. gRPC as a FUNCTION transport.

If you need queue-backed recovery, checkpoint handoff, or orchestrator-managed HA, use the COMPUTE + QUEUE_ASYNC path instead of treating function providers as a replacement for that runtime model.

Quick Start ​

AWS Lambda ​

bash
# Build
./build-lambda.sh -DskipTests

# Test
./mvnw -pl orchestrator-svc \
  -Dtpf.build.platform=FUNCTION \
  -Dtpf.build.transport=REST \
  -Dtpf.build.rest.naming.strategy=RESOURCEFUL \
  -Dtpf.build.lambda.scope=compile \
  -Dquarkus.profile=lambda \
  -Dtest=LambdaMockEventServerSmokeTest \
  test

See AWS Lambda Platform Guide for detailed deployment instructions.

Azure Functions ​

bash
# Build
./build-azure.sh -DskipTests

# Test
./mvnw -pl orchestrator-svc \
  -Dtpf.build.platform=FUNCTION \
  -Dtpf.build.transport=REST \
  -Dtpf.build.rest.naming.strategy=RESOURCEFUL \
  -Dtpf.build.azure.scope=compile \
  -Dquarkus.profile=azure-functions \
  -Dtest=AzureFunctionsBootstrapSmokeTest \
  test

See Azure Functions Testing Guide for detailed deployment instructions.

Google Cloud Run functions ​

bash
# Build
./build-gcp.sh -DskipTests

# Test
./mvnw -pl orchestrator-svc \
  -Dtpf.build.platform=FUNCTION \
  -Dtpf.build.transport=REST \
  -Dtpf.build.rest.naming.strategy=RESOURCEFUL \
  -Dtpf.build.gcp.scope=compile \
  -Dquarkus.profile=gcp-functions \
  -Dtest=GcpFunctionsBootstrapSmokeTest \
  test

Configuration ​

Build Properties ​

PropertyDescriptionValuesDefault
tpf.build.platformTarget platformCOMPUTE, FUNCTIONCOMPUTE
tpf.build.transportTransport protocol for FUNCTION buildsRESTREST
tpf.build.lambda.scopeLambda dependency scopecompile, providedprovided
tpf.build.azure.scopeAzure dependency scopecompile, providedprovided
tpf.build.gcp.scopeGCP dependency scopecompile, providedprovided
quarkus.profileQuarkus profilelambda, azure-functions, gcp-functions-

FUNCTION is a platform mode, not a transport. Function-provider builds generate provider handler artifacts and currently require REST transport; gRPC remains a transport option for COMPUTE deployments.

Provider Selection ​

The framework selects the provider using this precedence:

  1. Explicit: -Dpipeline.function.provider=aws|azure|gcp
  2. Auto-detect: Based on Quarkus extension in classpath
  3. Default: AWS Lambda

Provider Comparison ​

AWS Lambda ​

Strengths:

  • Mature ecosystem with extensive integrations
  • SnapStart for cold start mitigation
  • Native support for streaming payloads
  • Comprehensive monitoring via CloudWatch

Considerations:

  • Maximum execution time: 15 minutes
  • Memory: 128MB - 10GB
  • Deployment package size limits

Azure Functions ​

Strengths:

  • Premium plan with pre-warmed instances
  • Strong integration with Azure ecosystem
  • Flexible pricing (Consumption, Premium, Dedicated)
  • Application Insights for monitoring

Considerations:

  • Maximum execution time varies by plan
  • Cold starts on Consumption plan
  • Storage account dependency

Google Cloud Run functions ​

Strengths:

  • Simple deployment model
  • Tight integration with GCP services
  • Cloud Monitoring and Logging
  • 2nd gen functions with improved performance

Considerations:

  • Maximum execution time: 9 minutes (1st gen), 60 minutes (2nd gen)
  • Memory: 128MB - 32GB
  • Cold starts on standard tier

Wire Protocol ​

TPF uses protobuf-over-HTTP as the default wire protocol for remote function invocations:

  • Payloads wrapped in BytesValue protobuf messages
  • Content-Type: application/x-protobuf
  • JSON fallback when protobuf not configured

This is cloud-agnostic and works identically across all providers.

Testing Strategy ​

Local Testing ​

ProviderTest ClassRequirements
AWS LambdaLambdaMockEventServerSmokeTestNone
Azure FunctionsAzureFunctionsBootstrapSmokeTestNone
Google Cloud Run functionsGcpFunctionsBootstrapSmokeTestNone

Integration Testing ​

ProviderTest ClassRequirements
AWS Lambda*-EndToEndITAWS credentials, SAM/CloudFormation
Azure FunctionsAzureFunctionsEndToEndITAzure subscription, Terraform
Google Cloud Run functionsGcpFunctionsBootstrapSmokeTestBuild with the gcp-functions profile; validates Quarkus Functions extension bootstrap and HttpFunction loading only

Troubleshooting ​

Common Issues ​

Multiple providers detected:

text
[TPF] Multiple function providers detected. Using AWS Lambda (aws).

Solution: Set explicit provider: -Dpipeline.function.provider=azure

Extension not on classpath:

text
ClassNotFoundException: com.google.cloud.functions.HttpFunction

Solution: Build with correct scope: -Dtpf.build.gcp.scope=compile

Next Steps ​