Elastic Beanstalk might block certain routes by default. To ensure access to the Swagger UI:
Make sure that the web.config file (or similar configuration) exists in your project and is properly configured.
web.config