clientconfiguration information when connecting through proxy #63
Comments
Hello @iamiddy currently it is not possible to specify an own client configuration. You can create your own custom aws service instance (e.g. AmazonEC2Client) and inject the client configuration there. We will add support to configure the ClientConfiguration soon. |
Hello @aemruli I went ahead and created a custom As it is right now the below code doesn't know about my proxy and ClientConfiguration in general
I know that I can use Thank you in advance for yet another tip |
Hi @iamiddy If you are java config then you can achieve this by creating a SimpleMessageListenerContainerFactory bean that sets your custom client: @Bean
public SimpleMessageListenerContainerFactory simpleMessageListenerContainerFactory() {
SimpleMessageListenerContainerFactory factory = new SimpleMessageListenerContainerFactory();
factory.setAmazonSqs(yourCustomClient);
return factory;
} If you are using the @sendto annotation then you must also define the client of the send to messaging template: @Bean
public QueueMessageHandlerFactory queueMessageHandlerFactory() {
QueueMessageHandlerFactory factory = new QueueMessageHandlerFactory();
factory.setAmazonSqs(yourCustomClient);
return factory;
} You can achieve the same with XML config: <aws-messaging:annotation-driven-queue-listener amazon-sqs="yourCustomClient" send-to-message-template="messageTemplateThatUsersYourCustomClient" /> |
Thanks @alainsahli this worked out well |
Hi, do you have some example how to configure AmazonS3Client in spring cloud when it is behind a proxy server? |
There you go @stanislasbonifetto
|
Thank @iamiddy your code clarifies me how i need to implement. Below you can see my implementation:
|
Hi, I tried the JavaConfig method for S3 and it worked fine. I can't get it to work for SQS. I keep getting connection time out. I tried with different return types AmazonSQSAsyncClient, AmazonSQSAsync, AmazonSQS. The program works if I use my personal wireless instead of the company wireless so that tells me that the clientconfiguration is not getting picked up and used. Any suggestions? Also, there was some mention about adding the ability to configure the client in the sping cloud aws framework itself but can't fond anything on the plans for that. Thanks, Ashvin |
Adding this feature is quite simple: extends class AmazonWebserviceClientFactoryBean and add a setter to inject a ClientConfiguration, then in method createInstance simply add lines : |
@eballetbaz do you have working example or reference ? |
|
…verter-for-messaging-templates Feature/composite converter for messaging templates
…ure/composite-converter-for-messaging-templates Feature/composite converter for messaging templates
Is there a way to Set optional proxy details on com.amazonaws.ClientConfiguration connecting through a proxy, am developing with spring-cloud-aws-version 1.0.0.RELEASE, spring-boot-version 1.2.2.RELEASE in spring-cloud-aws-autoconfigure. I want to be able to configure proxy details as follows
SO question here
The text was updated successfully, but these errors were encountered: