I would like to create /public/* path for pass kubernetis ingress. I will share public data by using that looks like /public/document-count. Or should i use something like
import type { APIGatewayProxyEvent, Context } from 'aws-lambda'
import { logger } from 'src/lib/logger'
export const handler = async (
event: APIGatewayProxyEvent,
_context: Context
) => {
const path = event.path.replace('/public', '')
switch (path) {
case '/document-count':
return documentCountHandler(event, _context)
default:
return {
statusCode: 404,
body: { message: `${path} Not Found` },
}
}
}
const documentCountHandler = (
_event: APIGatewayProxyEvent,
_context: Context
) => {}