pip_services3_aws.containers.CommandableLambdaFunction module
- class pip_services3_aws.containers.CommandableLambdaFunction.CommandableLambdaFunction(name: str, description: Optional[str] = None)
Bases:
pip_services3_aws.containers.LambdaFunction.LambdaFunction,abc.ABCAbstract AWS Lambda function, that acts as a container to instantiate and run components and expose them via external entry point. All actions are automatically generated for commands defined in
ICommandablecomponents. Each command is exposed as an action defined by “cmd” parameter.Container configuration for this Lambda function is stored in <code>”./config/config.yml”</code> file. But this path can be overriden by <code>CONFIG_PATH</code> environment variable.
Note: This component has been deprecated. Use LambdaService instead.
- ### References ###
*:logger:*:*:1.0 (optional)
ContextInfocomponents to pass log messages*:counters:*:*:1.0 (optional)
ContextInfocomponents to pass collected measurements*:service:lambda:*:1.0 (optional)
ILambdaServiceservices to handle action requests*:service:commandable-lambda:*:1.0 (optional)
ILambdaServiceservices to handle action requests
See
ILambdaServiceExample:
class MyLambdaFunction(CommandableLambdaFunction): ... def __init__() super().__init__("mygroup", "MyGroup lambda function"); self._dependency_resolver.put( "controller", Descriptor("mygroup","controller","*","*","1.0") ) self.__controller: IMyController = None lambda = MyLambdaFunction() service.run() print("MyLambdaFunction is started")
- register()
Registers all actions in this lambda function.