- AWS Code Sample


To run this Java (SDK V2) code example, ensure that you have set up your development environment, including your credentials. For more information, see AWS SDK for Java 2.x Developer Guide.

#!/bin/bash if [[ -z $* ]] ; then echo 'Supply the name of one of the example classes as an argument.' echo 'If there are arguments to the class, put them in quotes after the class name.' exit 1 fi export CLASSPATH=target/sdk-cloudwatch-examples-1.0.jar export className=$1 echo "## Running $className..." shift echo "## arguments $@..." mvn exec:java -Dexec.mainClass="com.example.cloudwatch.$className" -Dexec.args="$@"