-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature/aws improvements #336
Conversation
…nd easy to update
Lambda node by default uses "invoke" instead of S3. Includes handler improvements to consolidate the "pipeline" data model that is passed amongst the various triggers. Data is passed back and forth via netcdf. API Gateway and S3 triggers still needs testing. In the future, I think we should deprecate the "eval_s3" and "eval_api" methods since these are no longer relevant. We should keep the ability to add extra triggers for S3 and APIGateway since there may be other use cases that need this, but the PODPAC only evaluation will be done through invoke.
@@ -173,6 +181,13 @@ def _function_name_default(self): | |||
|
|||
return settings["FUNCTION_NAME"] | |||
|
|||
@tl.default("function_triggers") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mlshapiro This block seems to indicate I must set function_eval_trigger
to 'APIGateway' in order to build the api gateway. More generally, it is not obvious to me how to specify that I want optional resources built (e.g. API Gateway).
dist/aws/handler.py
Outdated
|
||
pipeline = default_pipeline() | ||
pipeline["url"] = event["queryStringParameters"] | ||
pipeline["params"] = urllib.parse_qs(urllib.urlparse(pipeline["url"]).query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually don't need to do any URL parsing, because event['queryStringParameters']
is a dict with all of the params already parsed.
|
||
url = event["queryStringParameters"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like it was in the porting of this block that we lost the isinstance check.
The `queryStringParameters` are already a dict, so they don't need parsed with `urllib`. This also merges any settings passed in the event with the default pipeline, then again with the settings on the AWS instance.
function_restrict_pipelines
. This uses an environment variable (PODPAC_RESTRICT_PIPELINES
) in the lambda function to store the hashes of acceptable Nodes. The handler checks to see if the node hash is in the environment variable and raises a ValueError if not.API Gateway and S3 triggers still needs testing. Handler may need to be updated for these as well.
In the future, I think we should deprecate the "eval_s3" and "eval_api" methods on the Lambda node since these are no longer relevant. We should keep the ability to add extra triggers for S3 and APIGateway since there are other use cases that need these.
To Do:
response["LogResult"]
to get the "REPORT" which contains billing informationrequests
library.