AWS::Lambda::PSGI - It translates enevt of Lambda Proxy Integrations in API Gateway and Application Load Balancer into PSGI.
Add the following script into your Lambda code archive.
use utf8; use warnings; use strict; use AWS::Lambda::PSGI; my $app = require "$ENV{'LAMBDA_TASK_ROOT'}/app.psgi"; my $func = AWS::Lambda::PSGI->wrap($app); sub handle { return $func->(@_); } 1;
And then, Set up Lambda Proxy Integrations in API Gateway or Lambda Functions as ALB Targets
AWS::Lambda::PSGI injects the request id that compatible with Plack::Middleware::RequestId.
env->{'psgix.request_id'} # It is same value with $context->aws_request_id
The MIT License (MIT)
Copyright (C) Ichinose Shogo.
Ichinose Shogo <shogo82148@gmail.com>
To install AWS::Lambda, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AWS::Lambda
CPAN shell
perl -MCPAN -e shell install AWS::Lambda
For more information on module installation, please visit the detailed CPAN module installation guide.