Getting the following exception when using the AWS SDK for Java and Java 1.8u60+.
com.amazonaws.services.s3.model.AmazonS3Exception: AWS authentication requires a valid Date or x-amz-date header (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 41C359C079CBAFCF)
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1182) ~[aws-java-sdk-core-1.10.10.jar:na]
at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:770) ~[aws-java-sdk-core-1.10.10.jar:na]
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:489) ~[aws-java-sdk-core-1.10.10.jar:na]
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:310) ~[aws-java-sdk-core-1.10.10.jar:na]
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3608) ~[aws-java-sdk-s3-1.10.10.jar:na]
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3561) ~[aws-java-sdk-s3-1.10.10.jar:na]
at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:647) ~[aws-java-sdk-s3-1.10.10.jar:na]
at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:632) ~[aws-java-sdk-s3-1.10.10.jar:na]
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…