doctorray117 / minecraft-ondemand

Templates to deploy a serverless Minecraft Server on demand in AWS
Apache License 2.0
1.72k stars 119 forks source link

Permissions error, lambda can't access ECS #53

Closed irowberry closed 2 years ago

irowberry commented 2 years ago

I'm pretty inexperienced with AWS, and I went through the guide a few times, but the Lambda errors out when trying to start the service. I'm getting this error.

"errorMessage": "An error occurred (AccessDeniedException) when calling the DescribeServices operation: User: arn:aws:sts::XXXX:assumed-role/minecraft-launcher-role-mijbep5x/minecraft-launcher is not authorized to perform: ecs:DescribeServices on resource: arn:aws:ecs:us-west-1:XXXX:service/minecraft/minecraft-server because no identity-based policy allows the ecs:DescribeServices action",

I have the polices attached to the role, but I don't know what the assumed-role part of the arn means, or how to attach policies to it.

irowberry commented 2 years ago

I figured it out, I needed to change the region in the policy to us-west-1 as that's where my cluster was.