AWS-Lambda
view release on metacpan or search on metacpan
author/update-aws-lambda-al.pl view on Meta::CPAN
print $fh "# This list is auto generated by authors/update-aws-lambda-al.pl; DO NOT EDIT\n";
print $fh "our \$LAYERS = {\n";
for my $version (@$versions) {
print $fh " '$version' => {\n";
for my $region (@{$regions->{x86_64}}) {
next unless $layers->{$version}{$region}{runtime_arn};
print $fh <<EOS
'$region' => {
runtime_arn => "$layers->{$version}{$region}{runtime_arn}",
runtime_version => $layers->{$version}{$region}{runtime_version},
paws_arn => "$layers->{$version}{$region}{paws_arn}",
paws_version => $layers->{$version}{$region}{paws_version},
},
EOS
}
print $fh " },\n";
}
print $fh "};\n\n";
printfh(<<'EOS');
sub get_layer_info {
my ($version, $region) = @_;
return $LAYERS->{$version}{$region};
}
sub print_runtime_arn {
my ($version, $region) = @_;
print $LAYERS->{$version}{$region}{runtime_arn};
}
sub print_paws_arn {
my ($version, $region) = @_;
print $LAYERS->{$version}{$region}{paws_arn};
}
1;
__END__
=encoding utf-8
=head1 NAME
AWS::Lambda::AL - AWS Lambda Custom Runtimes based on Amazon Linux
=head1 NO LONGER MAINTAINED
These layers are only for backward compatibility.
We recommend to migrate to Amazon Linux 2023.
These layers are NO LONGER MAINTAINED and WILL NOT RECEIVE ANY UPDATES.
=head1 SYNOPSIS
You can get the layer ARN in your script by using C<get_layer_info>.
use AWS::Lambda::AL;
my $info = AWS::Lambda::AL::get_layer_info(
"@@LATEST_PERL@@", # Perl Version
"us-east-1", # Region
"x86_64", # Architecture ("x86_64" or "arm64", optional, the default is "x86_64")
);
say $info->{runtime_arn}; # @@LATEST_RUNTIME_ARN@@
say $info->{runtime_version}; # @@LATEST_RUNTIME_VERSION@@
say $info->{paws_arn} # @@LATEST_PAWS_ARN@@
say $info->{paws_version} # @@LATEST_PAWS_VERSION@@,
Or, you can use following one-liner.
perl -MAWS::Lambda -e 'AWS::Lambda::AL::print_runtime_arn("@@LATEST_PERL@@", "us-east-1")'
perl -MAWS::Lambda -e 'AWS::Lambda::AL::print_paws_arn("@@LATEST_PERL@@", "us-east-1")'
The list of all available layer ARN is:
=over
EOS
for my $version (@$versions) {
print $fh "=item Perl $version\n\n=over\n\n";
for my $region (@{$regions->{x86_64}}) {
next unless $layers->{$version}{$region}{runtime_arn};
print $fh "=item C<$layers->{$version}{$region}{runtime_arn}>\n\n";
}
print $fh "=back\n\n";
}
printfh(<<'EOS');
=back
And Paws layers:
=over
EOS
for my $version (@$versions) {
print $fh "=item Perl $version\n\n=over\n\n";
for my $region (@{$regions->{x86_64}}) {
next unless $layers->{$version}{$region}{paws_arn};
print $fh "=item C<$layers->{$version}{$region}{paws_arn}>\n\n";
}
print $fh "=back\n\n";
}
printfh(<<'EOS');
=back
=head2 Pre-built Zip Archives for Amazon Linux
URLs of zip archives are:
C<https://shogo82148-lambda-perl-runtime-$REGION.s3.amazonaws.com/perl-$VERSION-runtime.zip>
And Paws:
C<https://shogo82148-lambda-perl-runtime-$REGION.s3.amazonaws.com/perl-$VERSION-paws.zip>
=head2 Pre-installed modules
The following modules are pre-installed for convenience.
( run in 1.435 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )