Serverless aws lambda function - AWS s3 + PDF + AWS gateway + AWS lambda

Job ID: 30684768

Budget: $150 – $250 USD

I need to be able to to make a dynamic proxy that will call a pdf from s3 and then quickly truncate the pages needed for just what was requested. here is how it works. On s3 I might have a 10 page pdf but I only want to serve pages 4-5. I would like to make a request like this to cloudfront

cloudfront.net/serverless/lamdba/biggerfile.pdf?pageSet=4,5&name=biggerfile_4-5.pdf

The request will come in and lambda at edge will take it in, fetch the pdf and then quickly rewrite a truncated pdf of just the 2 pages that were needed. youll notice its also going to take a file name parameter in the request and when its writing out the new file response it will name it this name biggerfile_4-5.pdf

lambda should be coded in python or nodejs and use serverless framework so its easy to deploy and test. open to other ideas if you know an easier way to maintain and deploy things like this without giving access to our AWS account.