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
gefragt vor 6 Jahren11663 Aufrufe
5 Antworten
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
beantwortet vor 6 Jahren
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
beantwortet vor 6 Jahren
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
beantwortet vor 6 Jahren
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
beantwortet vor 6 Jahren
0

Thank you so much!

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

shingo
beantwortet vor 6 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen