Unique API Keys for users

I have been searching around and I have not been able to find the best way to set unique API Keys for users. I will be using Cognito for sign up.

I will need the API Keys for web hooks that will be used by developers.

Any help getting me in the right direction would be greatly appreciated!

You could use the API Gateway built-in support for API keys. There is a soft limit of 500 which can be increased by request but Iā€™m not sure what the hard limit is. Perhaps talk to AWS first to make sure the hard limit is inline with your requirements. You could programmatically add new API keys using the post confirmation trigger in your Cognito User Pool.

If the API Gateway limits are too low then you could use a custom authorizer instead.

1 Like