SuicideSheep
SuicideSheep

Reputation: 5550

How to restrict access from invoking API URL?

enter image description here

As shown above one of my lambda function HelloCloudGurus which trigger by API gateway and it can be triggered by the API link as below:

https://APIServiceID.execute-api.ap-southeast-1.amazonaws.com/prod/HelloCloudGurus

When I click on the link it shows that I can still access the link despite the Authorization has been set to AWS_IAM?

How to configure it so that it will validate signature on request and return me something like below?

{"message":"Missing Authentication Token"}

Upvotes: 0

Views: 362

Answers (1)

Vijayanath Viswanathan
Vijayanath Viswanathan

Reputation: 8541

Please use Cognito. You can still acheive it by API Gateway Custom Authorizer but Cognito is the right candidate for security. Have a read on below AWS documentation for custom authorizer,

http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html

Upvotes: 2

Related Questions