My requirement is to deploy serverless wordpress and I have came through concept of lambda web adapter which is for response streaming between lambda and web application. For reference:
https://aws.amazon.com/blogs/compute/using-response-streaming-with-aws-lambda-web-adapter-to-optimize-performance/
With that reference, I have created a Dockerfile for install wordpress with lambda web adapter and the dockerfile is below
FROM public.ecr.aws/awsguru/php:82.2023.3.11.1 AS builder
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
COPY app /var/task/app
WORKDIR /var/task/app
RUN composer install --prefer-dist --optimize-autoloader --no-dev --no-interaction
FROM public.ecr.aws/awsguru/php:82.2023.3.11.1
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.7.1 /lambda-adapter /opt/extensions/lambda-adapter
COPY --from=builder /var/task /var/task
ADD nginx/conf/nginx.conf /opt/nginx/conf/nginx.conf
ADD php/php.ini /opt/php/php.ini
ADD php/etc/php-fpm.conf /opt/php/etc/php-fpm.conf
ADD php/php.d/extensions.ini /opt/php/php.d/extensions.ini
COPY bootstrap /opt/bootstrap
RUN chmod +x /opt/bootstrap
EXPOSE 8080
ENTRYPOINT /opt/bootstrap
I have prepared the docker image , push it to ECR then used SAM Template to deploy image on lambda with api gateway. After deployment, while testing the lambda function it shows execution succeed with 302 status code as follows
{
"statusCode": 302,
"headers": {
"server": "nginx/1.23.3",
"date": "Fri, 15 Sep 2023 10:22:57 GMT",
"content-type": "text/html; charset=UTF-8",
"transfer-encoding": "chunked",
"connection": "keep-alive",
"x-powered-by": "PHP/8.2.2",
"expires": "Wed, 11 Jan 1984 05:00:00 GMT",
"cache-control": "no-cache, must-revalidate, max-age=0",
"x-redirect-by": "WordPress",
"location": "http://127.0.0.1:8080/wp-admin/install.php"
},
"multiValueHeaders": {
"server": [
"nginx/1.23.3"
],
"date": [
"Fri, 15 Sep 2023 10:22:57 GMT"
],
"content-type": [
"text/html; charset=UTF-8"
],
"transfer-encoding": [
"chunked"
],
"connection": [
"keep-alive"
],
"x-powered-by": [
"PHP/8.2.2"
],
"expires": [
"Wed, 11 Jan 1984 05:00:00 GMT"
],
"cache-control": [
"no-cache, must-revalidate, max-age=0"
],
"x-redirect-by": [
"WordPress"
],
"location": [
"http://127.0.0.1:8080/wp-admin/install.php"
]
},
"body": "",
"isBase64Encoded": false
}
and while making request by api url in browser it was redirected to /wp-admin/install.php path but doesn't appear any page.

So give me a solution how to resolve it and tell me is it the right way to deploy serverless wordpress or there is any other method to achieve it.
Thanks Jose Guay. I refered the blog you said but now I'm facing issue in handler.php file as "PHP Notice: Undefined index: REQUEST_URI in /var/task/handler.php on line 17 PHP Notice: Undefined index: in /var/task/handler.php on line 35 PHP Notice: Undefined index: REQUEST_URI in /var/task/handler.php on line 17 PHP Notice: Undefined index: in /var/task/handler.php on line 35" so can you help me to sort out this.
Hello! As noted, the blogs are 3rd party and only intended to illustrate it is possible to do the implementation. I recommend reaching out to the blog owners and post the question to them for follow up.