This repository consists of lambda function code in python 3.8 that enables you to connect to AWS Opensearch domain which is deployed within a VPC.
- Add two environment variables to the lambda function.
- HOST - OpenSearch domain endpoint host
- API_STAGE - API gateway stage name
- Add a new role with the policy (use the contents of the proxy_lambda_policy.json) and attach it as the execution role of the lambda. Replace the with actual account id within the file.
- The zip file opensearch_proxy_lambda.zip contains the lambda function along with the dependant python 3.8 packages which can be uploaded to the lambda function code. If you are using a different python version, please use the corresponding packages.