feat(apigw): add API Gateway response streaming support (#207)
Replace ALB + Lambda architecture with API Gateway REST API + Lambda using response streaming for SSE support. This provides: - No VPC required, reducing complexity and cost - Native streaming support via API Gateway response streaming - Pay-per-request pricing model Changes: - Add Lambda Web Adapter to Dockerfile for streaming support - Replace BedrockProxy.template with API Gateway configuration - Update README with new deployment options and latest models - Update architecture diagram for API Gateway flow
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
FROM public.ecr.aws/lambda/python:3.12
|
||||
|
||||
# Add Lambda Web Adapter for API Gateway response streaming
|
||||
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.9.1 /lambda-adapter /opt/extensions/lambda-adapter
|
||||
|
||||
COPY ./api ./api
|
||||
|
||||
COPY requirements.txt .
|
||||
|
||||
RUN pip3 install -r requirements.txt -U --no-cache-dir
|
||||
|
||||
CMD [ "api.app.handler" ]
|
||||
# Lambda Web Adapter requires overriding the Lambda base image entrypoint
|
||||
# to run the web app directly instead of the Lambda runtime handler
|
||||
ENTRYPOINT []
|
||||
CMD ["python", "-m", "uvicorn", "api.app:app", "--host", "0.0.0.0", "--port", "8080"]
|
||||
Reference in New Issue
Block a user