0

First off: Yes I found this stackoverflow question already and I'm pretty sure I have done all the things described.

That said; I am currently in a situation where I try to get AWS api gateway up and running serving as a fornt-end to the batch jobs queue's. My final result would be something like making a post that would trigger the creation of a batch job in a specific queue.

I now have an REST API gateway setup with a userrole that is able to run batch jobs and also has full access to EC2 and api gateway. When I run a mock service and/or a dummy HTTP service all goes well. I get either my custom message or the mock message of status 200.

No matter what I try however I always get the same response (both in the UI as well as in Postman):

{
    "message": "Forbidden"
}

I have the API key enabled as well as CORS. Furthermore I am not limiting this by means of waf and/or firewall ruling. It is directly connected to the internet. I have setup a usage plan which covers my tests as well.

I have isolated my problem to the interaction with the batch module. When I use a mock service on the same API I get no errors.

The very minimal situation I could come up with is asking for the job definitions or queues which I took from this link. This can be seen in this screenshot from the Integration Request tab: enter image description here

Having done pretty much everything in the link at the top of this post I am out of options and/or ways to get this right.

What important thing am I missing?

JustLudo
  • 1,690
  • 12
  • 29
  • How are you running the "mock service and/or a dummy HTTP service"? Do you get the 403 if you hit the endpoint from Postman (or another package sending utility)? – Amos Long Nov 19 '20 at 21:24
  • 1
    Hi @AmosLong: This issue was from august and I have since abandoned it in favor of a different route. I can't really recall the details of my setup either. Still thanks for your response. – JustLudo Nov 20 '20 at 07:07
  • For future travelers: Note that in the DescribeJobQueues function documentation, the method is a POST method (the screenshot in the OP specifies GET). This may have had something to do with it. https://docs.aws.amazon.com/batch/latest/APIReference/API_DescribeJobQueues.html - HOWEVER...unfortunately I am getting the same error even with the POST method :/. Sigh. – Danny Bullis Dec 11 '20 at 04:15
  • Some steps I'm trying...check the IAM policy simulator to make sure it's not an IAM issue: https://policysim.aws.amazon.com/home/index.jsp – Danny Bullis Dec 11 '20 at 04:19
  • Ah...I think it's likely due to the need for a VPC Endpoint... – Danny Bullis Dec 11 '20 at 04:20
  • Nope, not VPC Endpoint... – Danny Bullis Dec 11 '20 at 04:31

0 Answers0