title: How do I run Cucumber Runner from AWS Lambda Handler
body: <p>I am trying to run Cucumber runner class using Selenium Webdriver in AWS Lambda.  So far I have been able to run selenium in the AWS handler function, but how do I call the Cucumber Runner from my handleRequest so I can run the tests in Lambda?</p>
  
  <p>Here is Snippet of my code:</p>
  
  <pre><code>// following class is entry point for AWS, I need to call Cucumber runner from this function.
  public class **LambdaFunctionHandler** implements RequestHandler&lt;Object, String&gt; {
  
      private AmazonS3 s3 = AmazonS3ClientBuilder.standard().build();
  
      @Override
      public String handleRequest(Object input, Context context) {        
          context.getLogger().log("Input: " + input);
          try {
  
              runner();  // how do I call my Cucumber Runner Class to execute my tests?
  
          catch (Exception e) {
              e.printStackTrace(System.out);
              context.getLogger().log(e.getMessage());
          }
  
          return "request done";
      }
  
  The following is the runner class
  package runner;
  
  import cucumber.api.CucumberOptions;
  
  import cucumber.api.junit.Cucumber;
  
  import org.junit.runner.RunWith;
  
  @RunWith(Cucumber.class)
  
  @CucumberOptions(
          features = "src\\test\\resources\\features"
          ,glue={"com.smallcomp.abc.steps"}
          ,format = {"json:target/cucumber.json","html:target/cucumber-pretty"}
          ,dryRun = false
          ,tags = {"@smoke"}
  )
  
  
  public class runner {
  
  }
  </code></pre>