Helping debugging s3 pluging with 2.4 / intellij

Thanks for those details. They make sense. I am almost there. However, when I try to attach Intellij I get Unable to open debugger port (localhost:5005) java.net.ConnectionException. "Connection Refused"

Also, I got a JVM warning about the plugin permissions. Here's what I see when I execute the code you provided.

Trying file:/Users/sam/dev/elasticsearch/plugins/cloud-aws/target/releases/cloud-aws-2.4.5-SNAPSHOT.zip ...
Downloading ................................................................DONE
Verifying file:/Users/sam/dev/elasticsearch/plugins/cloud-aws/target/releases/cloud-aws-2.4.5-SNAPSHOT.zip checksums if available ...
NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission getClassLoader
* java.lang.reflect.ReflectPermission suppressAccessChecks
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.

Continue with installation? [y/N]y
Installed cloud-aws into /Users/sam/elasticsearch/elasticsearch-2.4.5-SNAPSHOT/plugins/cloud-aws
sam@wintermute ~/dev/elasticsearch (FED-1221_make_S3_backup_Plugin_use_KMS) 
 > ES_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" ~/elasticsearch/elasticsearch-2.4.5-SNAPSHOT/bin/elasticsearch
Listening for transport dt_socket at address: 5005
[2017-04-25 15:39:15,702][INFO ][node                     ] [Onslaught] version[2.4.5-SNAPSHOT], pid[22814], build[4bda225/2017-04-25T19:30:44Z]
[2017-04-25 15:39:15,703][INFO ][node                     ] [Onslaught] initializing ...
[2017-04-25 15:39:16,387][INFO ][plugins                  ] [Onslaught] modules [reindex, lang-expression, lang-groovy], plugins [cloud-aws], sites []
[2017-04-25 15:39:16,452][INFO ][env                      ] [Onslaught] using [1] data paths, mounts [[/ (/dev/disk1)]], net usable_space [61.6gb], net total_space [930.5gb], spins? [unknown], types [hfs]
[2017-04-25 15:39:16,453][INFO ][env                      ] [Onslaught] heap size [989.8mb], compressed ordinary object pointers [true]
[2017-04-25 15:39:16,453][WARN ][env                      ] [Onslaught] max file descriptors [10240] for elasticsearch process likely too low, consider increasing to at least [65536]
[2017-04-25 15:39:18,279][INFO ][node                     ] [Onslaught] initialized
[2017-04-25 15:39:18,279][INFO ][node                     ] [Onslaught] starting ...

Thanks again. I really appreciate it.