Step-by-step tutorial for creating a Serverless backed React SPA on AWS

Awesome tutorial. Very helpful. Only thing I’d change is a easier way to go to previous/next page, something on the side, with the title of the next/previous page.

1 Like

Hi,
It’s really a great post. It is now my favourite bookmark: slight_smile:
If possible can you please give an example of how to use UnAuthenticated Identity in Cognito Federated Identities in Javascript.
I have a webapp which needs both UnAuthenticated and Authenticated Users to use other AWS services with subtle differences.

regards
Kiran

1 Like

Hi @fanjie, I am new to serverless and aws ecosystem. I am now working on a project creating api with server-less framework by following your tutorial. You said

The API functions are in ES6 and authenticated with Cognito User Pool

but (may be I missed the point) I saw iam is for api security than coginto. Where can I find how to setup cognito in YML file (currently, I put my pool arn under authorizer). Is it enough? Do I need to write code in handler as well for security.
Many thanks,
John

2 Likes

So we did make an update to the tutorial and we switched to use IAM as the authorizer. We still have the older version for reference - https://serverless-stack.com/chapters/changelog.html#v09-cognito-user-pool-as-authorizerhttps59caadbd424ef20abdc342b4--serverless-stacknetlifycom

But in both cases we still use the Cognito User Pool as the authentication provider. We updated the tutorial to use IAM since it ends up playing better with any other AWS services you might use in the future. Let us know if you have any other questions.

3 Likes

Thanks @jayair. It works now.

2 Likes

thanks a lot jayair, i appreciate it all very much! i also appreciate a lot OP for this post! i found some amazing ideas and advices here. will surely come back with updates and questions if i would have some!

2 Likes

We just updated Serverless-Stack.com with a new section on Serverless architecture and how to work with multiple services using AWS CloudFormation cross-stack references.

We weren’t able to find a lot of in-depth guides on this with working examples, so we decided to do a deep dive on it!

Check it out and let us know what you guys think.