Skip to main content
Inspiring
May 28, 2021 4:28 PM UTC
Question

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

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?

    This topic is closed to new replies. Start a new post to keep the conversation going.

    7 replies

    Inspiring
    Jun 10, 2021 10:17 AM UTC

    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
    TwoEdgeAuthor
    Inspiring
    Jun 24, 2021 4:12 AM UTC

    Glad to have a confirmation on that one!

    Translate
    BKBK
    Community Expert
    Community Expert
    Jun 24, 2021 7:25 AM UTC

    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
    TwoEdgeAuthor
    Inspiring
    Jun 3, 2021 5:41 PM UTC

    How do I file this as bug?

    Translate
    BKBK
    Community Expert
    Community Expert
    Jun 3, 2021 5:43 PM UTC
    quote

    How do I file this as bug?


    By @TwoEdge

    https://tracker.adobe.com

    Translate
    BKBK
    Community Expert
    Community Expert
    May 30, 2021 10:04 AM UTC

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

    Translate
    TwoEdgeAuthor
    Inspiring
    Jun 1, 2021 1:24 PM UTC

    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