Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define standards for non-Amazon API Gateway modules #11

Open
binoculars opened this issue Oct 2, 2015 · 6 comments
Open

Define standards for non-Amazon API Gateway modules #11

binoculars opened this issue Oct 2, 2015 · 6 comments

Comments

@binoculars
Copy link
Contributor

Some Lambda functions are useful while only being triggered from S3 events, DynamoDB streams, SNS, etc. Having tooling around these would be extremely valuable.

Since there are (Edit: no limited) CloudFormation options for hooking up events to Lambda functions, we'll have to build that in.

@austencollins
Copy link
Member

👍 We'll tackle this after Re:invent. They will be announcing some Lambda versioning updates that we want to support that might also not be supported by CF.

@dekz
Copy link

dekz commented Oct 6, 2015

This seems to have been added recently: AWS::Lambda::EventSourceMapping

Though it only supports Kinesis and DynamoDB 👎

@binoculars
Copy link
Contributor Author

@dekz Thanks for sharing that! Hopefully soon on S3 and SNS. Kind of odd since S3 Events were the initial use case for Lambda.

@dekz
Copy link

dekz commented Oct 8, 2015

I think we're going to have to continue to fake it till they make it.

"lambda": {
    "enVars": [],
    "package": {},
    "excludePatterns": {},
    "cloudFormation": {
        "Description": "",
        "MemorySize": 1024,
        "Runtime": "nodejs",
        "Timeout": 6
    }
},
"apiGateway": {
     "cloudFormation": {}
+},
+"eventSource": [
+  "apiGateway1": {
+   "type": "apiGateway",
+    "properties": {}
+   // Must use cli
+  },
+  "kinesisAbcd": {
+   "type": "kinesis",
+    "properties": {
+      "arn": "abcd:dev:stage:123"
+    }
+    // Can use AWS::Lambda::EventSourceMapping
+  },
+]
+}

Right now each lambda has a shared role, do we need to think about fine grain control on IAM roles for each lambda? So Lambda1 has restricted access to Kinesis, Lambda2 can read.

@binoculars
Copy link
Contributor Author

@dekz I would think we'd want to support both shared roles and 1:1 roles.

@binoculars
Copy link
Contributor Author

It appears that the Event Source can now be configured from the S3 side with Amazon Simple Storage Service NotificationConfiguration LambdaConfigurations. Likewise, in SNS, the Amazon SNS Subscription Property Type takes

{
   "Endpoint" : "arn:aws:lambda:region:account-id:function:function-name",
   "Protocol" : "lambda"
}

Still need to come up with a canonical way to specify it in AWS Modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants