AWS help required

is it possible to upload my node.js server side code to aws for free. I created my database on Mongodb. I created the cluster in mongodb. But it is too slow! Do you have any suggection where I can upload my data base for free. This project I created is not for commercial purpose. its only for adding to my portfolio

1

You get 750 hours per month of EC2 on the free tier. EC2 is generally what you would use for running a server application. Lightsail is similar, and you get the same (750hrs), and it looks really good, but I haven’t used it so can’t comment much.

AWS provides a schemaless datastore, DynamoDB, and you get 25Gb storage on the free tier, seems pointless using Mongo when you have that available.

What the heck are you trying to do that involves using a cluster of MongoDBs for a personal portfolio project? And what are you trying to do that makes it slow?

Actually it is not a personal portfolio . I deployed back end heroku . some how I made it working! but there is a problem. Actually i use fs module. when user sign up , there should be a folder created for them. when I was running my back end code in my local machine , I found that there is no issue to create a folder for each user if they sign up.
This project is an api where user can book bus tickets online. if user book tickets, this tickets will be stored in their personal folder in server. but when my back end code is running on server(heroku), I don’t know whether folder is being created or not. but when I try to download ticket , it says invalid pdf. actully there was no issue to download ticket when code was running on my local machine

when user sing up, user has to search for user name. I implemented that such a way that when user type each letter in user name filed , server will check whether user name is available or not. I use onchange event to cross check whether user name is available or not. if user name is available, then only they can submit. This implementation I think I have to change .

You can’t save to a filesystem on Heroku, it has no persistent storage, so what you’re trying to do can’t work. On Amazon you’d normally use S3. However:

Saving actual tickets is slightly ridiculous. Physical tickets are an abstraction, they exist so that a person can have a physical version of some data. They have absolutely no meaning in the context of an application which stores ticket data in a database. You should just generate a PDF version when someone asks for a ticket, you don’t store those PDF tickets.

Being slow could be to do with a few things, none of which are likely related to Mongo, and the cause will be something you are doing: saving/reading from a physical filesystem, making huge amounts of API calls in a very short space of time, inefficient JS on the front or back end, unknown anyway, you need to work through the app and isolate exactly what is slow: JS has fairly good debugging tools, use them.

each letter user type , I do api call to cross check whether username is available or not each time user time each letter in user name input field using onChange event.
is that a bad idea?
remaining all working fine except pdf. Ya I am going to implement ticket downloading feature in front end. This project I did only to add to my portfolio. I will definitely share the link here.

I am really afraid of using aws server. it’s asking for debit/credit card. As I am not familiar with terms and conditions of amazon , I don’t prefer to do that. do you have any idea there is any possibility of loosing amount from our bank account if we use free amazon server?

If you go over the set limits of the free tier they will charge you, yes. However, there is no reason why you can’t, for example, host the Node app on Heroku then store files on S3 and so on.

Is there any option not to cross the set limits?

https://aws.amazon.com/premiumsupport/knowledge-center/free-tier-charges/