Amplify-console: amplify publish

Created on 10 Aug 2019  路  8Comments  路  Source: aws-amplify/amplify-console

Please describe which feature you have a question about?
When my project is deployed through the console, it is not serving my static build but seems to run npm start

Provide additional details
Not sure what I'm doing wrong, but I expect that when amplify runs my build command, it will host
my web-build directory on S3. What I see when I visit the app url is my app running in development mode.

question

All 8 comments

@rickiesmooth are you using amplify publish to host your site or are you using the Amplify Console's Hosting (not yet available in the CLI). I recommend connecting your repo here: https://console.aws.amazon.com

I have the same problem. I was able to get Amplify Publish to work with S3+CloudFront. Now I am trying to move over to Amplify Console. It builds ok - provision, build, deploy, verify, are all green. But when I try to view my Angular app at the "Domain" specified on the build page, I get page not found. In my case, nom also seems to run ok.

@tengoal Can you send your app's arn and theURL you used to visit your website to [email protected]?

I tried publishing my site which is a react app via Amplify Console. (nothing more than the create react-app, just to get it deployed initially) It is connected to my github repo and the page is blank when open the amplify link. I am getting this error - This page isn鈥檛 working master.d29z0qeglw3k5n.amplifyapp.com redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS

I even tried the link incognito, same issue. I must be missing something.

Chris

Your output folder must be incorrect. Can you share your build settings? Check your output folder: https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html#setting-the-output-folder

@VividKnife my issue is solved. But I can't tell you exactly what I did because I tried a number of things. Sorry!

I will say that what I started to do was follow MythicalMysfits and then try to apply that to my own Angular project. That didn't go well at first, but I worked it out.

The Amplify CLI Website+S3 is great, but when I went to explore what I could do from there, it seemed like I could deploy to prod directly but that's not what I wanted to do. I wanted to pull from my repo, and build and deploy the way I wanted. So I tried to move over to CodeCommit.

Like I said eventually I got that to work, but in the interim, I discovered the Amplify Console. I didn't know that existed when I started (I was all CLI). Later I think I learned that the Console and the CLI are not totally hooked up.

Is this correct? If I create my app through the CLI will it appear in the Console?

Basically, what I wanted to do was to add Feature Branching. Looks like the console helps you set this up. So now I am back to wondering if what I really want is a Console-Amplify app. But I am not sure.

Now that I am set up on CodeCommit/Build/Deploy, is there any benefit to me to switch back to Amplify Console? I am struggling to understand the differences between these offerings.

Thanks!

@tengoal You are right, the console and the CLI are not totally hooked up. When you create a CLI app, it will not show up in the console.

Amplify Console provides managed experience for setting up your CICD flow for Amplified frontend app. It does not only automatically deploy your frontend, but also deploys your backend at sametime. You are also configure Amplify Console that each feature branch uses different backend environment. So you have completely isolated resources for your feature branch and prod branch.

Amplify Console also provides some additional feature for hosting, it supports custom domain setup, url rewrite etc. Learn more here.

Hi, I have a big doubt! When I've created my project and publish it by using amplify push + publish in cli tool, then it generated a s3 url for the static site. Now, I've switched to the Amplify Console (web), and I obtain another URL to access my app through HTTPS, but my old domain created my the cli exposed in the S3 bucket is still there. What do I have to do to remove it? Do I have to do amplify hosting remove in the cli?, do I have to simply remove the s3? where is hosted my static site when I publish it though Amplify Console?

Please, help me to understand it. I just want to set-up my site correctly for production release.
Thank you,
Diego

Was this page helpful?
0 / 5 - 0 ratings