July 2018
Intermediate to advanced
324 pages
8h 14m
English
By default, Zappa performs the direct invocation of a method at the current Lambda instance. But, if you wish to perform the Lambda invocation as a separate Lambda function on a different region, then you can update your task decorator, as shown in the following code snippet:
@task(remote_aws_lambda_function_name='subscribe-mobile-prod', remote_aws_region='us-east-1')def subscribe_mobile_number(*args, **kwargs): """ This may take a long time! """ validate(kwargs.get("mobile")) add_subscription(mobile=kwargs.get("mobile"))
We are using the task decorator, but with additional arguments, such as remote_aws_lambda_function_name and remote_aws_region. These arguments state to execute the particular Lambda function in a specific ...
Read now
Unlock full access