Can i implement the solution using cloudwatch?
I looked into AWS cloudwatch but I could only set up metrics for logins in general, not per user. Or should i use lambda triggers and RDS to count the user's login attempts?
Can i implement the solution using cloudwatch?
I looked into AWS cloudwatch but I could only set up metrics for logins in general, not per user. Or should i use lambda triggers and RDS to count the user's login attempts?
Copyright © 2021 Jogjafile Inc.
Cloudwatch as a service can only document your trigger. Like you mentioned, you could count occurences of violation as Metric and subsequently send an event beyond a predetermined threshold.
I have made positive experiences with Lambda triggers. You can easily implement this using the pre- and postAuthentication trigger. There is a related question and answer that sketches the solution:
Note that this might not be necessary if you want to avoid brute force attacks since AWS has built-in protection / rate limiting for the Cognito login endpoints.