Things to keep in mind:
1.- This code will upload a file given as input on a HTML Form.
2.- Postman is used to test/evaluate the REST API endpoint to upload a file into AWS S3 bucket and then into a directory.
Upload a file to AWS S3 by consuming a REST API exposed on Spring Boot
![](https://media.dev.to/cdn-cgi/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1173572%2F559076dd-fc31-431a-bd48-19ed5af74573.jpeg)