DEV Community

loizenai
loizenai

Posted on

Amazon S3 – SpringBoot RestAPIs Upload/Download File/Image to S3

https://ozenero.com/amazon-s3-springboot-restapis-upload-download-file-image-to-s3

Amazon S3 – SpringBoot RestAPIs Upload/Download File/Image to S3

Amazon Simple Storage Service (Amazon S3) is object storage built to store and retrieve any amount of data from web or mobile. Amazon S3 is designed to scale computing easier for developers. In the tutorial, we build SpringBoot RestAPIs to upload/download files/images to Amazon S3.

Next post:

Technologies

  • Java 8
  • Maven 3.6.1
  • pring Tool Suite: 3.9.4.RELEASE
  • Spring Boot: 2.0.4.RELEASE
  • Amazon S3

Spring Amazon S3

– For init an AmazonS3 client, we use:


BasicAWSCredentials awsCreds = new BasicAWSCredentials(awsId, awsKey);
AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
            .withRegion(Regions.fromName(region))
            .withCredentials(new AWSStaticCredentialsProvider(awsCreds))
            .build();

– For upload S3 objects, we use:

More at:

https://ozenero.com/amazon-s3-springboot-restapis-upload-download-file-image-to-s3

Amazon S3 – SpringBoot RestAPIs Upload/Download File/Image to S3

Top comments (0)