doctorray117 / minecraft-ondemand

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

Permissions error, lambda can't access ECS #53

Closed irowberry closed 1 year ago

irowberry commented 1 year 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 1 year 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.