This example shows you how to store and retrieve files from S3. In this example we are using us-west-2 region so you should update this region into application.properties if you changed it.
Prior to start, please you create an account named s3-account and add this permissions AmazonS3FullAccess, AWSCloudFormationFullAccess in your IAM section from your aws console.
aws configure --profile s3-account
AWS Access Key ID [None]: ENTER_YOUR_ACCESS_KEY
AWS Secret Access Key [None]: ENTER_YOUR_SECRET_KEY
Default region name [None]: ENTER_USER_REGION
Default output format [None]: PRESS ENTER
aws cloudformation delete-stack --stack-name spring-cloud-s3-stack --profile s3-account
aws cloudformation create-stack --stack-name spring-cloud-s3-stack --template-body file://cloudformation/bucket.yml --profile s3-account
./mvnw spring-boot:run