Skip to content
This repository has been archived by the owner on Aug 8, 2018. It is now read-only.

Error: Cross-account pass role is not allowed #25

Closed
garnaat opened this issue Aug 30, 2015 · 5 comments
Closed

Error: Cross-account pass role is not allowed #25

garnaat opened this issue Aug 30, 2015 · 5 comments

Comments

@garnaat
Copy link

garnaat commented Aug 30, 2015

I'm trying to create the tst/resources/apigateway.json example and I am getting the following error:

2015-08-30 10:21:46,353 ERROR - Error creating API, rolling back
com.amazonaws.AmazonServiceException: Cross-account pass role is not allowed. (Service: null; Status Code: 403; Error Code: null; Request ID: 71dcdc35-4f22-11e5-8606-db848852249c)
    at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1182)
    at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:770)
    at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:489)
    at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:310)
    at com.amazonaws.hal.client.HalClient.invoke(HalClient.java:235)
    at com.amazonaws.hal.client.HalClient.putResource(HalClient.java:122)
    at com.amazonaws.hal.client.HalResourceInvocationHandler.invoke(HalResourceInvocationHandler.java:125)
    at com.sun.proxy.$Proxy34.putIntegration(Unknown Source)
    at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createIntegration(ApiGatewaySdkSwaggerApiImporter.java:431)
    at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createMethod(ApiGatewaySdkSwaggerApiImporter.java:386)
    at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.lambda$createMethods$1(ApiGatewaySdkSwaggerApiImporter.java:295)
    at java.util.HashMap$EntrySet.forEach(HashMap.java:1035)
    at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createMethods(ApiGatewaySdkSwaggerApiImporter.java:294)
    at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createResources(ApiGatewaySdkSwaggerApiImporter.java:261)
    at com.amazonaws.service.apigateway.importer.impl.sdk.ApiGatewaySdkSwaggerApiImporter.createApi(ApiGatewaySdkSwaggerApiImporter.java:93)
    at com.amazonaws.service.apigateway.importer.impl.ApiGatewaySwaggerFileImporter.importApi(ApiGatewaySwaggerFileImporter.java:48)
    at com.amazonaws.service.apigateway.importer.ApiImporterMain.execute(ApiImporterMain.java:101)
    at com.amazonaws.service.apigateway.importer.ApiImporterMain.main(ApiImporterMain.java:65)
2015-08-30 10:21:46,355 INFO - Deleting API pyhjculso0
2015-08-30 10:21:47,585 ERROR - Error importing API from Swagger

The profile I am specifying has administrator privileges in the AWS account. What am I missing?

Thanks

@garnaat
Copy link
Author

garnaat commented Aug 30, 2015

Oh, good grief. I forgot to edit the JSON file to put my actual account ID in there. Sorry.

@garnaat garnaat closed this as completed Aug 30, 2015
@Yaskier
Copy link

Yaskier commented Nov 23, 2015

I'm having the same issue @garnaat , where did you forget to put the account ID?

@auprabh
Copy link

auprabh commented Jun 8, 2016

Hi @garnaat, Would you kindly be able to advise how you resolved this issue please. I am facing the same issue though I have the Full Admin rights available. Thanks!

@garnaat
Copy link
Author

garnaat commented Jun 9, 2016

https://github.com/awslabs/aws-apigateway-importer/blob/master/tst/resources/swagger/apigateway.json#L88

There are a couple of other places where you have to replace the marker string with your actual account id.

@auprabh
Copy link

auprabh commented Jun 9, 2016

Oh thanks so much @garnaat for a quick reply!! That's indeed of great help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants