spring-cloud-aws | Integration for Amazon Web Services APIs with Spring | AWS library

 by   spring-cloud Java Version: 2.2.6.RELEASE License: Apache-2.0

kandi X-RAY | spring-cloud-aws Summary

kandi X-RAY | spring-cloud-aws Summary

spring-cloud-aws is a Java library typically used in Cloud, AWS, Spring Boot, Spring applications. spring-cloud-aws has no vulnerabilities, it has build file available, it has a Permissive License and it has high support. However spring-cloud-aws has 18 bugs. You can download it from GitHub, Maven.

Spring Cloud for Amazon Web Services, part of the Spring Cloud umbrella project, eases the integration with hosted Amazon Web Services. It offers a convenient way to interact with AWS provided services using well-known Spring idioms and APIs, such as the messaging or caching API. Developers can build their application around the hosted services without having to care about infrastructure or maintenance.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              spring-cloud-aws has a highly active ecosystem.
              It has 566 star(s) with 374 fork(s). There are 103 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 73 open issues and 424 have been closed. On average issues are closed in 288 days. There are 7 open pull requests and 0 closed requests.
              It has a positive sentiment in the developer community.
              The latest version of spring-cloud-aws is 2.2.6.RELEASE

            kandi-Quality Quality

              OutlinedDot
              spring-cloud-aws has 18 bugs (1 blocker, 0 critical, 4 major, 13 minor) and 1788 code smells.

            kandi-Security Security

              spring-cloud-aws has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              spring-cloud-aws code analysis shows 0 unresolved vulnerabilities.
              There are 15 security hotspots that need review.

            kandi-License License

              spring-cloud-aws is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              spring-cloud-aws releases are not available. You will need to build from source code and install.
              Deployable package is available in Maven.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed spring-cloud-aws and discovered the below as its top functions. This is intended to give you an instant insight into spring-cloud-aws implemented functionality, and help decide if they suit your requirements.
            • Parse simple message listener container
            • Extract bean sub - elements
            • Generate the bean handler name
            • Creates the bean definition for sendToHandler method
            • Parse bean definition
            • Creates an instance of DataSourceFactory bean
            • Registers the user - tags map if necessary
            • Starts the downloader
            • Downloads a website from a URL
            • Parses buffered client definition
            • Resolve a destination
            • Parse the given element
            • Compares two DataSource information
            • Get default scheme names
            • Constructs and returns the data source
            • Get the default driver class names
            • Returns a property source for the given environment
            • Create an instance of the client
            • Converts the given message payload to the given target class
            • Parses the given XML element
            • Converts a message into a target class
            • Initialize the resolvers
            • Convert the payload to a binary string
            • Returns a string representation of the data source information
            • Initialize the message converter
            • Returns the composite property source
            Get all kandi verified functions for this library.

            spring-cloud-aws Key Features

            No Key Features are available at this moment for spring-cloud-aws.

            spring-cloud-aws Examples and Code Snippets

            Spring Boot - Auto configuration of a class that contains AutoWired dependencies
            Javadot img1Lines of Code : 38dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            @Component
            public class CommonCore { 
            
               @AutoWired
               ReadProperties readProperties;
            
               @AutoWired
               SqsListener sqsListener; // this will be based on spring-cloud-starter-aws-messaging 
            
               public CommonCore() {
                   Properties prop

            Community Discussions

            QUESTION

            SCDF S3 Source app (version 3.0.1) com.amazonaws.SdkClientException
            Asked 2021-Mar-10 at 20:49

            (SCDF 2.7.1 & Skipper 2.6.1) Deployment -> Local Kubernetes Instance

            (Starter App) Applications version 3.0.1 kafka docker

            Created a stream S3 Source -> Log, on deploy the 'S3 Source' app throws below exception. But the stream gets deployed and works as expected. Any info on how to get rid of the exception.

            com.amazonaws.SdkClientException: Failed to connect to service endpoint: at com.amazonaws.internal.EC2ResourceFetcher.doReadResource(EC2ResourceFetcher.java:100) ~[aws-java->sdk-core-1.11.792.jar:na] at com.amazonaws.internal.EC2ResourceFetcher.doReadResource(EC2ResourceFetcher.java:70) ~[aws-java->sdk-core-1.11.792.jar:na] at >com.amazonaws.internal.InstanceMetadataServiceResourceFetcher.readResource(InstanceMetadataServiceResour>ceFetcher.java:75) ~[aws-java-sdk-core-1.11.792.jar:na] at com.amazonaws.internal.EC2ResourceFetcher.readResource(EC2ResourceFetcher.java:66) ~[aws-java-sdk->core-1.11.792.jar:na] at com.amazonaws.util.EC2MetadataUtils.getItems(EC2MetadataUtils.java:402) ~[aws-java-sdk-core->1.11.792.jar:na] at com.amazonaws.util.EC2MetadataUtils.getData(EC2MetadataUtils.java:371) ~[aws-java-sdk-core->1.11.792.jar:na] at >org.springframework.cloud.aws.context.support.env.AwsCloudEnvironmentCheckUtils.isRunningOnCloudEnvironm>ent(AwsCloudEnvironmentCheckUtils.java:38) ~[spring-cloud-aws-context-2.2.6.RELEASE.jar:2.2.6.RELEASE] at >org.springframework.cloud.aws.context.annotation.OnAwsCloudEnvironmentCondition.matches(OnAwsCloudEnviro>nmentCondition.java:38) ~[spring-cloud-aws-context-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108) >~[spring-context-5.2.13.RELEASE.jar:5.2.13.RELEASE] at >org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader$TrackedConditionEvaluator.>shouldSkip(ConfigurationClassBeanDefinitionReader.java:477) ~[spring-context->5.2.13.RELEASE.jar:5.2.13.RELEASE] at >org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConf>igurationClass(ConfigurationClassBeanDefinitionReader.java:131) ~[spring-context->5.2.13.RELEASE.jar:5.2.13.RELEASE] at >org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(Config>urationClassBeanDefinitionReader.java:120) ~[spring-context-5.2.13.RELEASE.jar:5.2.13.RELEASE] at >org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(Conf>igurationClassPostProcessor.java:331) ~[spring-context-5.2.13.RELEASE.jar:5.2.13.RELEASE] at >org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry>(ConfigurationClassPostProcessor.java:236) ~[spring-context-5.2.13.RELEASE.jar:5.2.13.RELEASE] at >org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostPr>ocessors(PostProcessorRegistrationDelegate.java:280) ~[spring-context-5.2.13.RELEASE.jar:5.2.13.RELEASE] at >org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(Po>stProcessorRegistrationDelegate.java:96) ~[spring-context-5.2.13.RELEASE.jar:5.2.13.RELEASE] at >org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractA>pplicationContext.java:707) ~[spring-context-5.2.13.RELEASE.jar:5.2.13.RELEASE] at >org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:5>33) ~[spring-context-5.2.13.RELEASE.jar:5.2.13.RELEASE] at >org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServer>ApplicationContext.java:143) ~[spring-boot-2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) ~[spring-boot->2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) ~[spring-boot->2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405) ~[spring->boot-2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot->2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) ~[spring-boot->2.3.9.RELEASE.jar:2.3.9.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot->2.3.9.RELEASE.jar:2.3.9.RELEASE] at >org.springframework.cloud.stream.app.s3.source.kafka.S3SourceKafkaApplication.main(S3SourceKafkaApplicat>ion.java:29) ~[classes/:na] Caused by: java.net.SocketTimeoutException: connect timed out at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:na] at java.base/java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[na:na]

            ...

            ANSWER

            Answered 2021-Mar-10 at 20:49

            This is a known issue, but I'm not sure how to fix it, since it occurs in the amazon SDK. I recommend you submit an issue in github so we can track it.

            Source https://stackoverflow.com/questions/66571502

            QUESTION

            Is there a way to add a ErrorHandler or ExceptionHandler to SqsListener?
            Asked 2020-Dec-07 at 20:33

            I have an SqsListener using a custom QueueMessageHandlerFactory with a message converter to go from JSON to POJO and back. If for whatever reason the listener method can't parse the JSON body in a message, it will throw a org.springframework.messaging.converter.MessageConversionException. I want to catch this exception and log it properly. I know that JMS listeners allow you to add a custom ErrorHandler as part of the Factory definition.

            Is there a similar way to define a custom ErrorHandler to catch this exception using Spring's SqsListener and log it?

            Thanks!

            ...

            ANSWER

            Answered 2020-Dec-07 at 20:33

            Nevermind, seems like all I need to do is add a @MessageExceptionHandler annotation to my custom handler:

            Source https://stackoverflow.com/questions/65187542

            QUESTION

            java.lang.ClassNotFoundException: org.apache.log4j.Logger
            Asked 2020-Oct-06 at 07:52

            I am trying to run a Spring Application but it keeps throwing this error:

            "Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: org/apache/log4j/Logger] with root cause

            java.lang.ClassNotFoundException: org.apache.log4j.Logger"

            Below is the stack trace of the error.

            ...

            ANSWER

            Answered 2020-Oct-05 at 08:34

            Ok. The faulty line here is:

            Source https://stackoverflow.com/questions/64204485

            QUESTION

            SpringBoot Application fails startup when adding dependency
            Asked 2020-Sep-19 at 18:51

            I have an existing SpringBoot Application that was running with no issue. I then created a Java library—a standalone repository with only static Java code, no main class. My library is deployed as a GitHub Maven package.

            I then proceeded with setting up my GitHub packages repository in my local Maven settings and added the dependency to my original SpringBoot application. The import process is successful, my library's Jar is in the classpath and compilation and build are successful.

            What happens next is I run the application now, and I get the following stacktrace:

            ...

            ANSWER

            Answered 2020-Sep-19 at 18:51

            You're using different versions of spring-boot-starter-parent (2.3.1.RELEASE and 2.3.4.RELEASE) which is probably leading to inconsistent versions where the later or earlier don't have the method. Try using 2.3.4.RELEASE in your application.

            [Update]

            You're still getting inconsistent versions of org.springframework:* on the classpath:

            Source https://stackoverflow.com/questions/63970992

            QUESTION

            AWS SDK 1.11.844 is throwing Continuously ERROR while connecting to Kinesis Stream
            Asked 2020-Sep-05 at 09:20

            I am Using Spring Cloud Data Stream and Kinesis Spring Binder to connect to Kinesis: https://github.com/spring-cloud/spring-cloud-stream-binder-aws-kinesis/blob/master/spring-cloud-stream-binder-kinesis-docs/src/main/asciidoc/overview.adoc By default, it uses aws-sdk 1.11.415 and which can't be used for Assumed Role while deploying in Kubernetes environment (AWS EKS). I have figured out that I need to upgrade the library to aws-sdk 1.11.844 to support the WebIdentityToken based credential provider. This is working in Kubernetes. Now from my local machine, I am trying to connect to Kinesis by enabling instance profile (disabling the WebIdentityToken based flow), it keeps on throwing below error and not connecting. when I comment this upgraded library it goes back to aws-sdk 1.11.415 which is working as expected. But I need to upgrade this for WebIdentityToken based credential provider.

            Please help me if anybody having any solution for this. I can't change to AWS SDKV2 as Spring Binder will not support that. Any other solution will be helpful.

            ...

            ANSWER

            Answered 2020-Sep-02 at 22:28

            The problem is that your local machine doesn't have an instance profile.

            If you look at the stack trace, you'll see EC2MetadataUtils.getItems(). This is trying to read from the instance metadata endpoint, http://169.254.169.254. On an EC2 instance that returns quickly; on your local machine it will time-out because that IP address doesn't exist.

            If you're looking to consume AWS services from your local machine, you will have to use a credentials provider that retrieves the information locally. I recommend using DefaultAWSCredentialsProviderChain, which looks for local configuration (either in $HOME/.aws or via environment variables or system properties), and also supports instance profiles (in case you're running on an EC2 instance).

            Source https://stackoverflow.com/questions/63711899

            QUESTION

            Spring Boot - Spring Cloud AWS : region not found
            Asked 2020-Jun-23 at 09:50

            I have a Spring Boot, Spring Cloud AWS service, written to receive messages from an AWS SQS queue. Everything has been working fine within my own personal AWS account services with region set to "us-east-1", but when switching over to AWS GovCloud region "us-gov-east-1", receiving error message "The region 'us-gov-east-1' is not a valid region". Tracked down the problem to be related to pulling a real old version of the aws-java-sdk-core-1.11.415 library that does not contain the new GovCloud region within its Regions.enum object. Not really sure why this project is pulling in a very old transitive dependency of aws-java-sdk-core-1.11.415, as I believe the Spring-Cloud project is set to pull in aws-java-sdk-core-1.11.7xx. Granted, I may have done something wrong in my pom.xml configuration, but I can't seem to figure out why the project is pulling in an old old version of the aws-java-sdk-core library.

            I have been running for intial testing purposes with my default region set to with no problems:

            ...

            ANSWER

            Answered 2020-Jun-23 at 09:50

            To track down where did the old version of AWS Java SDK leaked in your code execute mvn dependency:tree. Study the tree and look where it comes from.

            To force the latest version of AWS Java SDK, import its BOM to your dependenciesManagement:

            Source https://stackoverflow.com/questions/62521556

            QUESTION

            AmazonS3 client org.xml.sax.SAXParseException when trying to listObjects
            Asked 2020-Mar-10 at 22:04

            I'm having some drama when running the listObjects(..) method of AmazonS3. I'm certain that my credentials are set up correctly as I am able to download individual files using s3Client.getObject(..). The logs read::

            com.amazonaws.SdkClientException: Failed to parse XML document with handler class com.amazonaws.services.s3.model.transform.XmlResponsesSaxParser$ListObjectsV2Handler Caused by: org.xml.sax.SAXParseException: Premature end of file.

            I understand that listObjects(..) does include in it's response some xml containing meta data. The code to reproduce the error is very simple. I can't see anything wrong here :(

            ListObjectsRequest listObjectsRequest = new ListObjectsRequest() .withBucketName(ENV.getProperty("cloud.aws.s3.bucket"));

            ObjectListing objectListing = amazonS3Client.listObjects(listObjectsRequest);

            Here is the version of spring-cloud-aws-context I am using:: org.springframework.cloud spring-cloud-aws-context1.2.1.RELEASE

            Does anybody have any insight? Or know away around this issue?

            Thanks in advance :)

            ...

            ANSWER

            Answered 2020-Mar-10 at 22:04

            Ok, I found the solution! The problem was with the permissions, apparently listObjects(..) requires it's own set of permissions. Specifically the 'ListBucket' action must be enabled.

            Source https://stackoverflow.com/questions/46117346

            QUESTION

            Spring boot startup error for AWS application : There is not EC2 meta data available
            Asked 2020-Jan-31 at 09:36

            I am getting the below error when I am trying to run a Spring boot-AWS application locally :

            There is not EC2 meta data available, because the application is not running in the EC2 environment. Region detection is only possible if the application is running on a EC2 instance

            My aws-config.xml looks like below :

            ...

            ANSWER

            Answered 2017-Aug-24 at 05:44

            Found the Issue. I was using spring-cloud-starter-aws-messaging for SQS messaging. The above dependency includes many Auto Detect classes which eventually was firing up even if they were not required.

            Instead I have used spring-cloud-aws-messaging which solved the issue along with many other auto detect issues.

            Source https://stackoverflow.com/questions/45818092

            QUESTION

            How to integrate AWS Secret Manager with Spring Boot Application
            Asked 2020-Jan-23 at 18:17

            I have a requirement to retrieve credentials from AWS Secret Manager, and I found that I need to add the gradle dependency for the following starter

            ...

            ANSWER

            Answered 2019-Jun-05 at 01:42

            I would like to share my findings on SecretManager integration with Spring Boot application.

            Step 1. Add spring-cloud-starter-aws-secrets-manager-config dependency in Spring Boot Application ( Gradle and Maven ways of adding dependency is different).

            Step 2. Add the following configuration in bootstrap.yml file.

            Source https://stackoverflow.com/questions/56194579

            QUESTION

            High Level Rest client 7.1.1 from Spring-Boot : java.lang.NoSuchMethodError: org.elasticsearch.action.bulk.BulkRequest.pipeline()Ljava/lang/String;
            Asked 2020-Jan-13 at 18:12

            I'm using the High Level Rest client from Spring-Boot. Specific version is 7.1.1 against an ES v6.4.3

            I'm getting the following error when I try to do a BulkRequest which are all IndexRequests

            ...

            ANSWER

            Answered 2019-Jun-04 at 20:12

            From the stacktrace I see that you are using Spring Boot 2.1.3. which uses Elasticsearch 6.4.3.

            You are then changing the RestHighLevelClient version to 7.1.1 but leave the version of org.elasticsearch:elasticsearch unchanged, that is where BulkRequest comes from. And the BulkRequest class in version 6.4.3 does not have a method named String pipeline(), whereas in version 7.1.1 this method exists.

            So you need to change the version for this dependency (and if you need other elasticsearch libs check them too) as well:

            Source https://stackoverflow.com/questions/56438019

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install spring-cloud-aws

            In order to setup Intellij you should import our coding conventions, inspection profiles and set up the checkstyle plugin. The following files can be found in the Spring Cloud Build project. Go to File → Settings → Editor → Code style. There click on the icon next to the Scheme section. There, click on the Import Scheme value and pick the Intellij IDEA code style XML option. Import the spring-cloud-build-tools/src/main/resources/intellij/Intellij_Spring_Boot_Java_Conventions.xml file. Go to File → Settings → Editor → Inspections. There click on the icon next to the Profile section. There, click on the Import Profile and import the spring-cloud-build-tools/src/main/resources/intellij/Intellij_Project_Defaults.xml file. To have Intellij work with Checkstyle, you have to install the Checkstyle plugin. It’s advisable to also install the Assertions2Assertj to automatically convert the JUnit assertions.
            Default Checkstyle rules
            File header setup
            Default suppression rules
            Project defaults for Intellij that apply most of Checkstyle rules
            Project style conventions for Intellij that apply most of Checkstyle rules
            checkstyle.header.file - please point it to the Spring Cloud Build’s, spring-cloud-build-tools/src/main/resources/checkstyle-header.txt file either in your cloned repo or via the https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt URL.
            checkstyle.suppressions.file - default suppressions. Please point it to the Spring Cloud Build’s, spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml file either in your cloned repo or via the https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml URL.
            checkstyle.additional.suppressions.file - this variable corresponds to suppressions in your local project. E.g. you’re working on spring-cloud-contract. Then point to the project-root/src/checkstyle/checkstyle-suppressions.xml folder. Example for spring-cloud-contract would be: /home/username/spring-cloud-contract/src/checkstyle/checkstyle-suppressions.xml.

            Support

            Documentation can be built by activating the `docs`profile in the maven build. If there is an ruby error like.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
            Maven
            Gradle
            CLONE
          • HTTPS

            https://github.com/spring-cloud/spring-cloud-aws.git

          • CLI

            gh repo clone spring-cloud/spring-cloud-aws

          • sshUrl

            git@github.com:spring-cloud/spring-cloud-aws.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular AWS Libraries

            localstack

            by localstack

            og-aws

            by open-guides

            aws-cli

            by aws

            awesome-aws

            by donnemartin

            amplify-js

            by aws-amplify

            Try Top Libraries by spring-cloud

            spring-cloud-netflix

            by spring-cloudJava

            spring-cloud-gateway

            by spring-cloudJava

            spring-cloud-kubernetes

            by spring-cloudJava

            spring-cloud-config

            by spring-cloudJava

            spring-cloud-sleuth

            by spring-cloudJava