I have a number of lambda functions exposed via the AWS Gateway Service as such:
- /some-resource
GET
POST
OPTIONS
- /some-other-resource
GET
POST
OPTIONS
- /some-public-resource
GET
OPTIONS
The resources are secured with Access Tokens. However, I would like to allow anonymous access to the /some-public-resource
resource, so that it can be accessed without requiring any authentication.
I have tried to create a policy in IAM for that resource's ARN (although I am not sure that I got the Gateway API Resource ARN correct as I couldn't find any documentation on how to set this value), however, I am still unable to access that end-point without an access token.
Does anyone have an idea of whether or not there is an additional step I need to take, or if there is something else I have done wrong?
You can access your private API using endpoint-specific DNS hostnames. These are public DNS hostnames containing the VPC endpoint ID or API ID for your private API. To use the Amazon Web Services Documentation, Javascript must be enabled.
Sign in to the API Gateway console at https://console.aws.amazon.com/apigateway . Choose your API. Note your API's invoke URL. Copy your API's invoke URL, and enter it in a web browser.
Amazon API Gateway provides security using access keys to control API access. It works with AWS Identity and Access Management and Amazon Cognito to authorize access to APIs. The service also supports AWS Signature Version 4 as another security option; creating access keys for each API call.
You could disable any authorization and API key requirement from the console as follow:
This step must be applied to the whole set of methods (POST, PATCH, DELETE, and so on) in your resource /some-public-resource
.
Click on Method Request link (invokeworker2
= some-public-resource
)
Then, disable Authorization and API key Required
Like I said, you need to do that for every method in your resource /some-public-resource
.
Now, your resource /some-public-resource
is open and clients won't need to pass any tokens for authorization.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With