AWS-Lambda

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

7. Click the **Add** button.
8. Click **Save** in the upper right.
9. Upload your code and start using Perl in AWS Lambda!

You can get the layer ARN in your script by using `get_layer_info`.

    use AWS::Lambda;
    my $info = AWS::Lambda::get_layer_info_al2023(
        "5.38",      # Perl Version
        "us-east-1", # Region
        "x86_64",    # Architecture ("x86_64" or "arm64", optional, the default is "x86_64")
    );
    say $info->{runtime_arn};     # arn:aws:lambda:us-east-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:1
    say $info->{runtime_version}; # 1
    say $info->{paws_arn}         # arn:aws:lambda:us-east-1:445285296882:layer:perl-5-38-paws-al2023-x86_64:1
    say $info->{paws_version}     # 1,

Or, you can use following one-liner.

    perl -MAWS::Lambda -e 'AWS::Lambda::print_runtime_arn_al2023("5.38", "us-east-1")'
    perl -MAWS::Lambda -e 'AWS::Lambda::print_paws_arn_al2023("5.38", "us-east-1")'

author/perl-stripper/samconfig.toml  view on Meta::CPAN

version = 0.1
[default]
[default.package]
[default.package.parameters]
s3_bucket = "aws-sam-cli-managed-default-samclisourcebucket-10nboesix5it7"
s3_prefix = "perl-stripper"
region = "ap-northeast-1"
capabilities = "CAPABILITY_IAM"
image_repositories = []

[default.deploy]
[default.deploy.parameters]
stack_name = "perl-stripper"
s3_bucket = "aws-sam-cli-managed-default-samclisourcebucket-10nboesix5it7"
s3_prefix = "perl-stripper"
region = "ap-northeast-1"
capabilities = "CAPABILITY_IAM"
image_repositories = []

author/update-aws-lambda-al.pl  view on Meta::CPAN

AWS::Lambda::AL - AWS Lambda Custom Runtimes based on Amazon Linux

=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")'

author/update-aws-lambda-al2.pl  view on Meta::CPAN

AWS::Lambda::AL2 - AWS Lambda Custom Runtimes based on Amazon Linux 2

=head1 SYNOPSIS

You can get the layer ARN in your script by using C<get_layer_info>.

    use AWS::Lambda::AL2;
    my $info = AWS::Lambda::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::print_runtime_arn("@@LATEST_PERL@@", "us-east-1")'
    perl -MAWS::Lambda -e 'AWS::Lambda::print_paws_arn("@@LATEST_PERL@@", "us-east-1")'

author/update-aws-lambda-al2023.pl  view on Meta::CPAN

AWS::Lambda::AL2023 - AWS Lambda Custom Runtimes based on Amazon Linux 2023

=head1 SYNOPSIS

You can get the layer ARN in your script by using C<get_layer_info>.

    use AWS::Lambda::AL2023;
    my $info = AWS::Lambda::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::print_runtime_arn("@@LATEST_PERL@@", "us-east-1")'
    perl -MAWS::Lambda -e 'AWS::Lambda::print_paws_arn("@@LATEST_PERL@@", "us-east-1")'

examples/cgi/samconfig.toml  view on Meta::CPAN

version = 0.1
[author]
[author.deploy]
[author.deploy.parameters]
stack_name = "www-counter"
s3_bucket = "aws-sam-cli-managed-default-samclisourcebucket-10nboesix5it7"
s3_prefix = "www-counter"
region = "ap-northeast-1"
confirm_changeset = true
capabilities = "CAPABILITY_IAM"

lib/AWS/Lambda.pm  view on Meta::CPAN

Upload your code and start using Perl in AWS Lambda!

=back

You can get the layer ARN in your script by using C<get_layer_info>.

    use AWS::Lambda;
    my $info = AWS::Lambda::get_layer_info_al2023(
        "5.38",      # Perl Version
        "us-east-1", # Region
        "x86_64",    # Architecture ("x86_64" or "arm64", optional, the default is "x86_64")
    );
    say $info->{runtime_arn};     # arn:aws:lambda:us-east-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:1
    say $info->{runtime_version}; # 1
    say $info->{paws_arn}         # arn:aws:lambda:us-east-1:445285296882:layer:perl-5-38-paws-al2023-x86_64:1
    say $info->{paws_version}     # 1,

Or, you can use following one-liner.

    perl -MAWS::Lambda -e 'AWS::Lambda::print_runtime_arn_al2023("5.38", "us-east-1")'
    perl -MAWS::Lambda -e 'AWS::Lambda::print_paws_arn_al2023("5.38", "us-east-1")'

lib/AWS/Lambda/AL.pm  view on Meta::CPAN

AWS::Lambda::AL - AWS Lambda Custom Runtimes based on Amazon Linux

=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(
        "5.38",      # Perl Version
        "us-east-1", # Region
        "x86_64",    # Architecture ("x86_64" or "arm64", optional, the default is "x86_64")
    );
    say $info->{runtime_arn};     # arn:aws:lambda:us-east-1:445285296882:layer:perl-5-38-runtime:1
    say $info->{runtime_version}; # 1
    say $info->{paws_arn}         # arn:aws:lambda:us-east-1:445285296882:layer:perl-5-38-paws:1
    say $info->{paws_version}     # 1,

Or, you can use following one-liner.

    perl -MAWS::Lambda -e 'AWS::Lambda::AL::print_runtime_arn("5.38", "us-east-1")'
    perl -MAWS::Lambda -e 'AWS::Lambda::AL::print_paws_arn("5.38", "us-east-1")'

lib/AWS/Lambda/AL2.pm  view on Meta::CPAN

AWS::Lambda::AL2 - AWS Lambda Custom Runtimes based on Amazon Linux 2

=head1 SYNOPSIS

You can get the layer ARN in your script by using C<get_layer_info>.

    use AWS::Lambda::AL2;
    my $info = AWS::Lambda::get_layer_info(
        "5.42",      # Perl Version
        "us-east-1", # Region
        "x86_64",    # Architecture ("x86_64" or "arm64", optional, the default is "x86_64")
    );
    say $info->{runtime_arn};     # arn:aws:lambda:us-east-1:445285296882:layer:perl-5-42-runtime-al2-x86_64:2
    say $info->{runtime_version}; # 2
    say $info->{paws_arn}         # arn:aws:lambda:us-east-1:445285296882:layer:perl-5-42-paws-al2-x86_64:1
    say $info->{paws_version}     # 1,

Or, you can use following one-liner.

    perl -MAWS::Lambda -e 'AWS::Lambda::print_runtime_arn("5.42", "us-east-1")'
    perl -MAWS::Lambda -e 'AWS::Lambda::print_paws_arn("5.42", "us-east-1")'

lib/AWS/Lambda/AL2023.pm  view on Meta::CPAN

AWS::Lambda::AL2023 - AWS Lambda Custom Runtimes based on Amazon Linux 2023

=head1 SYNOPSIS

You can get the layer ARN in your script by using C<get_layer_info>.

    use AWS::Lambda::AL2023;
    my $info = AWS::Lambda::get_layer_info(
        "5.42",      # Perl Version
        "us-east-1", # Region
        "x86_64",    # Architecture ("x86_64" or "arm64", optional, the default is "x86_64")
    );
    say $info->{runtime_arn};     # arn:aws:lambda:us-east-1:445285296882:layer:perl-5-42-runtime-al2023-x86_64:2
    say $info->{runtime_version}; # 2
    say $info->{paws_arn}         # arn:aws:lambda:us-east-1:445285296882:layer:perl-5-42-paws-al2023-x86_64:1
    say $info->{paws_version}     # 1,

Or, you can use following one-liner.

    perl -MAWS::Lambda -e 'AWS::Lambda::print_runtime_arn("5.42", "us-east-1")'
    perl -MAWS::Lambda -e 'AWS::Lambda::print_paws_arn("5.42", "us-east-1")'

t/testdata/apigateway-v2-base64-request.json  view on Meta::CPAN

{
    "version": "2.0",
    "routeKey": "$default",
    "rawPath": "/my/path",
    "rawQueryString": "",
    "headers": {
        "accept": "*/*",
        "content-length": "17",
        "content-type": "application/octet-stream",
        "host": "xxxxxxxxxx.execute-api.ap-northeast-1.amazonaws.com",
        "user-agent": "curl/7.64.1",
        "x-amzn-trace-id": "Root=1-5e8a9b8c-5fd89a5053994a40c1343990",
        "x-forwarded-for":  "192.0.2.1",

t/testdata/apigateway-v2-base64-request.json  view on Meta::CPAN

        "domainName": "xxxxxxxxxx.execute-api.ap-northeast-1.amazonaws.com",
        "domainPrefix": "xxxxxxxxxx",
        "http": {
            "method": "POST",
            "path": "/my/path",
            "protocol": "HTTP/1.1",
            "sourceIp":  "192.0.2.1",
            "userAgent": "curl/7.64.1"
        },
        "requestId": "Ki0-ChyoNjMEMOA=",
        "routeKey": "$default",
        "stage": "$default",
        "time": "06/Apr/2020:03:01:32 +0000",
        "timeEpoch": 1586142092936
    },
    "body": "eyJoZWxsbyI6IndvcmxkIn0=",
    "isBase64Encoded": true
}

t/testdata/apigateway-v2-get-request.json  view on Meta::CPAN

{
    "version": "2.0",
    "routeKey": "$default",
    "rawPath": "/my/path",
    "rawQueryString": "parameter1=value1&parameter1=value2&parameter2=value",
    "headers": {
        "accept": "*/*",
        "content-length": "0",
        "header1": "value1,value2",
        "header2": "value2",
        "host": "xxxxxxxxxx.execute-api.ap-northeast-1.amazonaws.com",
        "user-agent": "curl/7.64.1",
        "x-amzn-trace-id": "Root=1-5e8a9a35-1d1dea5e28ab3c9c2a525afc",

t/testdata/apigateway-v2-get-request.json  view on Meta::CPAN

        "domainName": "xxxxxxxxxx.execute-api.ap-northeast-1.amazonaws.com",
        "domainPrefix": "xxxxxxxxxx",
        "http": {
            "method": "GET",
            "path": "/my/path",
            "protocol": "HTTP/1.1",
            "sourceIp": "192.0.2.1",
            "userAgent": "curl/7.64.1"
        },
        "requestId": "Ki0Ibj5EtjMEMJA=",
        "routeKey": "$default",
        "stage": "$default",
        "time": "06/Apr/2020:02:55:49 +0000",
        "timeEpoch": 1586141749893
    },
    "isBase64Encoded": false
}

t/testdata/apigateway-v2-post-request.json  view on Meta::CPAN

{
    "version": "2.0",
    "routeKey": "$default",
    "rawPath": "/my/path",
    "rawQueryString": "",
    "headers": {
        "accept": "*/*",
        "content-length": "17",
        "content-type": "application/json",
        "host": "xxxxxxxxxx.execute-api.ap-northeast-1.amazonaws.com",
        "user-agent": "curl/7.64.1",
        "x-amzn-trace-id": "Root=1-5e8a9af6-43dfdbb5896d7684515eb0ba",
        "x-forwarded-for": "192.0.2.1",

t/testdata/apigateway-v2-post-request.json  view on Meta::CPAN

        "domainName": "xxxxxxxxxx.execute-api.ap-northeast-1.amazonaws.com",
        "domainPrefix": "xxxxxxxxxx",
        "http": {
            "method": "POST",
            "path": "/my/path",
            "protocol": "HTTP/1.1",
            "sourceIp": "192.0.2.1",
            "userAgent": "curl/7.64.1"
        },
        "requestId": "Ki0mjgxItjMEJJg=",
        "routeKey": "$default",
        "stage": "$default",
        "time": "06/Apr/2020:02:59:02 +0000",
        "timeEpoch": 1586141942637
    },
    "body": "{\"hello\":\"こんにちは世界\"}",
    "isBase64Encoded": false
}

t/testdata/function-urls-get-request.json  view on Meta::CPAN

        "domainName": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.lambda-url.ap-northeast-1.on.aws",
        "domainPrefix": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "http": {
            "method": "GET",
            "path": "/foo /bar",
            "protocol": "HTTP/1.1",
            "sourceIp": "192.0.2.1",
            "userAgent": "curl/7.79.1"
        },
        "requestId": "7866ba5e-bbcb-42cc-9e26-11f5b18a7c0b",
        "routeKey": "$default",
        "stage": "$default",
        "time": "14/Apr/2022:01:08:10 +0000",
        "timeEpoch": 1649898490097
    },
    "routeKey": "$default",
    "version": "2.0"
}

t/testdata/function-urls-post-base64-request.json  view on Meta::CPAN

        "domainName": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.lambda-url.ap-northeast-1.on.aws",
        "domainPrefix": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "http": {
            "method": "POST",
            "path": "/my/path",
            "protocol": "HTTP/1.1",
            "sourceIp": "192.0.2.1",
            "userAgent": "curl/7.79.1"
        },
        "requestId": "22d6f51d-23e9-4c93-8f6a-0215eb2e8a5e",
        "routeKey": "$default",
        "stage": "$default",
        "time": "14/Apr/2022:01:21:06 +0000",
        "timeEpoch": 1649899266100
    },
    "routeKey": "$default",
    "version": "2.0"
}

t/testdata/function-urls-post-request.json  view on Meta::CPAN

        "domainName": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.lambda-url.ap-northeast-1.on.aws",
        "domainPrefix": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "http": {
            "method": "POST",
            "path": "/my/path",
            "protocol": "HTTP/1.1",
            "sourceIp": "192.0.2.1",
            "userAgent": "curl/7.79.1"
        },
        "requestId": "1bdb4bdc-7de3-4b47-b991-24bf146bed2f",
        "routeKey": "$default",
        "stage": "$default",
        "time": "14/Apr/2022:01:18:59 +0000",
        "timeEpoch": 1649899139915
    },
    "routeKey": "$default",
    "version": "2.0"
}



( run in 0.481 second using v1.01-cache-2.11-cpan-0a6323c29d9 )