NAME

AWS::Lambda::PSGI - It translates enevt of Lambda Proxy Integrations in API Gateway and Application Load Balancer into PSGI.

SYNOPSIS

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

DESCRIPTION

Request ID

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

LICENSE

The MIT License (MIT)

Copyright (C) ICHINOSE Shogo.

AUTHOR

ICHINOSE Shogo <shogo82148@gmail.com>