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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ