Closed ConradBoydElliottGustafson closed 3 years ago
Turning on auditing for a user pool under advanced security gives some default logging:
These cloudwatch events are nice to make widgets in the console for graphing and easy to setup email notifications.
Cognito API events are logged into cloud trail, e.g creating a pool, deleting a pool by default. Saved for 90 days but can be saved into an S3 butcket for longer life. More information here
for more granular logging, lambda functions can be setup, which support triggers like pre-authentication. See here for a full list of available triggers.
If logging with a pre-authentication trigger you can see the identity provider used in the attempt, along with timestamp and user information. So generating an audit log of sign in attempts and ID providers is possible.
There isn't a failed auth trigger though, only a post-auth (successful authentication) trigger. So auditing failed auth attempts could be tricky.
Answer some questions: