Skip to content
This repository was archived by the owner on Jun 3, 2020. It is now read-only.
This repository was archived by the owner on Jun 3, 2020. It is now read-only.

Amplify could not deploy to S3 resource - Inaccessible host. #10

@wwdas-sam

Description

@wwdas-sam

Sorry for the Slightly vague newbie question. There doesn't seem to be any other way of reaching out for regarding this issue. Maybe I or the instructions are missing something ?

I am trying to follow the instructions (i have tried both the auto and manual process) in the readme to deploy this project but the amplify push is failing. The amplify push script seems to be using a fully qualified url path to the s3 resource which is invalid ?

Any pointers in the right direction much appreciated!

Error I am getting:
Inaccessible host: amplify-surveypwa-dev-173816-deployment.s3.eu-west-2.amazonaws.com'. This service may not be available in the eu-west-2' region.
An error occured during the push operation: Inaccessible host: amplify-surveypwa-dev-173816-deployment.s3.eu-west-2.amazonaws.com'. This service may not be available in the eu-west-2' region.

If it try and do an s3 syn to the that bucket from the aws cli it work fine with s3://amplify-surveypwa-dev-173816-deployment But doesn't work with the .s3.eu-west-2.amazonaws.com on the end.

I have pasted the full output of the script below

sam@sams-zenbook:~/aws-appsync-survey-tool$ amplify init

Amplify CLI uses Lambda backed custom resources with CloudFormation to manage part of your backend resources.
In response to the Lambda Runtime support deprecation schedule
https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html
Nodejs runtime need to be updated from nodejs8.10 to nodejs10.x in the following template files:
/home/sam/aws-appsync-survey-tool/amplify/backend/auth/surveypwa1a7615c6/surveypwa1a7615c6-cloudformation-template.yml
/home/sam/aws-appsync-survey-tool/amplify/backend/function/surveypwa1a7615c6PostConfirmation/surveypwa1a7615c6PostConfirmation-cloudformation-template.json

Please test the changes in a test environment before pushing these changes to production. There might be a need to update your Lambda function source code due to the NodeJS runtime update. Please take a look at https://aws-amplify.github.io/docs/cli/lambda-node-version-update for more information

? Confirm to update the NodeJS runtime version to 10.x Yes

NodeJS runtime version updated successfully to 10.x in all the CloudFormation templates.
Make sure the template changes are pushed to the cloud by "amplify push"
Note: It is recommended to run this command from the root of your app directory
? Enter a name for the environment dev
? Choose your default editor: Visual Studio Code
Using default provider awscloudformation

For more information on AWS Profiles, see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html

? Do you want to use an AWS profile? Yes
? Please choose the profile you want to use amplify-sam
Adding backend environment dev to AWS Amplify Console app: duv2lx8m8lfsx
⠼ Initializing project in the cloud...

CREATE_IN_PROGRESS DeploymentBucket AWS::S3::Bucket Fri May 01 2020 17:38:24 GMT+0700 (Indochina Time) Resource creation Initiated
CREATE_IN_PROGRESS AuthRole AWS::IAM::Role Fri May 01 2020 17:38:24 GMT+0700 (Indochina Time) Resource creation Initiated
CREATE_IN_PROGRESS UnauthRole AWS::IAM::Role Fri May 01 2020 17:38:24 GMT+0700 (Indochina Time) Resource creation Initiated
CREATE_IN_PROGRESS UnauthRole AWS::IAM::Role Fri May 01 2020 17:38:24 GMT+0700 (Indochina Time)
CREATE_IN_PROGRESS DeploymentBucket AWS::S3::Bucket Fri May 01 2020 17:38:23 GMT+0700 (Indochina Time)
CREATE_IN_PROGRESS AuthRole AWS::IAM::Role Fri May 01 2020 17:38:23 GMT+0700 (Indochina Time)
CREATE_IN_PROGRESS amplify-surveypwa-dev-173816 AWS::CloudFormation::Stack Fri May 01 2020 17:38:21 GMT+0700 (Indochina Time) User Initiated
⠹ Initializing project in the cloud...

CREATE_COMPLETE AuthRole AWS::IAM::Role Fri May 01 2020 17:38:39 GMT+0700 (Indochina Time)
CREATE_COMPLETE UnauthRole AWS::IAM::Role Fri May 01 2020 17:38:39 GMT+0700 (Indochina Time)
⠙ Initializing project in the cloud...

CREATE_COMPLETE DeploymentBucket AWS::S3::Bucket Fri May 01 2020 17:38:45 GMT+0700 (Indochina Time)
⠇ Initializing project in the cloud...

CREATE_COMPLETE amplify-surveypwa-dev-173816 AWS::CloudFormation::Stack Fri May 01 2020 17:38:47 GMT+0700 (Indochina Time)
✔ Successfully created initial AWS cloud resources for deployments.
✔ Initialized provider successfully.
? Do you want to configure Lambda Triggers for Cognito? No
? Enter the name of the group to which users will be added. users
Initialized your environment successfully.

Your project has been successfully initialized and connected to the cloud!

Some next steps:
"amplify status" will show you what you've added already and if it's locally configured or deployed
"amplify add " will allow you to add features like user login or a backend API
"amplify push" will build all your local backend resources and provision it in the cloud
"amplify console" to open the Amplify Console and view your project status
"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud

Pro tip:
Try "amplify add api" to create a backend API and then "amplify publish" to deploy everything

sam@sams-zenbook:~/aws-appsync-survey-tool$ amplify push
✔ Successfully pulled backend environment dev from the cloud.

Current Environment: dev

Category Resource name Operation Provider plugin
Auth surveypwa1a7615c6 Create awscloudformation
Analytics surveypwa Create awscloudformation
Api surveypwa Create awscloudformation
Function surveypwa1a7615c6PostConfirmation Create awscloudformation
? Are you sure you want to continue? Yes

GraphQL schema compiled successfully.

Edit your schema at /home/sam/aws-appsync-survey-tool/amplify/backend/api/surveypwa/schema.graphql or place .graphql files in a directory at /home/sam/aws-appsync-survey-tool/amplify/backend/api/surveypwa/schema
✖ An error occurred when pushing the resources to the cloud

Inaccessible host: amplify-surveypwa-dev-173816-deployment.s3.eu-west-2.amazonaws.com'. This service may not be available in the eu-west-2' region.
An error occured during the push operation: Inaccessible host: amplify-surveypwa-dev-173816-deployment.s3.eu-west-2.amazonaws.com'. This service may not be available in the eu-west-2' region.
sam@sams-zenbook:~/aws-appsync-survey-tool$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions