AWS::Lambda::Bootstrap - It's the bootrap script for AWS Lambda Custom Runtime.
Save the following script as bootstrap, and then zip it with your perl script. Now, you can start using Perl in AWS Lambda!
bootstrap
#!perl use strict; use warnings; use utf8; use AWS::Lambda::Bootstrap; bootstrap(@ARGV);
Prebuild Perl Runtime Layer includes the bootstrap script. So, if you use the Layer, no need to include the bootstrap script into your zip. See AWS::Lambda for more details.
The format of the handler is following.
sub handle { my ($payload, $context) = @_; # handle the event here. my $result = {}; return $result; }
$context is an instance of AWS::Lambda::Context.
$context
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.