AWS-Lambda-Quick

 view release on metacpan or  search on metacpan

CONTRIBUTING.md  view on Meta::CPAN

# CONTRIBUTING

Thank you for considering contributing to this distribution. This file
contains instructions that will help you work with the source code.

Please note that if you have any questions or difficulties, you can reach the
maintainer(s) through the bug queue described later in this document
(preferred), or by emailing the releaser directly. You are not required to
follow any of the steps in this document to submit a patch or bug report;
these are recommendations, intended to help you (and help us help you faster).


The distribution is managed with
[Dist::Zilla](https://metacpan.org/release/Dist-Zilla).

However, you can still compile and test the code with the `Makefile.PL` or
`Build.PL` in the repository:

LICENSE  view on Meta::CPAN

    Holder, and derivatives of that collection of files created through
    textual modification. 
  - "Standard Version" refers to such a Package if it has not been modified,
    or has been modified in accordance with the wishes of the Copyright
    Holder. 
  - "Copyright Holder" is whoever is named in the copyright or copyrights for
    the package. 
  - "You" is you, if you're thinking about copying or distributing this Package.
  - "Reasonable copying fee" is whatever you can justify on the basis of media
    cost, duplication charges, time of people involved, and so on. (You will
    not be required to justify it to the Copyright Holder, but only to the
    computing community at large as a market that must bear the fee.) 
  - "Freely Available" means that no fee is charged for the item itself, though
    there may be fees involved in handling the item. It also means that
    recipients of the item may redistribute it under the same conditions they
    received it. 

1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.

README.md  view on Meta::CPAN


Once all the above is done the module finally deploys the code
so it's web accessible.

By default this is to the `quick`, though you can reconfigure that
with the `stage_name` parameter.

## Parameters

This is a full list of parameters you can currently configure.  Only
one parameter - `name` - is required and all other parameters are
optional and will have hopefully sensible defaults.

It is not the intent of the author to provide a complete and exhaustive
list of all possibilities - you have the power of the AWS Management
console and AWS API to make any further tweaks you may desire.

- name

    The name of the Lambda function.  Required.

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


Once all the above is done the module finally deploys the code
so it's web accessible.

By default this is to the C<quick>, though you can reconfigure that
with the C<stage_name> parameter.

=head2 Parameters

This is a full list of parameters you can currently configure.  Only
one parameter - C<name> - is required and all other parameters are
optional and will have hopefully sensible defaults.

It is not the intent of the author to provide a complete and exhaustive
list of all possibilities - you have the power of the AWS Management
console and AWS API to make any further tweaks you may desire.

=over

=item name

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

package AWS::Lambda::Quick::CreateZip;
use Mo qw( default required );

our $VERSION = '1.0002';

use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
use Path::Tiny qw( path );

has src_filename => required => 1;
has zip_filename => required => 1;

has extra_files => default => [];

has _src_path => sub { path( shift->src_filename ) };
has _src_dir  => sub { shift->_src_path->parent };
has _zip_class  => default => 'Archive::Zip';
has _zip        => sub { shift->_zip_class->new };
has _script_src => sub { shift->_src_path->slurp_raw };

# this is the same src as in script src but the first occurance of

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

package AWS::Lambda::Quick::Processor;
use Mo qw( default required );

our $VERSION = '1.0002';

use AWS::Lambda::Quick::CreateZip ();
use AWS::Lambda::Quick::Upload    ();
use File::Temp qw( tempdir );
use Path::Tiny qw( path );

has name         => required => 1;
has src_filename => required => 1;

has 'description';
has 'extra_files';
has 'extra_layers';
has 'memory_size';
has 'region';
has 'stage_name';
has 'timeout';

has _tempdir => sub {

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

package AWS::Lambda::Quick::Upload;
use Mo qw( default required );

our $VERSION = '1.0002';

use AWS::CLIWrapper;
use JSON::PP ();

### required attributes

has zip_filename => required => 1;
has name         => required => 1;

### optional attributes wrt the lambda function itself

has extra_layers => default => [];
has region       => default => 'us-east-1';
has memory_size  => default => 128;           # this is the AWS default
has timeout      => default => 3;             # this is the AWS default
has description => default => 'A Perl AWS::Lambda::Quick Lambda function.';
has stage_name  => default => 'quick';

t/00-report-prereqs.t  view on Meta::CPAN


            my $file = $mod;
            $file =~ s{::}{/}g;
            $file .= ".pm";
            my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC;

            my $want = $req_hash->{$phase}{$type}{$mod};
            $want = "undef" unless defined $want;
            $want = "any" if !$want && $want == 0;

            my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required";

            if ($prefix) {
                my $have = MM->parse_version( File::Spec->catfile($prefix, $file) );
                $have = "undef" unless defined $have;
                push @reports, [$mod, $want, $have];

                if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) {
                    if ( $have !~ /\A$lax_version_re\z/ ) {
                        push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)";
                    }
                    elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) {
                        push @dep_errors, "$mod version '$have' is not in required range '$want'";
                    }
                }
            }
            else {
                push @reports, [$mod, $want, "missing"];

                if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) {
                    push @dep_errors, "$mod is not installed ($req_string)";
                }
            }

xt/author/portability.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More;

eval 'use Test::Portability::Files';
plan skip_all => 'Test::Portability::Files required for testing portability'
    if $@;

run_tests();



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