Skip to content

Instantly share code, notes, and snippets.

@adieuadieu
adieuadieu / handler.js
Last active May 27, 2024 19:07
AWS OpenSearch Cluster with Serverless Framework
const aws4 = require('aws4')
const host = process.env.OPENSEARCH_ENDPOINT
module.exports.default = async function handler(
event,
context,
) {
const fetch = (await import('node-fetch')).default
const indexName = 'example'