API Gateway access issue: Authentication Token not found

Hey everyone, I’m stuck with a problem while trying to use AWS API Gateway to call a Lambda Function. I’ve got it working when I set the Authentication type to NONE, but that makes the API public. Anyone could use it if they had the URL.\n\nI want to make it more secure, so I switched to using AWS_IAM for Authentication. I even added the AmazonAPIGatewayInvokeFullAccess policy to my user. But now I’m getting this error:\n\n\n{\n message: "Authentication Token not present"\n}\n\n\nI’m completely lost here. What am I doing wrong? Is there some step I’m missing in the setup process? Any help would be really appreciated!

I’ve encountered similar issues when transitioning from an open API to one that uses AWS_IAM authentication. In my experience, the key is to ensure that every API call is properly signed using AWS Signature Version 4. Without this signing, your request lacks the necessary credentials, which results in the authentication token error. I found that using AWS SDKs or the AWS CLI helps manage the signature process seamlessly. Adjusting your client configuration to include proper signing parameters usually resolves the issue.

Double-check your client setup to confirm that all signing steps are correctly implemented.

I’ve been down this road before, and it can be frustrating. The issue likely stems from how you’re making the API call. When using AWS_IAM, you need to sign your requests with AWS credentials. This isn’t automatic - you have to implement it on the client side.

What worked for me was using the AWS SDK for my programming language. It handles all the complex signing stuff behind the scenes. If you’re calling the API directly (like with cURL or Postman), you’ll need to manually sign the request, which is a bit of a pain.

Also, make sure your IAM user or role has the correct permissions to invoke the API. The AmazonAPIGatewayInvokeFullAccess policy is a good start, but you might need to tweak it depending on your setup.

Lastly, check if you’re including the ‘Authorization’ header in your request. Without it, API Gateway won’t know how to authenticate you, even if you’ve set up everything else correctly.

hey alice45, i’ve been there too. make sure ur using aws sdk or cli to handle the auth stuff. if ur doing it manually, u gotta sign the request with aws sig v4. also, check ur iam permissions - might need to add execute-api:Invoke for ur specific api. good luck!