Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CF2021 AWS SNS Error: "The httpClient and the httpClientBuilder can't both be configured."

Participant ,
May 28, 2021 May 28, 2021

I'm getting errors using some of the sample code (after adjusting for typos): https://helpx.adobe.com/coldfusion/using/integrate-coldfusion-amazon-sns.html

 

<cfscript>

//'archinet_aws_user_1' and 'snsConf' are aliases configured in the CFAdmin panel
// define the credential and the configuration aliases in the ColdFusion Admin
sns=getCloudService("archinet_aws_user_1","snsConf");
// code below.
</cfscript>

 

Throws this error:

"The httpClient and the httpClientBuilder can't both be configured."

 

Any one else encounter this?

849
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 30, 2021 May 30, 2021

If the aliases (string arguments) don't work, then try using the credential and config defined in Application.cfc (struct arguments).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 01, 2021 Jun 01, 2021

Thanks for responding.  I didn't post it, but no matter what variation I try to do it it still fails with the same error.  

For example:

<cfscript>
snsCred={
    "vendorName":"AWS",
    "alias": "snsCredAlias",
    "region":"us-east-1",
    "accessKeyId": "xxxxxxxxxxxxxxxxxxxx",
    "secretAccessKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
snsConf = {
            "alias":"snsConfAlias",
            "serviceName" : "SNS",
            "clientOverrideConfig":{
                "retryPolicy":{
                  "numRetries":4
                }
            },
            "httpClientConfig":{
                "maxConnections":50
            }
  
    }

try{
    snsObj = getCloudService(snsCred, snsConf);    
    }
catch(any excpt){
        writeDump(var="#excpt#", format="html", abort="true");
        //Throws: The httpClient and the httpClientBuilder can't both be configured.
    }

</cfscript>
 
Here is an excerpt from the stack trace:
java.lang.IllegalArgumentException: The httpClient and the httpClientBuilder can't both be configured. at software.amazon.awssdk.utils.Validate.isTrue(Validate.java:76) at software.amazon.awssdk.core.client.builder.SdkDefaultClientBuilder.resolveSyncHttpClient(SdkDefaultClientBuilder.java:240) at software.amazon.awssdk.core.client.builder.SdkDefaultClientBuilder.finalizeSyncConfiguration(SdkDefaultClientBuilder.java:210) at software.amazon.awssdk.core.client.builder.SdkDefaultClientBuilder.syncClientConfiguration(SdkDefaultClientBuilder.java:148) at software.amazon.awssdk.services.sns.DefaultSnsClientBuilder.buildClient(DefaultSnsClientBuilder.java:27) at software.amazon.awssdk.services.sns.DefaultSnsClientBuilder.buildClient(DefaultSnsClientBuilder.java:22) at software.amazon.awssdk.core.client.builder.SdkDefaultClientBuilder.build(SdkDefaultClientBuilder.java:119) at coldfusion.cloud.aws.sns.SNSClientImpl.<init>(SNSClientImpl.java:132) at coldfusion.cloud.aws.sns.producer.SNSProducer.getServiceHandle(SNSProducer.java:48) at coldfusion.cloud.aws.sns.producer.SNSProducer.getServiceHandle(SNSProducer.java:36) at coldfusion.cloud.CloudServiceAgent.getCloudService(CloudServiceAgent.java:35
 
Any thoughts? Has anyone actually tried this besides me and gotten it to work?
 
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 03, 2021 Jun 03, 2021

How do I file this as bug?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 03, 2021 Jun 03, 2021
quote

How do I file this as bug?


By @TwoEdge

https://tracker.adobe.com

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jun 10, 2021 Jun 10, 2021

This is a bug. We had the same issue and raised it with Adobe.

 

Seems SNS doesnt work at all out of the box.

 

https://tracker.adobe.com/#/view/CF-4211954

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 23, 2021 Jun 23, 2021

Glad to have a confirmation on that one!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 24, 2021 Jun 24, 2021
LATEST

The ticket says that Adobe has fixed it. If this is urgent to you, request a hot fix from them: cfinstal|at|adobe.com

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources