I'm building the following architecture: a user posts a string to API Gateway, which in turn calls a Lambda function - using that string as input. This Lambda function writes the string to DynamoDB. After that, this Lambda function calls another Lambda function passing as input the id of the item inserted into DynamoDB, and returns a 200 status code.
To call the second Lambda function I use:
payload = {"id":item['id']}
invoke_lambda = lambda_client.invoke(FunctionName="process",
InvocationType="Event",
Payload=json.dumps(payload))
How should I configure serverless.yml for the second Lambda in order for it not to use API gateway? I don't want to use API Gateway because it limits the Lambda to finish in 30 seconds.
For instance, to use API Gateway, I would just do this:
functions:
process:
events:
- http: ANY /
- http: 'ANY {proxy+}'
What's the alternative to that?