everytime I deploy with AWS-SAM my Settings in API-Gateway get reset.
I have an Open Api 3.0 Spec.yml I imported into API-Gateway and it loaded just fine. After deploying using SAM it only shows the hello world function (only one i currently have).
What I want is that the settings imported via the Open API spec stay and i develop the lambdas locally and push them via SAM. I then want to connect the function manually via AWS-Cloud-Console to the specific lambda, not using the SAM's yaml format. How can i deploy only the function, without destroing the API-Gateway Config everytime?
FYI:
I dont want to use the browser IDE to deploy / test my function.
I am using Node.js / Typescript
I've read the useless Documentation # AWS
https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/scheduled-events-invoking-lambda-deploy-function.html
https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/lambda-create-table-deploy-function.html
I know this question is similar, but doesnt solve the problem:
how to develop a lambda on SAM but deploy without api gateway
I tried uploading via ZIP File, but upon testing the function it always fails at finding the Entrypoint, even after ajusting the Entrypoint in the Cloud Console
Thank you in advance!
Related
I have deployed my application using copilot deploy which works. It creates a load balancer and when I go to the designated url I can view my react app. However, I'm trying to create a CI workflow using github actions.
My github actions appear to work, they appear to deploy the app. But when I go to the new designated url, I get Uncaught SyntaxError: Unexpected token '<'
If I go to that same url and hit a specific route on it, that actually does work. So I can do url/test and it return "hello world" but it won't return the bundle for the application or it's returning a broken version of it for some reason.
I can't figure out why using copilot deploy normally works, but this doesn't
For context, my app is set up like this. In the root folder there is a Server folder that has the node server file with the routes. In the root folder is also a src folder with the react code. There is a public file. There is the docker file containing instructions. And then there is the build file. So far I've been generating the build ahead of time and then deploying everything. The node server then sends the build.
So presumably, something about the way the docker container is being built via github actions is significantly different than the way it is building using copilot deploy. But, my understanding is that in both cases it is following the same docker file. So I can't figure out what is different about the directory structure it is creating, or maybe its having trouble creating the bundle at all. If anyone has any insight it would be appreciated.
Thanks!
I wanna make a flutter web app and deploy it to AWS.
After researching it looks like using AWS Amplify is the easiest way so I try it, however after I successfully deploy it, it only shows a white screen with this showing on the log after I inspect:
However the web app show up just fine on my GitHub page and Codemagic, you can see it on rezyfr.github.io and fl-blog.codemagic.app. And here is my amplify yaml file:
Is anyone ever experience this and found the solution? Or anyone have a better way to deploy flutter web on AWS?
I'm using AWS Lambda to generate pdf file using a ninja2 template. I am trying to use pdfkit to convert my HTML into pdf. I realize pdfkit has an internal dependency - wkhtmltopdf which needs to be used as a binary or installed via a package manager. I am not sure how to make this work on AWS Lambda?
With my current template and python code using pdfkit, I am getting the following error -
{
"errorMessage": "No wkhtmltopdf executable found: \"b''\"\nIf this file exists please check that this process can read it. Otherwise please install wkhtmltopdf - https://github.com/JazzCore/python-pdfkit/wiki/Installing-wkhtmltopdf",
"errorType": "OSError",
.....
.....
}
Any ideas on how can I make pdfkit work on lambda?
Any suggestions for wkhtmltopdf replacements?
Thanks
I've made a simple demo on using PDFKit using Serverless framework using layer. Checkout https://medium.com/#crespo.wang/create-pdf-using-pdfkit-on-serverless-aws-lambda-with-layer-721ca86724b2
AWS Lambda has concept of Layers which allows you to upload your custom dependencies as a zip and then it will be available as it is installed on the box. For more information see here :
https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
In your case you could upload the binaries for wkhtmltopdf as layer and while creating lambda function, you could provide the layer to use.
There are multiple projects on GitHub used to run wkhtmltopdf on Lambda for example:
https://github.com/lubos/aws-lambda-wkhtmltopdf
https://github.com/dimiro1/lambda-wkhtmltopdf
https://github.com/jpaolin/aws-lambda-s3-wkhtmltopdf
Download the wkhtmltopdf binaries required for aws lambda from :https://wkhtmltopdf.org/downloads.html.
Add the zip file as layer to lambda and set the pdf kit config pointing to executable path in the zip file.(/opt/bin/wkhtmltopdf)
I need your help regarding on serving my webapp on a server:
I have a nodejs app and I have it running in ExpressJs in beanstalk and it is working fine,
However I am thinking to use s3 instead. So in my website I have all sort of ajax calls and also I have couple of modules in nodejs folder which is generated via npm install.
Here is the link I used in aws:
http://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html
But it is not very clear about it.
I am thinking if it is doable to use s3 for this website?
Also can you please provides some pros and cons? I appreciate it because this will help me a lot on making decision whichone to choose?
I am trying to deploy a c++ Http web server on OepnShift3 then I referred this.
The problem is:
Shall I put the source code on OpenShift or compile it first then put the executable file on OpenShift?
Is possible to access the OpenShift3 server via Xshell or Ftp?
Any way to get the OepnShift2 account?
It is no longer possible to get accounts on OpenShift 2.
For OpenShift 3, if you wanted to use a custom HTTP server you would need to be able to build a Docker image which includes it and any other files you need. If you can get the Docker image built, then you can deploy it to OpenShift 3.
Although you can get an interactive terminal in the container which runs your application, it doesn't work like traditional web hosting. That is, it isn't a shell access account where you would upload files using FTP or some other means.
Can you explain more about what it is you want to host? Depending on what you are doing there may be builder images already supported by OpenShift which can pull down files from a Git repository and build an image for you.
If OpenShift is new to you, I would suggest you try out:
https://learn.openshift.com
so you understand some of what it can do and how you interact with it.
Also grab down the free eBook and read it:
https://www.openshift.com/promotions/for-developers.html