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.


6 months ago
Expert tip

Solutions on the web173

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

Solution icon of github
via GitHub by yuriti89
, 6 months ago
Your socket connection to the server was not read from or written to within the timeout period. Idle connections will be closed. (Service: Amazon S3; Status Code: 400; Error Code: RequestTimeout; Request ID: XXX), S3 Extended Request ID: XXXXX

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: 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)

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

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
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=

Solution icon of web
via blogspot.com by Unknown author, 1 year ago
The XML you provided was not well-formed or did not validate against our published schema (Service: Amazon S3; Status Code: 400; Error Code: MalformedXML; Request ID: 2C1126E838F65BB9), S3 Extended Request ID: QmpybmrqepaNtTVxWRM1g2w/fYW+8DPrDwUEK1XeorNKtnUKbnJeVM6qmeNcrPwc

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, 4 months ago
Samebug visitor profile picture
Unknown user
Once, 10 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