Serverless deploy error : inaccessible host

I have developed a very basic java8 app and am trying to deploy using the “serverless deploy” command. I get ServerlessError: Inaccessible host: cloudformation.us-east-1.amazonaws.com'. This service may not be available in theus-east-1’ region.

OS:win32
Node Version: 6.11.2
Serverless Version:1.23.0

serverless file contents shown below:

service: sam-app-services
package:
artifact: target/sam-app-parserapi-1.0-SNAPSHOT.jar

provider:
name: aws
runtime: java8
stage: dev
region: us-east-1
memorySize: 512
timeout: 30

functions:
sam-app-parserapi:
handler: com.serverless.japi.LambdaHandler
runtime: java8
description: function for parser api
events:
- http:
path: /sam-app-parserapi/files
method: get
- cloudwatchLog:
logGroup: /aws/lambda/sam-app-parserapi

any suggestions to resolve this would really help.

Thanks

Please ignore this post. Mistake in proxy configuration.

1 Like

Hi!

Could you elaborate a bit more about the proxy configuration? Were you using a proxy and it was wrongly configured?

I still have the same problem since I reported this here a couple of weeks ago: "Inaccessible host" deploying in non-default region . I do not use a proxy. Any help is welcome!

If you access the internet through a proxy, you would need to have environment variables HTTP_PROXY and HTTPS_PROXY configured to http://<proxy_server>:

I use a proxy and it was wrongly configured. If you dont use a proxy, guess you wont need the variables.
Also verify http://docs.aws.amazon.com/general/latest/gr/rande.html and check if the service is available in your region

Hope this helps.

Thanks for the pointers!

I checked also how virtual hosting works for S3. There’s something weird. It seems I should be using:

<bucket id>.s3.amazonaws.com

or

<bucket id>.s3-eu-central-1.amazonaws.com

But in the error I see (mind the point before s3):

'<redacted bucket id>.s3.eu-central-1.amazonaws.com'. This service may not be available in the `eu-central-1' region.

Looking for that in internet, that domain looks like a bit fishy :fearful: