Giter Club home page Giter Club logo

spring-cloud-s3's Introduction

Getting started

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.

1. Create a profile into AWS CLI using this command

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    

2. Delete the **spring-cloud-s3-stack ** stack if exists

aws cloudformation delete-stack  --stack-name spring-cloud-s3-stack --profile s3-account

3. Create **spring-cloud-s3-stack ** stack into aws

aws cloudformation create-stack  --stack-name spring-cloud-s3-stack --template-body file://cloudformation/bucket.yml --profile s3-account

4. Start the Spring Boot application

./mvnw spring-boot:run

5. Send a POST request to http://localhost:8080/api/file/image using POSTMAN to save Image File into S3.

6. Send a GET request to http://localhost:8080/api/file/image/{image_name} using POSTMAN to retrieve Image File from S3.

7. enjoy it!

spring-cloud-s3's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.