Open brandond opened 7 years ago
It would be nice if the lambda config could be extended to automatically register the Lambda with a SNS Topic, CloudWatch Event Rule, etc.
This would add two properties (events and topics) to the root JSON object, both of which should be lists:
events
topics
{ "name": "Example_Lambda", "description": "This is a lambda", "region": "us-west-2", "handler": "function.lambda_handler", "role": "arn:aws:iam::0123456789012:role/LambdaRole", "timeout": 30, "memory": 128, "ignore": [ "/*.pyc", "lambda.json" ], "events": [ { "State": "ENABLED", "EventPattern": "{\"detail-type\":[\"AWS API Call via CloudTrail\"],\"detail\":{\"eventSource\":[\"ec2.amazonaws.com\"],\"eventName\":[\"StartInstances\",\"RunInstances\",\"RunScheduledInstances\"]}}", "Name": "Example-Lambda-Trigger", "Description": "Triggers lambda execution" } ], "topics": [ "arn:aws:sns:us-west-2:0123456789012:Example-Lambda-Topic" ] }
For both use cases, the object should be created if it does not exist, and permissions should be granted as necessary to allow invocation of the lambda by the calling service.
It would be nice if the lambda config could be extended to automatically register the Lambda with a SNS Topic, CloudWatch Event Rule, etc.
This would add two properties (
events
andtopics
) to the root JSON object, both of which should be lists:For both use cases, the object should be created if it does not exist, and permissions should be granted as necessary to allow invocation of the lambda by the calling service.