Error: Some AWS operations do not support assumed roles #19958
Labels
enhancement
Requests to existing resources that expand the functionality or scope.
service/iam
Issues and PRs that pertain to the iam service.
service/sts
Issues and PRs that pertain to the sts service.
Milestone
Community Note
Description
AWS services have operations that require a principal (e.g., an IAM user, role, or group). Sometimes these operations fail if an assumed-role ARN is passed in. Ideally, what you want is to grant/convey/designate the IAM source role so that the STS assumed role will have the benefit of the change, and the operation will succeed.
For example, in the Lake Formation service, you cannot make an assumed role a data lake administrator. If you try to, you receive this error:
However, if you pass in the source IAM role (
arn:aws:iam::123456789012:role/role_name
), the operation will succeed. The role will become an administrator and the person using the assumed role will have the benefit of the change as well.Another example is in Service Catalog. There you may get this type of similar error:
However, in the same vein, if you pass in the source IAM role, the operation will succeed.
A solution is to create a new data source call
aws_iam_session_context
to find the IAM source role of an STS assumed role. This data source should allow passing through IAM roles and users so that it can be used whether the role is STS or IAM and then everyone can use the same config.Affected Data Source
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: