Skip to content

Update aws identity center user info

0

I'm running aws identity center where we have created users and have setup that users are assigned to a q developer group will be allowed to use Amazon Q developer Pro (and get a license for it).

To allocate cost correct we want to update the cost center attribute under the Profile details->Job-related information->cost center

but we are having trouble to find api support for this ? What the AWS recommended way to update this or handle assigning cost for q developers to different cost centers ?

2 Answers
1

To update user attributes like the cost center in AWS IAM Identity Center, you have a few options:

  1. Using the IAM Identity Center console: You can manually edit user properties, including job-related information like cost center, through the IAM Identity Center console. Navigate to the user's Profile page, select "Edit" next to "Profile details," and update the cost center attribute under Job-related information.

  2. Using the AWS CLI or API: For programmatic updates, you can use the AWS CLI or API. The recommended way to update user attributes is by using the update-user-attributes command in the AWS CLI or the corresponding UpdateUserAttributes API operation. However, it's important to note that not all attributes may be directly modifiable through this method, especially for custom attributes like cost center.

  3. SCIM API: If you're using SCIM (System for Cross-domain Identity Management) for user provisioning and management, you can use the SCIM API's PATCH operation on the /Users endpoint to update user attributes. This method allows for partial updates to user information, including custom attributes like cost center.

  4. Identity Provider Integration: If you're using an external identity provider (IdP) like Okta or Microsoft Entra ID, you may be able to manage these attributes in your IdP and sync them to IAM Identity Center. This approach allows you to centrally manage user attributes and have them automatically updated in AWS.

For assigning costs for Amazon Q developers to different cost centers, the best practice would be to:

  1. Ensure that the cost center attribute is properly set for each user in IAM Identity Center.
  2. Use AWS Cost Explorer or AWS Cost and Usage Reports to analyze and allocate costs based on the user attributes, including the cost center.
  3. Consider using AWS Organizations and implementing a tag-based cost allocation strategy, where you can map the cost center attribute to resource tags for more granular cost tracking.

If you're having trouble finding specific API support for updating the cost center attribute, you may need to consult with AWS Support for the most up-to-date information on handling custom attributes or for guidance on the best way to implement this in your specific setup.
Sources
Edit Identity Center directory user properties - AWS IAM Identity Center
AWS IAM Identity Center Features – Amazon Web Services (AWS)
PatchUser - IAM Identity Center SCIM Implementation

answered a year ago

EXPERT

reviewed a year ago

  • 1: We have a lot of users and are running our code with IaC CICD pipelines and dont want manual updated 2: The update-user-attributes Is related to cognito-idp and this is an identity center user, so that api call is incorrect. 3 + 4: We are calling aws_identitystore_user so we are creating users with terraform

0

Based on the available information, here's how you can handle cost center attributes for IAM Identity Center users:

Using ABAC (Attribute-Based Access Control):

You can configure cost center attributes in IAM Identity Center using the aws:PrincipalTag condition key

This allows you to manage access and track costs based on cost center attributes

API Options for Updating User Attributes:

Use the sso-admin CLI command update-instance-access-control-attribute-configuration to configure ABAC attributes

For bulk updates of user attributes, you have several options:

Recommended Approaches: a) If using an external identity provider (IdP):

Configure the cost center attributes in your IdP (like Active Directory or Okta)

Pass these attributes through SAML assertion

IAM Identity Center will use these attributes for access control

b) If using IAM Identity Center as identity source:

Use the AWS Management Console to update individual user attributes

For bulk updates, consider using AWS Organizations and tag-based cost allocation

Create permission sets that include cost center tags

Example IAM policy using cost center attributes:

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:DescribeInstances" ], "Resource": "" }, { "Effect": "Allow", "Action": [ "ec2:StartInstances", "ec2:StopInstances" ], "Resource": "", "Condition": { "StringEquals": { "ec2:ResourceTag/CostCenter": "${aws:PrincipalTag/CostCenter}" } } } ] }

Define a consistent cost center tagging strategy

Use permission sets to manage access based on cost centers

Consider implementing automated solutions for bulk updates if needed

Regularly audit and review cost center assignments

Remember that if policies contain invalid attributes in their conditions, the policy condition will fail and access will be denied, so ensure your attributes are properly configured.

answered a year ago

  • We are not using IdP we are currently just having the users created from terraform in identity center

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.