Menu

Post image 1
Post image 2
1 / 2
0

Modern Container Builds and WebSocket APIs Come to AWS SAM

DEV Community·Eric D Johnson·27 days ago
#tTISSxYj
Reading 0:00
15s threshold

SAM CLI has always been good at taking the grunt work out of serverless deployments. You define your functions and APIs in a template, and SAM handles the CloudFormation, the packaging, the deployment. It works. Until recently, two things were missing. BuildKit support for container image builds. And a SAM resource type for WebSocket APIs. Both are now shipped. Neither breaks existing templates. Let's walk through it. BuildKit Support for Image-Based Lambda Functions The problem When you run sam build for an image-based Lambda function, SAM uses the docker-py Python SDK under the hood. That SDK talks to the Docker daemon directly, but it doesn't support BuildKit. At all. That means every sam build invocation uses the legacy Docker builder. You lose parallelized build stages. You lose efficient layer caching. You lose multi-stage build optimizations. You lose cross-architecture improvements that BuildKit has shipped over the past several years.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More