Migration from AWS Lambda to other AWS compute services (e.g., such as Amazon ECS), canpresents be challengingchallenges due to tight integrationsintegration with theAWS serviceLambda's providerAPIs, aoften phenomenonreferred knownto as service lock-in. Tools like [https://github.com/awslabs/aws-lambda-web-adapter AWS Lambda Web Adapter] offer cana pathway facilitatefor [[Software portability|portability]] by enabling developers to build web applications using familiar frameworks,employingunder the "Lambdalith" or [https://docs.aws.amazon.com/lambda/latest/dg/monolith.htmlmonolithic Lambda monolith]design pattern. <ref>{{Cite web |title=AWS Lambda Web Adapter |url=https://github.com/awslabs/aws-lambda-web-adapter |url-status=live |access-date=2024-11-29 |archive-date=2024-11-28 |archive-url=https://web.archive.org/web/20241128211006/https://github.com/awslabs/aws-lambda-web-adapter |archive-date=2024-11-28 |access-date=2024-11-29}}</ref><ref>{{Cite web |title=The Lambda monolith |url=https://docs.aws.amazon.com/lambda/latest/dg/monolith.html |url-status=live |access-date=2024-11-29 |archive-date=2024-11-26 |archive-url=https://web.archive.org/web/20241126020340/https://docs.aws.amazon.com/lambda/latest/dg/monolith.html |archive-date=2024-11-26 |access-date=2024-11-29}}</ref> However, this approach has someintroduces limitations:, including coarser-grained alerting and access controls, potential cold start delays with large dependencies, and limited suitability for non-HTTP APIs.
Adopting architectural patterns such as hexagonal architecture can mitigate these challenges by abstracting dependencies and facilitating compatibility across compute platforms. <ref name=":1" /> By separating the core business logic from infrastructure-specific code, this approach supports both HTTP and non-HTTP APIs, offering a more portable foundation for serverless workloads.
* Coarser-grained alerting and access controls compared to single-purpose functions.
* Potential cold start penalties, particularly with large web framework dependencies.
* May require refactoring to accommodate integration differences.
* May not work as well with non-HTTP APIs.
[[Hexagonal architecture (software)|Hexagonal architecture]] can facilitate workload portability. It can help with both HTTP and non-HTTP APIs. <ref name=":1" />