I'm trying to invoke Entity Resolution APIs
IAM User Details:
- IAM User: user1
- Policy Name: AssumeRolePolicy
I generated Access key and secret for user1 and using those in my spring boot application.
Policy Attached to user1 (AssumeRolePolicy):
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::004724176825:role/scv-er-poc-er-service-sbox"
}
]
}
Role Details (scv-er-poc-er-service-sbox). This role has AWSEntityResolutionConsoleFullAccess policy attached to it.:
In Trusted Entities:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::004724176825:user/user1",
"Service": "entityresolution.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
Despite the policies and role configuration, an error occurs with the message:
User: arn:aws:iam::004724176825:user/user1 is not authorized to perform: entityresolution:GetMatchId on resource: arn:aws:entityresolution:eu-west.
Which is the step iam missing in this flow ?
My Java code :
@Bean
public EntityResolutionClient entityResolutionClient() {
AwsCredentials credentials = AwsBasicCredentials.create("<Access key>",
"<Secret>");
StaticCredentialsProvider staticProvider = StaticCredentialsProvider.create(credentials);
Region region = Region.EU_WEST_1;
EntityResolutionClient entityResolutionClient = EntityResolutionClient.builder()
.region(region)
.credentialsProvider(staticProvider)
.build();
return entityResolutionClient;
}

GetMatchIdpermissions?scv-er-poc-er-service-sbox. That is inheriting theGetMatchIdpermission through AWS managed policy ofAWSEntityResolutionConsoleFullAccess"Service": "entityresolution.amazonaws.com"from the trust policy and try again.Service": "entityresolution.amazonaws.com