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

[request] Handlers for AWS Lambda #276

Open
dfduarte opened this issue Feb 20, 2017 · 0 comments
Open

[request] Handlers for AWS Lambda #276

dfduarte opened this issue Feb 20, 2017 · 0 comments

Comments

@dfduarte
Copy link

dfduarte commented Feb 20, 2017

Cookbook version

N/A

Chef-client version

Any

Platform Details

Any

Scenario:

So, would be good to have a Coobook to handle AWS Lambda calls, and use its results to make something.

For example: Here in my company we have a Lambda function with gathers the ENI's Private IP of ENIs with a specific tag, and return them in a output JSON. The idea is take this result inside JSON and use something during the converging process.

In CLI, the invoke function in CLI is more or less like this:

aws lambda invoke --invocation-type RequestResponse --function-name arn:aws:lambda:us-east-1:xxxxxxxxxxxxxxxxxxx:function:eniip-parser --region us-east-1 --log-type None --payload '{"Purpose": "pdns", "Region" :"us-east-1", "KOD": "test", "VpcId": "vpc-xxxxxxx", "account_id": "xxxxxxxxxxxxxxxx"}' outputfile.out

And the output file contains a return payload like:

{"PdnsEniIps": ["10.147.8.244", "10.147.0.92", "10.147.18.42"]}

I know Lambda is bigger than just a parser which returns something and maybe my request couldn't be feasible, but it would be cool for these situations. If it's impossible, np... I'll try to find a way using Seahorse or AWS CLI here =).

Steps to Reproduce:

Run cookbook
Get any results
Parse it

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