Aws-sdk-js: Inaccessible host This service may not be available in the `eu-west-1' region.

Created on 11 Apr 2019  路  45Comments  路  Source: aws/aws-sdk-js

Hi

I have issue with uploading to amazon s3 in our electron app. Sometimes uploading works, sometimes not. Usually it fail after some time of uploading. The error I get is:

Inaccessible host: rm-production-1-incoming.s3.eu-west-1.amazonaws.com'. This service may not be available in theeu-west-1' region.

We have users with uploading issues in mobile app and also in electron app, so I think the error is somehow related to aws s3 and/or configuration.

I have google a lot, and I have found this thread - 528 which describe this issue the best. Also there is this closed issue 21309

We are using aws-sdk version

2.211.0

Could somebody help me if there is a way how to fix it?
Is retryable option set by default? Do it help to change the endpoint? If I go to the list of availabled endpoints , I dont see format

rm-production-1-incoming.s3.eu-west-1.amazonaws.com

as availabled. On another link 68 I have found the message, that changing configuration to something like this helped:

 AWS.config.update({
   accessKeyId: <access key>,
   secretAccessKey: <secret key>,
   region: "<your region>",
   s3BucketEndpoint: false,
   endpoint: "https://s3.amazonaws.com"
 })
 //and then my params

 let params = {
    Bucket: '<bucket name>',
 };

I'm lost and I need to fix the issue. If I change version of aws-sdk to the latest version, will it help to solve the issue?

Thanks
Martin

guidance

Most helpful comment

can i get a free amazon prime as a compensation pls :D:D:D:D:D:D:D

All 45 comments

@Matho,

You're welcome to switch to a newer version of the SDK. If that does solve the issue, it may help point to a root cause.

Are there any patterns to when uploading works and when it doesn't?

@srchase

Unfortunatelly I don't know if there are any patterns. The issue occurs to users of our app randomly, sometimes it works, sometimes not. It is reported when some part of uploading is processed, not at the begining of uploading.

I tried to simulate bad network connection via Network link conditioner on macos. When I used 100% loss profile, after almost 4 minutes of network inactivity I was able to get the error message Inaccessible host ... But it was after 4 minutes. It is pretty high number. So I think, it do not occur due to timeout issue, the timeout seems to be pretty high here.

@Matho,

Has upgrading to the latest version of the SDK made any difference? If not that, hopefully some pattern in the issue emerges that would help point to a root cause (whether in the SDK or elsewhere in your app).

@srchase I wrote question to #528 , maybe the author of that issue could help me solving this very similar issue. We didn't try to update aws-sdk yet, i'm now working on different project, I expect I will try in a week. I will let you know the results.

Same here... I'm using version 2.395.0 and randomly getting the same error:
Error: UnknownEndpoint: Inaccessible host: cognito-identity.eu-west-1.amazonaws.com'. This service may not be available in theeu-west-1' region.. Error Stack: UnknownEndpoint: Inaccessible host: cognito-identity.eu-west-1.amazonaws.com'. This service may not be available in theeu-west-1' region.
[1] at Request.ENOTFOUND_ERROR ([MY PROJECT PATH]node_modules\aws-sdk\lib\event_listeners.js:486:46)
[1] at Request.callListeners ([MY PROJECT PATH]node_modules\aws-sdk\lib\sequential_executor.js:106:20)
[1] at Request.emit ([MY PROJECT PATH]node_modules\aws-sdk\lib\sequential_executor.js:78:10)
[1] at Request.emit ([MY PROJECT PATH]node_modules\aws-sdk\lib\request.js:683:14)
[1] at ClientRequest.error ([MY PROJECT PATH]node_modules\aws-sdk\lib\event_listeners.js:325:22)
[1] at ClientRequest. ([MY PROJECT PATH]node_modules\aws-sdk\lib\http\node.js:93:19)
[1] at ClientRequest.emit (events.js:182:13)
[1] at ClientRequest.EventEmitter.emit (domain.js:442:20)
[1] at TLSSocket.socketErrorListener (_http_client.js:391:9)
[1] at TLSSocket.emit (events.js:182:13)
[1] at TLSSocket.EventEmitter.emit (domain.js:442:20)
[1] at emitErrorNT (internal/streams/destroy.js:82:8)
[1] at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
[1] at process._tickCallback (internal/process/next_tick.js:63:19)

I am having this same problem and I am using "aws-sdk": "^2.474.0"
Our devops team is researching this and I will post here if we come up with a solution.

Same problem here, aws-amplify": "^1.1.27 - it appeared suddenly after weeks without trouble.

I had this issue. In my case, it was a problem with my network, which got sorted out real quick.

we're still having problems
currently using 2.518.0

We're getting this on different services such as IAM, Lambda, S3 etc . . .

Inaccessible host: `s3.eu-west-1.amazonaws.com'. This service may not be available in the `eu-west-1' region

UnknownEndpoint: Inaccessible host: `cloudfront.amazonaws.com'. This service may not be available in the `us-east-1' region.

It's very random, sometimes it would work fine and sometimes it would just drop
Any solution to this ?

@sunnixx we started having this error right now

it looks like it is an instability in aws s3 service

We are experiencing the same issues. Looks like S3 is having intermittent issues.

I just had this error too

We're seeing this too.

image

can i get a free amazon prime as a compensation pls :D:D:D:D:D:D:D

I'm also having this issue accessing a bucket in us-east-1 with sdk version 2.554.0.

+1 here :(

+1 Same issue ;(

+1 same here

+1 same here

As of 8:15 EST Amazon is reporting Intermittent DNS Resolution Errors

https://status.aws.amazon.com/

Looks to be fixed over here!

Now I getting this error:

Updating resources in the cloud. This may take a few minutes...UnknownEndpoint: Inaccessible host: cloudformation.us-east-1.amazonaws.com'. This service may not be available in theus-east-1' region.

+1 Same issue

+1. we're having a ton of issues today, s3 and rds throwing same errors above in us-east-1.

https://www.reddit.com/r/aws/comments/dlnl28/route53_is_failing_to_resolve_s3/

We want to give you further information regarding the occasional DNS resolution errors. The AWS DNS servers are currently under a DDoS attack. Our DDoS mitigations are absorbing the vast majority of this traffic, but these mitigations are also flagging some legitimate customer queries at this time. We are actively working on additional mitigations, as well as tracking down the source of the attack to shut it down. Amazon S3 customers experiencing impact from this event can update the configuration of their clients accessing S3 to specify the specific region that their bucket is in when making requests to mitigate impact. For example, instead of "mybucket.s3.amazonaws.com" a customer would instead specify "mybucket.s3.us-west-2.amazonaws.com" for their bucket in the US-WEST-2 region. If you are using the AWS SDK, you can specify the region as part of the configuration of the Amazon S3 client to make sure your requests use this region-specific endpoint name. The DNS resolution issues are also intermittently affecting other AWS Service endpoints like ELB, RDS, and EC2 that require public DNS resolution.
We are actively working on this issue and will update you as soon as the issue is resolved on our end, however at this moment I won鈥檛 be able to provide an ETA. I am keeping this case in Pending Amazon Action, will update you as soon as I get further information on the resolution of this issue

I still get this issue in ap-southeast-1.amazonaws.com.

+1 us-east-1

+1 us-east-1. It seems down.

+1 us-east-1

+1 us-east-1

+1 us-east-1

+1 us-east-1

+1 us-east-1

+1 sa-east-1

+1 ap-south-1

+1 us-east-1

+1 us-east-1

+1 happened again now - us-east-1

I just get this working by changing the DNS address (as suggested in the Reddit thread:

"Someone on Hacker News posted a workaround that worked for me.

Switching to Google DNS 8.8.8.8 and/or 8.8.4.4 to bypass the affected DNS servers fixed the issues I was experiencing. I updated my /etc/resolv.conf files to use Google DNS, rebooted the host, and fixed.

https://developers.google.com/speed/public-dns/docs/using"

same issue here:
Recoverable error occurred (Inaccessible host: cloudformation.us-east-1.amazonaws.com'. This service may not be available in theus-east-1' region.), sleeping for 5 seconds. Try 1 of 4

same: UnknownEndpoint: Inaccessible host: dynamodb.eu-central-1.amazonaws.com'. This service may not be available in theeu-central-1' region.

Hello everyone,

This issue may have many root causes but most of the times they do not come from the SDK but AWS services in general.

Closing this issue for now, please reach out if anyone is still facing the issue or use the issue template to open a new issue.

Thank-you

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

Was this page helpful?
0 / 5 - 0 ratings