Live data from Hacker News

Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

aws.amazon.com

91–100 of 140 posts

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#91
post #66

Earlier quoted context omitted.

Do you have any feedback that I can pass along to the team? Post it here or email it to me (email in profile).

I'm in the same boat. If I would have to name one thing, it's that the configuration of API Gateway via the UI is unbearable if you have a nontrivial amount of routes (> 3). I need to configure Authorization, Error code mappings etc. for every route, although they are exactly the same. If there would be per-gateway defaults I can set with per-route overrides, that would cut down the setup time by 95%, which is the ma…

You could also write a quick script using their REST API, although that's a bit cumbersome (lot of IDs that need to be passed around after creation of each resource).

Still better than manual clicking in my opinion.

http://docs.aws.amazon.com/apigateway/api-reference/resource...

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#92
post #83

@hobofan, take a look at our recent API Gateway features and see if the greedy paths and pass-through settings provide what you're looking for (they're also supported by CloudFormation). We tried to simplify the "configure every route" problem, but always looking for additional suggestions to make API config easier. @jomamaxx (& others): Reducing latency (and latency variability) is a critical goal for our team. We'v…

The point is "serverless" is a sham. Your clients still need to rely on another service API Gateway to communicate with the outside world. So stop with this stupid marketing.

Your are selling a basic pubsub architecture as something "innovative" when the only real innovation is the pricing. That's the exact definition of marketing, and at the same time you are making the community of web developers sound like idiots that don't understand what a server is. You can make plenty of money without being missleading, why do you feel the need to use a misleading language ?

There is a server, period.

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#93
post #92
post #83

@hobofan, take a look at our recent API Gateway features and see if the greedy paths and pass-through settings provide what you're looking for (they're also supported by CloudFormation). We tried to simplify the "configure every route" problem, but always looking for additional suggestions to make API config easier. @jomamaxx (& others): Reducing latency (and latency variability) is a critical goal for our team. We'v…

The point is "serverless" is a sham. Your clients still need to rely on another service API Gateway to communicate with the outside world. So stop with this stupid marketing. Your are selling a basic pubsub architecture as something "innovative" when the only real innovation is the pricing. That's the exact definition of marketing, and at the same time you are making the community of web developers sound like idiots…

Of course there's a server, or do you think you're the only genius in the room who understands client server communication? "Serverless" is a legitimate phrase to describe a growing phenomenon. Most reasonable people read "serverless" as "server I don't have to admin", not "there is no server". No one wants to read your pedantic bloviating, get over it!

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#94
post #93
post #92

Earlier quoted context omitted.

The point is "serverless" is a sham. Your clients still need to rely on another service API Gateway to communicate with the outside world. So stop with this stupid marketing. Your are selling a basic pubsub architecture as something "innovative" when the only real innovation is the pricing. That's the exact definition of marketing, and at the same time you are making the community of web developers sound like idiots…

Of course there's a server, or do you think you're the only genius in the room who understands client server communication? "Serverless" is a legitimate phrase to describe a growing phenomenon. Most reasonable people read "serverless" as "server I don't have to admin", not "there is no server". No one wants to read your pedantic bloviating, get over it!

> Most reasonable people read "serverless" as "server I don't have to admin"

Most reasonable people find the "serverless" moniker obnoxious to begin with. If something doesn't require administration then call it "adminless", not "serverless"

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#95
post #94
post #93

Earlier quoted context omitted.

Of course there's a server, or do you think you're the only genius in the room who understands client server communication? "Serverless" is a legitimate phrase to describe a growing phenomenon. Most reasonable people read "serverless" as "server I don't have to admin", not "there is no server". No one wants to read your pedantic bloviating, get over it!

> Most reasonable people read "serverless" as "server I don't have to admin" Most reasonable people find the "serverless" moniker obnoxious to begin with. If something doesn't require administration then call it "adminless", not "serverless"

As others have said, serverless applies to the pricing model, in which it makes perfect sense, imo.

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#96
post #83

@hobofan, take a look at our recent API Gateway features and see if the greedy paths and pass-through settings provide what you're looking for (they're also supported by CloudFormation). We tried to simplify the "configure every route" problem, but always looking for additional suggestions to make API config easier. @jomamaxx (& others): Reducing latency (and latency variability) is a critical goal for our team. We'v…

I would want to know, how do I manage user credentials in AWS lambda. Lambdas are stateless, there is no session, so how do I keep track of which user is executing the current lambda?

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#97
post #94

Earlier quoted context omitted.

> Most reasonable people read "serverless" as "server I don't have to admin" Most reasonable people find the "serverless" moniker obnoxious to begin with. If something doesn't require administration then call it "adminless", not "serverless"

As others have said, serverless applies to the pricing model, in which it makes perfect sense, imo.

Yes we agree that "serverless" is pure marketing. as I already said.

> Your are selling a basic pubsub architecture as something "innovative" when the only real innovation is the pricing.

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#98
post #66

Earlier quoted context omitted.

Do you have any feedback that I can pass along to the team? Post it here or email it to me (email in profile).

I'm in the same boat. If I would have to name one thing, it's that the configuration of API Gateway via the UI is unbearable if you have a nontrivial amount of routes (> 3). I need to configure Authorization, Error code mappings etc. for every route, although they are exactly the same. If there would be per-gateway defaults I can set with per-route overrides, that would cut down the setup time by 95%, which is the ma…

You might want to play with https://github.com/awslabs/chalice

It gets you to hello lambda (python) in one shot, from the cli. Anything written down in one repo is going to be far more undertstandable than piles of hidden behaviors and obscure error messages. I think there's a new one on their blog for node.

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#99
One significant problem with the API Gateway / Lambda integration is that the protocol they use to communicate is JSON. JSON is a text-only encoding, i.e. anything that isn't valid UTF8 isn't valid JSON, and so if you need to pass something binary to/from the Lambda (e.g. an image), you need to base64 encode it, which I'm actually not even sure is at all possible with the API/GW templates. There are other issues, but this alone is a huge headache if you ever have to work around it.

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#100
post #83

@hobofan, take a look at our recent API Gateway features and see if the greedy paths and pass-through settings provide what you're looking for (they're also supported by CloudFormation). We tried to simplify the "configure every route" problem, but always looking for additional suggestions to make API config easier. @jomamaxx (& others): Reducing latency (and latency variability) is a critical goal for our team. We'v…

I would want to know, how do I manage user credentials in AWS lambda. Lambdas are stateless, there is no session, so how do I keep track of which user is executing the current lambda?

How do you do it with a load balanced stateless web server? People have been doing this 10 years, most language should have some frameworks or plugins around it....

Common is to give the client a cookie with a session id (KJASDJKASDASDS) in a cookie. Then in a RDBMS you store this (session KJASDJKASDASDS = User 1234)... and the first part of each web (or lambda call), you go look up the user by session and know who it is.

(You can also store the user ID directly in an encrypted cookie, but that has a few other problems)

Post reply on HN