Credential should be scoped to a valid region error

2

Using the Eclipse "Upload function to AWS Lambda" to upload trial Java Lambda function code to Lambda hosted in EU (Ireland), I get this error:

Failed to load iam role in EU West (Ireland): com.amazonaws.services.identitymanagement.model.AmazonIdentityManagementException: Credential should be scoped to a valid region, not 'us-west-2'. (Service: AmazonIdentityManagement; Status Code: 403; Error Code: SignatureDoesNotMatch; Request ID: c411e78c-eb09-11e7-ab2c-af0c632aa4a6)

I created an IAM user with admin permissions and API access and configured the access key in Eclipse. It can see the name of the Lambda function created in AWS but fails with this error at the next step.

rde2
已提问 6 年前11662 查看次数
5 回答
0

Did some more testing. I had to set the AWS Preferences Detault Region to US East (Virginia) to get this to work. Looks like this default region is being used in calls to IAM which accepts only us-east-1.
I would classify this as a bug in the Eclipse AWS pl

rde2
已回答 6 年前
0

I have the same problem. Trying to upload a new Lambda function to EU-west-1 and get the same error message. Also get it if I try and upload an updated Lambda function that I previously uploaded successfully some time back.

What's going on? why are we getting this error now? And how to we solve it?

101apps
已回答 6 年前
0

See my reply to myself ... I found I had to set the Default region to US East (Virginia) in Window -> Preferences -> AWS Toolkit -> Regions.
I believe that this region is used to form the endpoint when the plugin queries IAM for roles. IAM is in US East only so the request fails if the default region is not US East.

rde2
已回答 6 年前
0

thanks. made changes as you suggested and it works.

weird as it worked perfectly a week or 2 ago without your change. anyway just glad it's working again.

thanks for saving me a lot of wasted time

101apps
已回答 6 年前
0

Thank you so much!

Edited by: shingo on Jan 27, 2018 7:49 PM

shingo
已回答 6 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则