Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS API Gateway ARN

One of the things that drives me nuts is that AWS has loads of docs about the format of an ARN, but doesn't have any kind of generator to make you confident that the ARN is correct.

In IAM, I'm trying to set up a policy to allow access to an API Gateway and I've read the following docs about it:

  • http://docs.aws.amazon.com/apigateway/latest/developerguide/permissions.html#api-gateway-control-access-using-iam-policies
  • http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-apigateway
  • http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.iam.policies.arn.html

But I can't get any ARN to validate, even just a wide open API Gateway ARN. See screenshot:

open arn called invalid

What am I doing wrong here?

like image 507
Miles Avatar asked Aug 06 '16 21:08

Miles


People also ask

What is AWS API gateway?

What is Amazon API Gateway? PDFRSS. Amazon API Gateway is an AWS service for creating, publishing, maintaining, monitoring, and securing REST, HTTP, and WebSocket APIs at any scale. API developers can create APIs that access AWS or other web services, as well as data stored in the AWS Cloud .

How do I get my AWS API ID?

https://console.aws.amazon.com/apigateway/home?region={region}#/apis/{api-id}/... Show activity on this post. To add another answer, on the AWS console, access the "API Gateway", and look for your API, it is shown right there in the list.

How do I change the resource name in API gateway?

Under the Amazon API Gateway service, select APIs . You will see the list of your APIs. Now, click the little cog wheel in the top right corner of the API that you wish to rename... Simply change the name, hit save, and you're good!


1 Answers

From the documentation: To create an IAM policy using the Policy Generator in the IAM console, select Manage Amazon API Gateway as AWS Service to set permissions statements for apigateway and select Amazon API Gateway as AWS Service to set permission statements for execute-api.

If you are creating a policy to manage creating/editing your API, then you will need to select Manage - Amazon API Gateway and then use * to give permission for all resources. If you want to give permissions for specific resources, then use this format: (note that the service name is apigateway)

arn:aws:apigateway:region::resource-path-specifier.

If you are creating a policy to manage invoking your API, then you will need to select Amazon API Gateway and then use * to give permission for all resources. If you want to give permissions for specific resources, then use this format: (note that the service name is execute-api)

arn:aws:execute-api:region:account-id:api-id/stage-name/HTTP-VERB/resource-path-specifier.

like image 58
Balaji Avatar answered Sep 18 '22 05:09

Balaji