Infosys interview question

How to setup the EC2 How to trigger aws lambda through api gateway