Git Product home page Git Product logo

aws-spring-boot's Introduction

AWS Spring Boot Autoconfigure and Starter

Often when working with AWS and Spring using the aws-java-sdk, we need to create clients for different services. This autoconfigure module when included in the pom, will create the required clients for the AWS services and put it in bean factory ready for injection.

There is already a project spring-cloud-aws from Spring under the Spring Cloud umbrella. However, for some people that can be an overwhelming amount of abstraction and would like to work with the native SDK. This can be useful to those people.

AWS credential management works the same way as the native SDK.

Region selection takes place with the following precedence:

  1. Region configured in application.properties / yml file
  2. If running on AWS (EC2 / Fargate) then, the region of the EC2 instance / ECS Cluster
  3. Default AWS Region

AWS Services Supported

As of now, Supports the following AWS Services (i.e. create AWS Clients bean for the service)

  1. Simple Storage Service - S3 (AmazonS3)
  2. Simple Queue Service - SQS (AmazonSQS, AmazonSQSAsync)
  3. Simple Notification Service - SNS (AmazonSNS, AmazonSNSAsync)
  4. Simple Email Service - SES (AmazonSimpleEmailService, AmazonSimpleEmailServiceAsync)

Packaging

This project is managed by maven, run mvn clean install

Using in Project

Just add the starter as a maven dependency:

<dependency>
    <groupId>org.ares</groupId>
    <artifactId>aws-spring-boot-starter</artifactId>
    <version>1.0.0</version>
</dependency>

Then autowire the required bean and use it

public class S3ObjectDownloader {
    
    @Autowired
    private AmazonS3 amazonS3;
    
    public void downloadObj(String bucket, String s3Key) {
        S3Obejct object = amazonS3.getObject(bucket, s3Key);
        // use the object
    }
}

aws-spring-boot's People

Contributors

vivekkr12 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

henryudorji

aws-spring-boot's Issues

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.