I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!
Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution.
Please click "Accept" the answer as original posters help the community find answers faster by identifying the correct answer.
Issue:
Unable to access API endpoint in AWS from Azure VM
Resolution:
We have allowed the CIDR in On-prem and it started working. Since we have Express route connectivity b/w Azure and Onprem and Direct connectivity From On-prem to AWS.
Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.