request.setDescription("Auto deployment on " + friendlyDateFormat.format(new Date()));
request.setSourceBundle(new S3Location(bucketName, warName));
request.setAutoCreateApplication(true);
try {
CreateApplicationVersionResult result = beanstalk.createApplicationVersion(request);
log.info("Version " + result.getApplicationVersion().getVersionLabel() + " has been created.");
log.info("Version details: " + result.getApplicationVersion());
} catch (AmazonServiceException exA) {
log.info("AmazonServiceException! Now logging details: Error Code: " + exA.getErrorCode() + "; Error Type: " + exA.getErrorType() + "; Message: " + exA.getMessage());
System.exit(1);
} catch (AmazonClientException exB) {
log.info("AmazonClientException! Now logging details: Error Message: " + exB.getMessage());