Skip to content

[RAM] Unable to add service principals #9439

@jflim

Description

@jflim

I'm getting an error when I try to add a service principal for a RAM resource share with Moto.

According to the AWS API for RAM, it says "A service principal name, for example: service-id.amazonaws.com" is a possible principal value.
https://docs.aws.amazon.com/ram/latest/APIReference/API_ListPrincipals.html

There is some missing information here for the boto3 docs which don't mention service principals as a supported value but the AWS UI does have a spot for service principals
(https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ram/client/list_principals.html)

Would like some guidance on whether the linked line below can be removed, or if it is necessary. In my testing, when I removed the check, I was able to add service principals in moto without errors.
https://github.com/getmoto/moto/blob/master/moto/ram/models.py#L113

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions