AWS-Lambda-Quick

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

1.0002 2019-12-15

- FEATURE: Create greedy proxy URLs for Lambda functions

1.0001 (internal release)

- BUGFIX: Fix accidental line deletion (oops)
- BUGFIX: Use the correct prebuilt public lambda layer in me-south-1
- FEATURE: Add support for extra layers

1.0000   2019-12-14

- Initial release

README.md  view on Meta::CPAN


Each Lambda function we create gets its own method, which is where
AWS specifies what HTTP method it accepts (`GET`,`POST`,`PUT`,
etc.) and how it decides who can access it.

This module always sets the type of method to `ANY` (i.e. we always
call the lambda function and let it figure out what it wants to accept
or not.)

We setup the `NONE` authentication, meaning anyone can call the API
over the internet - i.e. it's configured as a public API.

### Create a new integration

Integrations are how AWS decides both where a request is routed to
and what extracted from that HTTP request is passed on and how.

We configure an AWS\_PROXY integration routing to our new Lambda
function.  This essentially means everything is passed "as is"
through to our handler as the first argument.

README.md  view on Meta::CPAN


    The name we stage to.  By default this is `quick` meaning that
    our live URL will be of the form:

        https://????.execute-api.????.amazonaws.com/quick/????

    By setting stage\_name to another value you can change this.

- extra\_layers

    An arrayref of extra layers (in addition to the standard prebuilt public
    Lambda layer for Perl) that will be used by this Lambda function.

    Currently AWS Lamda supports up to four extra layers (five in total
    including the prebuilt public layer for Perl.)  All layers, when
    decompressed, must be less that 250MB in size.

    You may either identify a layer by its ARN, or by using a identifying
    name that is known to this module.  At this time the only known
    identifying name is `paws` which indicates that the Lambda function
    should use the prebuilt Paws layer in the same region as the Lambda
    function.

        use AWS::Lambda::Quick (
            name => 'email sender',

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


Each Lambda function we create gets its own method, which is where
AWS specifies what HTTP method it accepts (C<GET>,C<POST>,C<PUT>,
etc.) and how it decides who can access it.

This module always sets the type of method to C<ANY> (i.e. we always
call the lambda function and let it figure out what it wants to accept
or not.)

We setup the C<NONE> authentication, meaning anyone can call the API
over the internet - i.e. it's configured as a public API.

=head3 Create a new integration

Integrations are how AWS decides both where a request is routed to
and what extracted from that HTTP request is passed on and how.

We configure an AWS_PROXY integration routing to our new Lambda
function.  This essentially means everything is passed "as is"
through to our handler as the first argument.

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


The name we stage to.  By default this is C<quick> meaning that
our live URL will be of the form:

    https://????.execute-api.????.amazonaws.com/quick/????

By setting stage_name to another value you can change this.

=item extra_layers

An arrayref of extra layers (in addition to the standard prebuilt public
Lambda layer for Perl) that will be used by this Lambda function.

Currently AWS Lamda supports up to four extra layers (five in total
including the prebuilt public layer for Perl.)  All layers, when
decompressed, must be less that 250MB in size.

You may either identify a layer by its ARN, or by using a identifying
name that is known to this module.  At this time the only known
identifying name is C<paws> which indicates that the Lambda function
should use the prebuilt Paws layer in the same region as the Lambda
function.

    use AWS::Lambda::Quick (
        name => 'email sender',



( run in 0.377 second using v1.01-cache-2.11-cpan-64827b87656 )