Passer au contenu

AWS SSO user Synced trigger

0

Im using aws SSO, i want a triggering mechanism to lambda whenever a new user is sunced to identity center. i will add the user to AD, within 40min it will appear in aws soo users. when it appears i want to trigger a lambda to create permission set. So what the trigger i can use

demandé il y a 5 mois92 vues
1 réponse
0
Réponse acceptée

To trigger a Lambda function when a new user is synced to AWS IAM Identity Center (formerly AWS SSO), you can use Amazon EventBridge (formerly CloudWatch Events) to monitor and respond to these events.

You can set up an EventBridge rule with a pattern that specifically targets user creation events in IAM Identity Center. Here's how you can configure it:

  1. Create an EventBridge rule with the following event pattern:
{
"source": ["aws.sso"],
"detail-type": ["AWS API Call via CloudTrail"],
"detail": {
"eventSource": ["sso.amazonaws.com", "sso-directory.amazonaws.com"],
"eventName": ["CreateUser"]
}
}
  1. Set your Lambda function as the target for this EventBridge rule.

  2. Ensure that CloudTrail is properly configured to log these events.

This setup will trigger your Lambda function whenever a new user is created in IAM Identity Center, allowing you to programmatically create permission sets for the new user.

Note that if you're using an external identity provider like Active Directory, the event will be generated when the user is synced to IAM Identity Center, not when you add the user to AD. The 40-minute sync delay you mentioned is the time it takes for AD changes to propagate to IAM Identity Center, and the EventBridge rule will trigger after this synchronization completes.

Also, be aware that if your identity source is configured as "SCIM" for automatic provisioning, user management happens through your external identity provider, and you'll need to ensure your EventBridge rule is properly capturing these provisioning events.
Sources
Need some help with my setting(EventBridge) | AWS re:Post
AWS SSO - Manage Users | AWS re:Post

répondu il y a 5 mois
AWS
INGÉNIEUR EN ASSISTANCE TECHNIQUE
vérifié il y a 5 mois
AWS
EXPERT
vérifié il y a 5 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.