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

Explorer ,
May 28, 2021 May 28, 2021

Copy link to clipboard

Copied

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?

Views

112

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
May 30, 2021 May 30, 2021

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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
Explorer ,
Jun 01, 2021 Jun 01, 2021

Copy link to clipboard

Copied

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?
 

Likes

Translate

Translate

Report

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
Explorer ,
Jun 03, 2021 Jun 03, 2021

Copy link to clipboard

Copied

How do I file this as bug?

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jun 03, 2021 Jun 03, 2021

Copy link to clipboard

Copied

quote

How do I file this as bug?


By @TwoEdge

https://tracker.adobe.com

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

 

Likes

Translate

Translate

Report

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