title: Unable to load AWS credentials from any provider in the chain after upgrading to tomcat 8.5
body: <p>Our legacy java web application runs on aws elastic beanstalk, which assumes IAM role to access SES. Today after upgrading elastic beanstalk environment from Tomcat 7 to Tomcat 8 and spring libraries from 3.2.1 to 4.0.0, SES client has stopped working. Below is code which was working fine until yesterday to send out emails:</p>
  <pre><code>AmazonSimpleEmailService client = AmazonSimpleEmailServiceClientBuilder.standard()
                      .withCredentials(com.amazonaws.auth.DefaultAWSCredentialsProviderChain.getInstance())
                      .withRegion(Regions.US_EAST_1).build();
  </code></pre>
  <p>It is throwing following exception</p>
  <pre><code>SEVERE [http-nio-8080-exec-8] The email was not sent.
      com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain: [EnvironmentVariableCredentialsProvider: Unable to load AWS credentials from environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY (or AWS_SECRET_ACCESS_KEY)), SystemPropertiesCredentialsProvider: Unable to load AWS credentials from Java system properties (aws.accessKeyId and aws.secretKey), com.amazonaws.auth.profile.ProfileCredentialsProvider@79fc4ef8: profile file cannot be null, com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper@33e618b9: Unauthorized (Service: null; Status Code: 401; Error Code: null; Request ID: null)]
  </code></pre>
  <p>I have tried adding <code>AWS_ACCESS_KEY_ID</code> and <code>AWS_SECRET_KEY</code> as environment variables as well but it didn't work. Searched web, checked aws docs but without anyluck.</p>