When a polling Lambda reads messages it puts them in-flight during its execution. When it finished it deletes the message. But instead I want the Lambda to not delete the messages, but keep them inflight instead, and pass the receipt handle to an external process. This external process will use the message receipt and delete it on finishing.
Its difficult to say for sure, because it depends on how you set it up.
If you use event source mappings (ESM) to automatically invoke lambda based on your SQS queue then the Lambda automatically deletes the messages from the queue when your function finishes successfully:
When your function successfully processes a batch, Lambda deletes its messages from the queue.
The only way to make it not delete the messages upon completion of your function is to crash it:
If the function returns an error, all retries are attempted on the affected messages before Lambda receives additional messages from the same group.
Since purposely erroring out a function is not a good practice, I think the best way would be to have second SQS queue and simply re-broadcast the message for the second process.