diff --git a/README.md b/README.md
index c9733bb..8cece37 100644
--- a/README.md
+++ b/README.md
@@ -60,7 +60,7 @@ Simply add the following dependency to your `pom.xml` file:
cloud.localstack
localstack-utils
- 0.2.13
+ 0.2.14
```
@@ -108,6 +108,7 @@ make build
## Change Log
+* v0.2.14: Add ability to get handler class name through `_HANDLER` environment variable like on real **AWS Lambda** platform and **Lambci** environment
* v0.2.11: Enable specification of "platform" when configuring container
* v0.2.10: Add Lambda async utils for AWS SDK v2; add support for specifying bind mounts and init scripts via `@LocalstackDockerProperties`; add PowerMock integration for easy patching of AWS SDK to use local endpoints; add support for configuring the Docker image name via `@LocalstackDockerProperties`; add tests for templated emails
* v0.2.8: Allow overwriting the port binding via environment variables
diff --git a/pom.xml b/pom.xml
index 1a74bd1..00b9667 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
cloud.localstack
localstack-utils
jar
- 0.2.13
+ 0.2.14
localstack-utils
Java utilities for the LocalStack platform.
diff --git a/src/main/java/cloud/localstack/LambdaExecutor.java b/src/main/java/cloud/localstack/LambdaExecutor.java
index ba3ca32..9603c24 100644
--- a/src/main/java/cloud/localstack/LambdaExecutor.java
+++ b/src/main/java/cloud/localstack/LambdaExecutor.java
@@ -41,13 +41,13 @@ public class LambdaExecutor {
@SuppressWarnings("unchecked")
public static void main(String[] args) throws Exception {
- if(args.length < 2) {
+ if (args.length != 1 && args.length != 2) {
System.err.println("Usage: java " + LambdaExecutor.class.getSimpleName() +
- " ");
+ " [] ");
System.exit(1);
}
- String fileContent = readFile(args[1]);
+ String fileContent = args.length == 1 ? readFile(args[0]) : readFile(args[1]);
ObjectMapper reader = new ObjectMapper();
reader.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);
reader.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
@@ -56,7 +56,17 @@ public static void main(String[] args) throws Exception {
List