Simple AWS Lambda function that wraps the popular python library, NumPy.
The AWS Lambda function event expects an JSON dictionary with two entries: 'method' and 'arguments'.
- method - String - The name of the NumPy method to invoke
- arguments - Array - An ordered array of arguments to pass to the method.
{
"method": "some_method",
"arguments": [
1,
2,
3
]
}The return JSON dictionary will contain a single entry: 'result' holding the result of the computation. If an error occurs, the function will return the AWS Lambda error object.
{
"result": 123.456
}Computing future value
{
"method": "fv",
"arguments": [
0.004166666666666666,
120,
-100,
-100
]
}Computing the net present value of a cash flow series.
{
"method": "npv",
"arguments": [
0.281,
[
-100,
39,
59,
55,
20
]
]
}