Deploy Next 13 app using AWS codebuild, code deploy, code Pipeline

I am trying to deploy Next 13 application using AWS code build and code pipeline. I have set up code build to take code from GitHub install node modules and create a build and take the output in .next folder and upload it to s3 Now my question is after downloading the code from s3 and downloading it on the ec2 server how can i run the .next to start the project. Any help would be appreciated.