If you are using the services of AWS you should be careful about some services. It is possible that you may want a certificate for your application. You may use free certificate like let’s encrypt but AWS is offering a “Certificate Manager” and you can find it like any other services:
400$/month per private certificate
But, on the pricing page, you can find that this service cost 400$/month, no matter if you use it or not, it will take you the price of renting a car.
No way to delete or stop this recurring amount of money from the account
On the documentation, you can find that the service will stop “until you delete the CA”. I can tell you that this information is not really true as this service still take money without the CA. So additionally this service have a very not predictable way of taking money, and you don’t really know when it will stop, even if you check there is no certificate and you read carefully the documentation.
There are some differences between Google Cloud and AWS when you want to deploy your function for your API.
My point of view is that Google Cloud function may be a bit more simple to deploy but AWS is in a way the most reliable and complete cloud environnement nowadays.
On both cloud environnement you can upload the code with a ZIP, you can so use the same way to adjust your code for AWS:
Differences between Google Cloud functions and AWS Lambda (Node.JS)
THE DEPENDENCIES – In Google Cloud, the dependencies are automatically installed from the package.json file – In AWS, you need to install the dependencies with npm or yarn, that will build the node_modules folder If you don’t have the node_modules folder, your Lamdba function will not work with the following error:
This article is dedicated to new users to AWS – Amazon Web Services – that wants to use this cloud instead for others (Azure, Google Cloud) which seems to be the best choice at the moment. Indeed, AWS is the most complete scalable and dynamic cloud solution.
However, this is not so simple to understand all the concepts, if you look for simplicity you may be interested by Google Cloud that I used before.
In order to use API Gateway and Lamdba, you should add them in favorite in the Services:
Create your API functions in AWS Lambda
We can use AWS Lamdba to create routes that can be used for our applications.
You should be now able to see the function overview with the default example in the code editor:
You can try the example it will show the string “Hello from Lambda”, the response that is returned in the example. We can now write our own function from scratch here or alternatively we can upload our code from a ZIP file.
Create our API Gateway route (HTTP)
In the overview of the Lambda function you can see the button Add trigger, you can use it to add the API event that will call our function.
You can then click Save and so you should see your new trigger, the API Gateway trigger:
Now you can try it by going on the API endpoint link in the details. You can use it like it in your application or you can change it by adding your own domain, for exemple api.myapp.com/getProducts You can do that in Custom Domain Names or directly in your domain provider, in the DNS configuration, making a redirection.
Creating an API Gateway (REST API)
You could also, if you need it, use multiple methods such GET, POST, UPDATE, DELETE, … if you created a REST API Gateway :
You can then use your Lambda function for each methods you want to use.