1
votes

I have deployed an api through Amazon API gatway and I know It is possible to control access of GET/POST methods of resources through IAM user policies. This is mentioned here http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-control-access-using-iam-policies-to-invoke-api.html

For every new client I don't want to create new aws user everytime and assign new policies of access control. I want to create new API keys(Controlled by Amazon API gateway) for every new client and want to restrict resources through that. Is there any way to do so?

Please help.

2

2 Answers

2
votes

API keys cannot be used for authorization purposes. API keys only provide a boolean choice whether access to this endpoint is allowed or not (it cannot differentiate per user).

To implement authorization you have to use IAM or CustomAuthorizer functions.

AWS documentation on that topic

API keys are not meant as a security mechanism for controlling access to an API. To enable secure access control, use IAM permissions, custom authorizers or a Amazon Cognito User Pool.

1
votes

Try with cognito with authtenticate role.