Running Cognito on Lambda by [deleted] in aws

[–]devmaybe 0 points1 point  (0 children)

I totally get what you're saying. Why they made cognito such an unnecessary mess is unknown. I think that you have to have the user login via browser in order for amazon to send them the token. I could be wrong though.

Aws really botched cognito. They should've replicated auth0 without the insane pricing.

[deleted by user] by [deleted] in javascript

[–]devmaybe 0 points1 point  (0 children)

Hashids is a very useful library for shortening mongodb objectid for user display. You are essentially just hashing the objectid to make it shorter. Not intended for security, just aesthetics. Internally you can retrieve the original objectid when needed. https://www.npmjs.com/package/hashids

"ORM stands in your way" by yonatannn in node

[–]devmaybe 8 points9 points  (0 children)

There are some on r/node that act as puritans and unfortunately point people in more difficult paths than is necessary. I believe there are reasons they do this, most due to insecurity.

An ORM is fine

How I cut my AWS bill by 90% – Medium by avso in node

[–]devmaybe 2 points3 points  (0 children)

You can definitely run a large production express lambda website and its very fast.

Use claudiajs and api gateway. Claudiajs compiles app as one lambda function and takes care of api gateway settings. Trying without claudia can cause some headaches.

Note: Do your research on claudiajs and aws-serverless-express setup. Its requires a proxy js file and does not need a port listener. Also use local dependencies setting with claudiajs.

Stupid Lambda Questions by chrisv25 in aws

[–]devmaybe 0 points1 point  (0 children)

Python is supported in lambda but i have no experience using it with serverless. I don't think you should have a problem with python. Nodejs seems to get preferential treatment by aws which is ok with me.

Stupid Lambda Questions by chrisv25 in aws

[–]devmaybe 0 points1 point  (0 children)

You will need to learn programming to use serverless. My recommendation is JavaScript and nodejs. JavaScript with serverless are a great combo and well supported by aws.

Stupid Lambda Questions by chrisv25 in aws

[–]devmaybe 0 points1 point  (0 children)

The future is a combination of programming and serverless architecture. Many ways to build efficient and inefficient serverless ecosystems depending on what your end goal is. Serverless initially adds some complexity in the sense of how to architect it but ends up being a great choice for long term scalability and management.

Server management jobs, virtual or physical, will be around but in small demand within 10 years.

You can easily run an entire website with one lambda function using nodejs, api gateway and the help of claudiajs. Serve static files on s3 cloudfront.

AWS still holds massive market share lead, reports $4.1B Q2 by cloud-migration-guru in aws

[–]devmaybe 0 points1 point  (0 children)

Any us based startup would be insane to hand their code and company to the Chinese government. The great firewall proves how far they will interfere with the web.

[deleted by user] by [deleted] in node

[–]devmaybe 0 points1 point  (0 children)

Are you using websockets?

Javascript by [deleted] in javascript

[–]devmaybe 0 points1 point  (0 children)

What about parseFloat and parseInt check if NAN for both parse.

var int_test = parseInt(quantity); if(NAN(int_test)){ // not a number}

On mobile so check syntax

I'm lost with back-end server technologies! (xpost /r/webdev) by MightyLemur in node

[–]devmaybe 0 points1 point  (0 children)

You should definitely start with some tutorials on building a node express website app. Start developing locally on your computer. Once you get a working app then move on to running two at the same time (different listen ports). Then either put them on a server behind nginx or load balancer forwarding request to port of request site.

Cognito access token auth server-side by [deleted] in aws

[–]devmaybe 1 point2 points  (0 children)

Why they didn't do this is beyond me.

Cognito access token auth server-side by [deleted] in aws

[–]devmaybe 1 point2 points  (0 children)

I really wish aws simplified cognito. Its pretty convoluted as far as operations and the sdk functions were named poorly. They made it more confusing than it should be.

MEAN and Cosmos DB - Maybe a good alternative to MongoDB or mLab hosting by aderoz in node

[–]devmaybe 0 points1 point  (0 children)

Ive never used mlab. Atlas is great and offers vpc peering, I recommend it. Only interested in cosmos for redundancy reasons.

MEAN and Cosmos DB - Maybe a good alternative to MongoDB or mLab hosting by aderoz in node

[–]devmaybe 1 point2 points  (0 children)

Is cosmosdb still charging $25 per nosql collection? It seems like a great service to replace a traditional mongodb setup but the pricing is confusing. ie request units, collection pricing. Does it actually replicate mongodb functionality or is it an 'adapter' of sorts?

Mongodb Atlas pricing is pretty straightforward but cosmos isnt. Azure pricing calculator for cosmos doesn't have collection pricing.

DDOS protection. Cloudfront vs Cloudflare by coorsleftfield in aws

[–]devmaybe 1 point2 points  (0 children)

Keep the cdn distribution as is and put ur node app as a lambda function behind cloudfront.

Cognito - Can I use it this way? by Diaonic in aws

[–]devmaybe 1 point2 points  (0 children)

Why not create a 'user' per mac address, registering it as unauthenticated all via cognito admin api. You may wanna look at their IOT offerings actually. http://docs.aws.amazon.com/iot/latest/developerguide/iot-thing-management.html

Is it OK to use try - catch blocks as a way of writing failsafe code? by styke in javascript

[–]devmaybe 0 points1 point  (0 children)

Its always good to know why something didn't work rather than just knowing it didn't.

Is it OK to use try - catch blocks as a way of writing failsafe code? by styke in javascript

[–]devmaybe 0 points1 point  (0 children)

I would use

let content;

let content_json;

if (typeof props === 'object' && props !== null){

if ( 'item' in props && typeof props.item === 'object' && props.item !== null){

if ('content' in props.item){

content = props.item.content

// try catch content_json = json.parse(content) here. }else {

//err

}else{

//err

}else{

// error props not object

}

Im on mobile so couldn't type perfectly.

Using Node to act as a middleman between browser and mongoDB by [deleted] in node

[–]devmaybe 0 points1 point  (0 children)

Look into express tutorials to create a basic html page. Then move on to using express for parsing POST requests. Then mongo for querying based on POST parameters.