App-Perlambda

 view release on metacpan or  search on metacpan

lib/App/Perlambda/CLI/Create.pm  view on Meta::CPAN

    my $res = $aws->lambda("create-function" => $lambda_opt);
    unless ($res) {
        die sprintf("%s:%s\n", $AWS::CLIWrapper::Error->{Code}, $AWS::CLIWrapper::Error->{Message});
    }
}

1;

__END__

=encoding utf8

=head1 NAME

App::Perlambda::CLI::Create - Create a Lambda function on AWS with perl layer

=head1 SYNOPSIS

    $ perlambda create --region=<AWS region> \
                       --aws_account=<your AWS account> \
                       --iam_role=<your IAM role> \
                       --layer_version=<version of the layer> \
                       --func_name=<your func name> \
                       --handler=<your handler name> \
                       --zip=<func zip file>

=head1 DESCRIPTION

This command creates a new Lambda function on AWS with perl layer.

This command uses L<AWS::CLIWrapper> so it requires C<aws> command is on your PATH. For more information, please see: L<https://aws.amazon.com/cli/>

=head1 COMMANDLINE OPTIONS

=head2 C<--region> (B<Mandatory>)

AWS region for deployment environment.

=head2 C<--aws_account> (B<Mandatory>)

AWS account ID.

=head2 C<--iam_role> (B<Mandatory>)

The Amazon Resource Name (ARN) of the function's execution role.

=head2 C<--layer_version> (B<Mandatory>)

The version of Lambda Perl layer.

=head2 C<--func_name> (B<Mandatory>)

The name of the Lambda function.

=head2 C<--handler> (B<Mandatory>)

The name of the method within your code that Lambda calls to execute your function.

=head2 C<--zip> (B<Mandatory>)

The path to the zip file of the code you are uploading.

=head2 C<--profile> (B<Optional>)

B<Default>: your system default

Your AWS profile.

=head2 C<--perl_version> (B<Optional>)

B<Default>: version of running perl

The version of perl runtime. You have to specify this parameter as C<5_xx> (e.g. C<5_26> and C<5.28>).

=head1 REQUIREMENTS

=over 4

=item * Perl 5.26 or later

=item * L<awscli|https://aws.amazon.com/cli/>

=back

=head1 LICENSE

Copyright (C) moznion.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=head1 AUTHOR

moznion E<lt>moznion@gmail.comE<gt>

=cut



( run in 1.066 second using v1.01-cache-2.11-cpan-b16cb0d3907 )