/ 02-multichannel-api-gateway / layers / project_layers.py
project_layers.py
 1  """Lambda layers for the WhatsApp API Gateway integration."""
 2  
 3  from constructs import Construct
 4  from aws_cdk import (
 5      aws_lambda as _lambda,
 6  )
 7  
 8  
 9  class ProjectLayers(Construct):
10      """Common Lambda layer with shared utilities."""
11  
12      def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
13          super().__init__(scope, construct_id, **kwargs)
14  
15          self.common_layer = _lambda.LayerVersion(
16              self,
17              "CommonLayer",
18              code=_lambda.Code.from_asset("layers/common"),
19              compatible_runtimes=[_lambda.Runtime.PYTHON_3_12],
20              description="Common utilities for WhatsApp API Gateway integration",
21          )