java.lang.IllegalStateException

s3getFirstBatch: error listing: 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: 57C94ADD99009714), S3 Extended Request ID: PCQuMFcNifp5H4yBg4uTB45oepgOvCkTnJotg/C8KALXtBMJbaiLEFjIqdTLOHfH2jPyeVxRKx4=

Samebug tips1

Set the S3 bucket to the same region as AmazonS3Client, otherwise it just throws this exception. Check if your bucket name is correct as well.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web12768

  • via GitHub by maksimu
    , 9 months ago
    s3getFirstBatch: error listing: 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: 57C94ADD99009714), S3 Extended Request ID: PCQuMFcNifp5H4yBg4uTB45oepgOvCkTnJotg/C8KALXtBMJbaiLEFjIqdTLOHfH2jPyeVxRKx4=
  • getFirstBatch: error listing: com.amazonaws.services.s3.model.AmazonS3Exception: The AWS Access Key Id you provided does not exist in our records. (Service: Amazon S3; Status Code: 403; Error Code: InvalidAccessKeyId; Request ID: 8C81A8830D6D9DAD), S3 Extended Request ID: ef8SJMsejbKYd9DA+v6VBU8tpyo6zU8IkXsjaNWLX52hCUyE5irRAe81nXfNnMME1zdnoXXWxV4=
  • s3getFirstBatch: error listing: com.amazonaws.services.s3.model.AmazonS3Exception: The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256. (Service: Amazon S3; Status Code: 400; Error Code: InvalidRequest; Request ID: F9686BB975A72741), S3 Extended Request ID: 80xvNi3MB7XTU7BpjDY7AZ+OY9eJXasWakIS35tnlevhFct6D9m8tLFtLsjmzbY0+GzqsMZMkfQ=
  • Stack trace

    • java.lang.IllegalStateException: s3getFirstBatch: error listing: 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: 57C94ADD99009714), S3 Extended Request ID: PCQuMFcNifp5H4yBg4uTB45oepgOvCkTnJotg/C8KALXtBMJbaiLEFjIqdTLOHfH2jPyeVxRKx4= at org.cobbzilla.s3s3mirror.KeyLister.s3getFirstBatch(KeyLister.java:109) at org.cobbzilla.s3s3mirror.KeyLister.<init>(KeyLister.java:37) at org.cobbzilla.s3s3mirror.KeyMaster.run(KeyMaster.java:80) at java.lang.Thread.run(Thread.java:745) Caused by: 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: 57C94ADD99009714), S3 Extended Request ID: PCQuMFcNifp5H4yBg4uTB45oepgOvCkTnJotg/C8KALXtBMJbaiLEFjIqdTLOHfH2jPyeVxRKx4= at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1020) at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:675) at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:429) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:291) at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3655) at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3607) at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:623) at org.cobbzilla.s3s3mirror.KeyLister.s3getFirstBatch(KeyLister.java:96) ... 3 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Once, 1 week ago
    Once, 5 months ago
    Once, 1 year ago
    12 times, 1 year ago
    Unknown user
    Once, 1 year ago
    50 more bugmates