Create the Notes taking app without accounts


#1

Hi,

I’m following the tutorial to create a note talking app, however I want my app to be slightly different: I don’t want accounts. Notes will not belong to any user and everyone can access notes.

What should I change to achieve that?

Thansk


#2

There are a few ways to do this but the one that would take the least amount of changes would be to set mandatorySignIn to false in the React app - https://github.com/AnomalyInnovations/serverless-stack-demo-client/blob/master/src/index.js#L12.

To enable Enable access to unauthenticated identities in your Identity Pool. And in your unauthenticated role, allow access to S3 and API Gateway.

In the above setup you don’t really need to create a User Pool and those parts can be completely skipped.

I might have missed something but that is roughly the steps.


#3

Hi Jayair,

Thanks for the reply. The thing is that I’m not using Identity Pool at all in my app.
Ive completely skipped those steps. Shall I still create and use the Identity pool?

Thanks


#4

So the Identity Pool gives you temporary credentials to access any AWS resources you connect to through the frontend. If you want to use S3 to upload from the frontend you need an Identity Pool.


#5

Thanks for the answer, but I don’t want to use S3. I only want to add/edit/delete records to the DynamoDB database. Is this at all possible without forcing people to create an account?


#6

If you are connecting to the DB through Lambda, you can leave out Identity Pool as well.

But just to be clear, creating an Identity Pool and allowing unauthenticated access does not require your users to create accounts.