Hosting svelte-kit on aws amplify - amazon-web-services

I’ve been trying to deploy my svelte-kit project to aws amplify but whenever I do, despite the build and deploy stages being successful, the page returns a 404 error. I’ve changed the build settings to '/build' which is the output directory I've specified, and I'm using svelte-js/adapter-node but have tried a few other adapters. When I download the build artifacts from aws the build is the exact same as what is produced locally (by npm run build).
Build Log Image
Amplify Domain returns: "No web page was found for the web address:"
I've attatched an image of the end of the amplify build, which includes the warning 'no index.html found' as svelte-kit doesn't seem to produce an index.html. Does anyone know how to fix this issue? Anyway to deploy a dynamic svelte project to amplify is what I'm looking for.

I flipped over to using adapter-static (and svelte kit) and it seems to work for me.

Related

Cant add api resource to AWS Amplify project

So I have ran the following commands to initialize my amplify project:
amplify configure
amplify init
Then i run amplify add api.
when I select "REST" api, it says "There was an error adding the API resource" Running amplify status confirms that nothing was added. However, when I try to add the "GraphQL" api, it gives me the same error message, but running amplify status indicates that it was actually added successfully.
i want to add REST api to my amplify app. Not sure what the issue is. I have tried updating amplify cli and reinitializing my project multiple times. thanks in advance.
I am seeing a similar error in the step:
Try opening with system-default editor instead?
The error is:
There are 2 options that helped me
On this step select No
Install xdg-utils: sudo yum -y install xdg-utils (I am using EC2 linux 2 instance)
Try these options and let's see if it helps you.

Repository as dependency doesn't affect changes

My nextjs front-end app on AWS has a back-end dependency in package.json linked it in this way:
"api-client": "git+https://username:password#bitbucket.org/username/api_client_dev.git".
When I update my backend repository with changes, locally (npm run dev) everything works, but the app on AWS (with Amplify), when building recognizes an error type about a variable referring to something I haven't done yet.
My front-end doesn't recognize the updated repository.
If I check my repo on bitbucket is updated.
No problems with branches.
I don't understand why. Any suggestion?
Thank you
The problem was in amplify.yml
Adding the script npm update on pre-build, force amplify to refresh cached dependencies on node_modules, my dependency included.

AWS Amplify deployment: ERR_CONNECTION_RESET

I'm deploying my first project to AWS Amplify, it's just a basic React app with some divs and text to test out the deployment.
It builds and runs in VS code and is bound to Git.
I ran thorough the Amplify Console wizard, setting up the build to use Webpack which completed successfully and deployed uploading:
index.html
index.css
main.js
and a couple of images
However when I visit the link I get:
This site can’t be reached
ERR_CONNECTION_RESET
How can I investigate what exactly has been deployed to give me clues to why it won't work?
I has assumed that it was the hosting that was the problem but after testing it with Firefox and IE I got more security related messages.
Finally I got it working on my phone on 4G (bypassing the home router) and this worked.

Elastic Beanstalk Degraded error not showing any details with Laravel install

I'm currently uploading a Laravel package to Elastic Beanstalk and I am receiving a "Degraded" error with no details. Here is what I've done.
When I upload the package status is Ok when I go to the url provided by EB I get a "forbidden" message on my browser.
This is to be expected since the actual path for Laravel is /public.
I then go to Configuration: Software then I modify Document root to /public this then gives me a Degraded errorunder Health Degraded Causes there are no errors. I've also followed AWS way of enabling the enhanced monitoring and it still doesn't show anything. Any ideas what I'm doing wrong?
I found the solution for this. The problem was that I was manually compressing my directory with .zip
According to AWS Documentation it should be done like so:
~/myapp$ zip ../myapp.zip -r * .[^.]*
More details found here:
creating a source bundle

Nexus 3.5.1 proxies from snapshot repo nothing but maven metadata files

I have upgraded nexus repository from 2.x to 3.x through following path:
2.4.14 -> 3.4.0 -> 3.5.1
All nexus services were packed in docker with data directory mapped from host's. For all services I use default either sonatype/nexus or sonatype/nexus3 containers. Nexus web interface is hidden behind nginx with simple reverse proxying.
I use the nexus service with boot-cj (with no credentials) tools which manages dependencies the same way as maven. Anyway the tool first downloads nexus-maven.xml with relevant sha1 files and tries to download jars. It works fine with all 2.x I had.
I created a proxy repository against remote sonatype-snapshots repo. When I start compilation I have Could not find artifact error. I found that the meatdata files are cached but all poms and jars.
I have tried to fix it by cleaning cache with the clean_cache file trick and more rough rm -rfv /srv/nexus3/nexus-data/cache/* with no success. There are no any logs about error. Also I have checked manually that required artefact exists in the remote repository. More obvious Rebuild index button gave no solution. I do not thing it is a problem with nginx, but who knows? Also leaving overnight to run the scheduled tasks did not help.
The expected artifact is org.eclipse.rdf4j:rdf4j:pom:2.3-20170901.145510-11.