Open CGarces opened 9 months ago
Hey @CGarces, thank you for reaching out. The issue occurs when the hosting category has been via the AWS console, running amplify pull
does not pull the hosting config. Unfortunately this information is only captured when hosting is added to the project on amplify add hosting
.
marking this as bug for DX improvements.
I have deatached the branch, and added again from CLI. but I can't execute amplify publish - c, only give the option of made a git push. I still have the problem of old content served from cloud front.
Hey @CGarces, the Continuous deployment
option relies on a version control system such as GitHub to commit your changes, where the Amplify hosting on AWS console picks up the commit and runs the build.
If you are looking to manually publish without a git provider we can utilize the Manual deployment option Amazon CloudFront and S3
to host your static website.
Please refer to the following documentation providing this information. https://docs.amplify.aws/cli/hosting/hosting/#type-of-deployments https://docs.amplify.aws/cli/hosting/hosting/#amazon-s3-and-amazon-cloudfront
Additionally, the amplify publish
does not support a -c
flag and is ignored by the command. Could you point me to the resource that provides this information?
command reference: https://docs.amplify.aws/cli/commands/hosting/
Hi!
If you select Amazon S3 & Amazon Cloudfront for hosting your Amplify project in the amplify add hosting flow, the frontend build artifacts will be uploaded to the S3 hosting bucket, and then if Amazon CloudFront is enabled along with it, the amplify publish command executed with the
--invalidateCloudFront
or-c
flag will send an invalidation request to the Amazon CloudFront service to invalidate its cache.
I need to move to Amazon CloudFront and S3, due this problems and the cache miss, the managed cloudfront is useless to me.
@CGarces really appreciate pointing this out. Are there are here any issues you are observing with the managed CloudFront so that i can reach out to our folks in the hosting team for any information.
I have a open case with AWS 13848994171
Looks like cloudfront is using the old index.html and made a redirection (the old version was an standard Angular application with routing).
Also the bug https://github.com/aws-amplify/amplify-hosting/issues/2563 is another reason to stop using hosted app.
The comment from https://github.com/aws-amplify/amplify-hosting/issues/2563#issuecomment-1723204047 provide a lot of information about what is probably going wrong with my deploy.
But In any case the main topic of the issue "Amplify hosting not detected" is solved, so I'll close the issue.
Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
@CGarces I understand. I am going to keep the issue open as this would enable us in tracking the CLI improvements on the hosting flow.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v18.17.1
Amplify CLI Version
12.4.0
What operating system are you using?
Windows 10
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Amplify hosting MAYBE was added from console?
Describe the bug
I have changed my application from angular to plain JS
The build and deploy works fine and I can see the new files, but I can fetch the old files from the angular version.
I have executed
It's and old Amplify inhalation and I'm not sure how the hosting was added.
Hosting add not works
Expected behavior
Some way to sync hosting options with
amplify pull
Reproduction steps
I can't reproduce the error.
Project Identifier
e2a6b48c5b48584b6f1162da36d4e8de
Log output
Additional information
No response
Before submitting, please confirm: