As Prabhat mentions, boto3 is certainly an option, however, the AWS SDK for Pandas (previously AWS Data Wrangler) is a super simple approach. I've used it extensively for moving data from CSVs, S3, and other locations into OpenSearch with ease.
Using the AWS SDK for Pandas, you might achieve what you're looking for like this...
import awswrangler as wr
from opensearchpy import OpenSearch
items = wr.s3.read_json(path="s3://my-bucket/my-folder/")
# connect + upload to OpenSearch
my_client = OpenSearch(...)
wr.opensearch.index_df(client=my_client, df=items)
The AWS SDK for Pandas can iterate over chunks of S3 items, and there's a tutorial on indexing JSON (and other file types) from S3 to OpenSearch.
Of course, you would need to create a Lambda layer to make the package available in your function. Here is a (pretty much) one-click script to do this.