We're building a PDF service for internal use, to permit common operations like HTML to PDF, merging PDFs, extracting pages, convert to/from other formats, etc. We intend to use a queueing mechanism so everything would be async. The only thing we're trying to decide is whether or not we should front the queue with a REST API (so you'd post to a REST API and that would just write to a queue and return a response). If this was a public facing thing that we're providing for clients it would be a no-brainer, but given it's internal only, I'm trying to think of pros/cons.
When it comes to pros, I think people are used to reason around REST APIs, you can automatically publish documentation with something like Swagger, and you could also call it from a JS front-end directly (authenticating with oAuth/OIDC) if the need arose. You can also wrap more functionality into it. For example, for a conversion operation, you can upload the file through REST and the service takes care of saving in S3, then post message with the link in it.
Cons for REST, you're introducing another layer that may not be required. You now have HTTP in the middle and have to deal with that, including the network overhead that can go with that. If you have a ton of messages you want to get through, you may need to consider a bulk API call instead of making a gazillion REST calls.
Pros for direct to queue, you can just setup permissions for the queue and drop messages directly to it. HTTP is no longer really part of the equation, just know the message format and drop a message on a queue. Simplicity, to a certain degree (but maybe not, as shown by cons), less overhead.
Cons, you can't have anything external easily access this or a JS front-end (as far as I know). Also, you may need to manage multiple operations separately before you can post to queue. While you can send files through SQS, you may have limitations in size there that are best avoided. So you'd need to post files to S3 separately, then write to the queue, losing some of the simplicity you supposedly had from using a queue directly.
I'm leaning towards REST API. Any additional considerations anybody could point out?