com.amazonaws.services.s3.model.AmazonS3Exception

The provided token has expired. (Service: Amazon S3; Status Code: 400; Error Code: ExpiredToken; Request ID: C043EEA5A00B5DF8)


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 web217

Solution icon of github
via GitHub by landonreed
, 6 months ago
The provided token has expired. (Service: Amazon S3; Status Code: 400; Error Code: ExpiredToken; Request ID: C043EEA5A00B5DF8)

Solution icon of github
The provided token has expired. (Service: Amazon S3; Status Code: 400; Error Code: ExpiredToken; Request ID: <redacted>), S3 Extended Request ID: <redacted>

Solution icon of github
Bad Request (Service: Amazon S3; Status Code: 400; Error Code: 400 Bad Request; Request ID: ...), S3 Extended Request ID: ....=

Solution icon of github
via GitHub by ptimsonbbc
, 11 months ago
Bad Request (Service: Amazon S3; Status Code: 400; Error Code: InvalidArgument; Request ID: 4442587FB7D0A2F9) , S3 Extended Request ID: null

Solution icon of github
null (Service: Amazon S3; Status Code: 400; Error Code: InvalidArgument; Request ID: null), S3 Extended Request ID: null

Solution icon of github
via GitHub by edwardotis
, 6 months ago
The specified location-constraint is not valid (Service: Amazon S3; Status Code: 400; Error Code: InvalidLocationConstraint; Request ID: 8509B9CACA0AA3D2)

Solution icon of github
null (Service: Amazon S3; Status Code: 400; Error Code: InvalidArgument; Request ID: null)

Solution icon of github
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: 7BBFB71FDEA7AC15), S3 Extended Request ID: s7PHLFnLHI+f+0I4E1dtYHraxmVXMny75pOAkHIovhlqXNtHcFBOdFArZHaocpcpXwubGVFMNfY=

Solution icon of github
via GitHub by armin-bauer
, 1 year ago
null (Service: Amazon S3; Status Code: 400; Error Code: InvalidArgument; Request ID: null), S3 Extended Request ID: null

Stack trace

  • com.amazonaws.services.s3.model.AmazonS3Exception: The provided token has expired. (Service: Amazon S3; Status Code: 400; Error Code: ExpiredToken; Request ID: C043EEA5A00B5DF8) at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1389)[datatools.jar:na] at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:902)[datatools.jar:na] at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:607)[datatools.jar:na] at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:376)[datatools.jar:na] at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:338)[datatools.jar:na] at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:287)[datatools.jar:na] at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3654)[datatools.jar:na] at com.amazonaws.services.s3.AmazonS3Client.putObject(AmazonS3Client.java:1354)[datatools.jar:na]

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

48 times, 2 months ago
Samebug visitor profile picture
Unknown user
Once, 8 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
50 more bugmates