Example API implementation mimicking the ec2-run-instances tool