How can i get information of my all iam users. when they login?

0

i wanted know which iam user is login, i want to get notified when they login with thier iam user!!

gefragt vor 6 Monaten203 Aufrufe
2 Antworten
1

You can use event bridge to monitor cloudtrail APi calls and send a message to an SNS topic. Theres a similar example here but specifically looking at AttachUserPolicy events. Replace this with ConsoleLogin

I believe this should work for you.

https://mng.workshop.aws/cloudtrail/alerts.html

profile picture
EXPERTE
beantwortet vor 6 Monaten
profile pictureAWS
EXPERTE
überprüft vor 6 Monaten
  • i already set consolelogin in eventbridge using cloudtrail but i receieved only 1 email from one iam account and but did not not get other users login information or notification(sns). and after 1 email it didnot send any email.

  • Do you mean 1 x iam user? This should trigger every time an IAM user logs into the console. Remember users stay logged in up to 12 hours unless they log out and in again

0

AWS makes requests based on API calls.

When accessing programmatically, including CLI, credentials are saved on the local PC and requests are made according to the permissions given to the credentials. Therefore, there is no login during this process.

However, if SSO is linked through Identity Center, SSO Login can be triggered from CLI. By analyzing Identity Center records in CloudTrail, you can see who has access to SSO. For detailed API call names, please check the official documentation [1].

In the management console, users log in with a password. This is not an API call, but it is recorded in CloudTrail. For example, in CloudTrail, if you collect records with an "eventSource" of "signin.amazonaws.com", you can determine which users are logged in. Please check the official documentation [2] for specific records.

[1] https://docs.aws.amazon.com/singlesignon/latest/userguide/sso-info-in-cloudtrail.html

[2] https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-aws-console-sign-in-events.html

profile pictureAWS
Bailey
beantwortet vor 6 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen