项目作者: himanshu-parmar-bigdata

项目描述 :
Spring cloud implementation of SQS and S3 Wrapper along with SQS processor
高级语言: CSS
项目地址: git://github.com/himanshu-parmar-bigdata/spring-cloud-aws-wrappers.git


Spring-Boot based Amazon S3 and SQS Wrapper Sample

  1. Spring Boot + Spring Cloud AWS

Description

This little demo project helps to understand:
1) How to create AWS Configuration for initalizing and injecting BasicAWSCredentials, amazonS3Client, SimpleMessageListenerContainer, QueueMessagingTemplate, AmazonSQSAsync(client)
2) How to create S3Wrapper to facilitate create and delete objects on S3
3) How to create SQSWrapper to facilitate create and delete messages on SQS

4) Create SQS listener for any arbitary SQS queue and start it as background server and configure it to read number of messages during each poll

How to Open

  1. IntelliJ -> Open -> build.gradle

Compile Setting

  1. Open IntelliJ Preference
  2. - Build, Execution, Deployment -> Compiler
  3. -> Check 'Make project automatically'

How to Run

  1. - application-example.properties rename to application.properties
  2. - set your AWS accessKey & secretKey
  3. - commands to run from terminal
  4. gradle build
  5. gradle bootRun
  6. URL to verify http://localhost:8080//api/aws/sqs/readMessage

API

  1. GET /api/aws/s3/list : List of Objects
  2. GET /api/aws/s3/download?key={key} : Download
  3. POST /api/aws/s3/upload : Upload
  4. GET /api/aws/sqs/readMessage : reads a message from SQS
  5. POST /api/aws/sqs/addMessage : push a message to SQS

Environment

  • Java 8
  • Spring Boot 1.3.0.M2
  • Spring Cloud AWS 1.0.2.RELEASE
  • Gradle 2.4