It sounds like you're trying to query batch inference results in a real-time web application... Which is a little surprising as wouldn't a Personalize "Campaign" for real-time inference seem like a better fit here? In that case you'd be able to call the GetRecommendations API or similar for a user ID on-demand.
But assuming you have a use case that does require batch Personalize inference and real-time querying:
In general (as shown in the examples here in the developer guide), Personalize batch inference results are in JSON-Lines format: Each file being a newline-separated list of JSON objects.
It's possible to use S3 Select to query a subset of records directly from an object in S3 (examples here). You could also consider Amazon Athena (e.g. blog post here) for querying across multiple sharded files.
However, depending on your usage profile and latency requirements, you may want to index the batch job results into some kind of database for retrieval instead of querying the batch files each time. For example, DynamoDB could give very fast performance for indexing and querying recommendations by user ID. You could consider AWS Glue to implement this ETL from S3 to DynamoDB/database in a serverless but scalable way.
Finally, regardless of whether you're using a direct S3 API or a database (or a Personalize real-time campaign), your application client will need some IAM-linked authentication to demonstrate it's allowed to access your data. This might be with Amazon Cognito or some other approach. the personalization-apis sample shows several options proxying through API Gateway.
AWS Batch: Is there any AWS Batch API to retrieve the job by tag?asked 9 months ago
How to manage backup of each service in AWS Batchasked 2 months ago
AWS Batch - Job Stuck in RUNNABLE stateasked 4 years ago
xgboost sagemaker batch transform job output in multiple linesAccepted Answerasked 2 years ago
Running each BATCH job on dedicated instance. How to?asked 3 years ago
How does sagmaker batch inference processes individual files?asked 6 months ago
Read output json files | Batch Recommendations Inference Jobasked 5 months ago
How to use custom retry code for Batch jobasked 2 years ago
First Batch job fails with CannotPullContainerErrorAccepted Answerasked 8 months ago
how to log error/messages in while running a sagemaker batch transform job?asked 4 months ago