How do i integrate my website hosted on AWS(ec2) with splunk?
Depends on what do you want to "integrate". Do you want to collect events generated by your web app/web server? Do you want to collect metrics about your server? Do you want to embed reports from Splunk on your website? Do you want to be able to perform some action on your Splunk environment from your web app? Something else?
Just collecting the logs is a great start.
If you want to collect technical metrics about user interaction you can use the RUM integration as well.
And depending what your backend looks like you could use the opensource OpenTelemetry libraries to instrument your backend application that processes your web application data. There is even a free and opensource Splunk distribution of OpenTelemetry (including the collector) available.
At a high Level: