Skip to content

_HANDLER is not documented in the README #42

Open
@yegor256

Description

@yegor256

After upgrade from 2.0.0 to 3.0.0, I'm getting this:


$ bundle exec aws_lambda_ric main.go
--
Init error when loading handler
{
"errorMessage": "Invalid handler [], must be of form FILENAME.METHOD or FILENAME.CLASS.METHOD where FILENAME corresponds with an existing Ruby source file FILENAME.rb, CLASS is an optional module/class namespace and METHOD is a callable method. If using CLASS, METHOD must be a class-level method.",
"errorType": "Init<ArgumentError>",
"stackTrace": [
"/usr/local/bundle/gems/aws_lambda_ric-3.0.0/lib/aws_lambda_ric/lambda_handler.rb:16:in 'LambdaHandler#initialize'",
"/usr/local/bundle/gems/aws_lambda_ric-3.0.0/lib/aws_lambda_ric.rb:45:in 'Class#new'",
"/usr/local/bundle/gems/aws_lambda_ric-3.0.0/lib/aws_lambda_ric.rb:45:in 'AwsLambdaRIC::LambdaRunner#run'",
"/usr/local/bundle/gems/aws_lambda_ric-3.0.0/lib/aws_lambda_ric.rb:219:in 'AwsLambdaRIC::Bootstrap#bootstrap_handler'",
"/usr/local/bundle/gems/aws_lambda_ric-3.0.0/lib/aws_lambda_ric.rb:201:in 'AwsLambdaRIC::Bootstrap#start'",
"/usr/local/bundle/gems/aws_lambda_ric-3.0.0/bin/aws_lambda_ric:9:in '<top (required)>'",
"/usr/local/bundle/bin/aws_lambda_ric:25:in 'Kernel#load'",
"/usr/local/bundle/bin/aws_lambda_ric:25:in '<top (required)>'",
"/usr/local/lib/ruby/3.4.0/bundler/cli/exec.rb:59:in 'Kernel.load'",
"/usr/local/lib/ruby/3.4.0/bundler/cli/exec.rb:59:in 'Bundler::CLI::Exec#kernel_load'",
"/usr/local/lib/ruby/3.4.0/bundler/cli/exec.rb:23:in 'Bundler::CLI::Exec#run'",
"/usr/local/lib/ruby/3.4.0/bundler/cli.rb:452:in 'Bundler::CLI#exec'",

It seems that in 3.0.0 I should call it like this:

$ _HANDLER=main.go bundle exec aws_lambda_ric

Maybe the README should be updated?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      close