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년 전11661회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠