Skip to content
This repository was archived by the owner on Feb 25, 2024. It is now read-only.
This repository was archived by the owner on Feb 25, 2024. It is now read-only.

Provide customization for Cloud Formation templates in Lambda deployments #2

@lucascott

Description

@lucascott

Is your feature request related to a problem? Please describe.
According to the aws_lambda.operator file, the CloudFormation template for Lambda deployments is defined in the _create_aws_lambda_cloudformation_template_file function. I see possible limitations in this design. In particular, in many use cases one would see the need to make minor adjustments to the CF template to integrate the deployment with the rest of the architecture in place (one example would be adding the integration with an ALB). These would feel in the inappropriate place if they would be decoupled from the original lambda CF template.

Describe the solution you'd like
The ideal solution would be that one could define a custom CF template based on its architecture and the BentoML Lambda definition and necessary pieces would be added to it in the appropriate places to complete the stack.

Describe alternatives you've considered
One possible solution would be to fill up a separate CF stack file provided by the user as if it is a template (for example with jinja2 syntax).

Additional context
You can think of an example serving architecture with an ALB which takes care of auth and routing of the various requests to the appropriate Lambda endpoints (ML models and other services). Therefore, what would be convenient to be able to add is:

  • A AWS::ElasticLoadBalancingV2::TargetGroup for the Lambda
  • A AWS::ElasticLoadBalancingV2::ListenerRule to set up the appropriate route for the ALB given the TargetGroup above
  • And additional AWS::Logs::LogGroup for Cloudwatch logs (for monitoring etc.)

Being able to generalize for any custom setup is very hard and time-consuming but maybe some steps in that direction can be done.

Extra material
Initial discussion here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions