Skip to content

Instantly share code, notes, and snippets.

@mikebroberts
Created November 1, 2017 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikebroberts/840e70934465006a41813bbf61216f9b to your computer and use it in GitHub Desktop.
Save mikebroberts/840e70934465006a41813bbf61216f9b to your computer and use it in GitHub Desktop.
public int containerExecutionCount = 0;
public void handler(Map<String, List<S3PutRecord>> input) {
final String key = input.get("Records").get(0).s3.object.key;
System.out.println("S3 PUT happened! Key was: " + key);
throw new RuntimeException("Throwing exception. This container has processed " + ++containerExecutionCount + " events");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment