0

I am trying to use AWS Polly inside of ColdFusion.

This works just fine

<cfscript>
cfexecute(
    variable = "standardOutput",
    name = "aws",
    arguments = "polly help",
    timeout = 100
);
</cfscript>

<h3>Results</h3>
<cfoutput><pre>#standardOutput#</pre></cfoutput>

This does not apart

<cfscript>
cfexecute(
    variable = "standardOutput",
    name = "aws",
    arguments = "polly describe-voices",
    timeout = 100
);
</cfscript>

<h3>Results</h3>
<cfoutput><pre>#standardOutput#</pre></cfoutput>

Thoughts

I suspect that cfexecute is running under different credentials than when I type it in on a command prompt. I wondering if I just need to pass in Amazon Web Services credentials somehow.

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
  • From my brother, who works with both AWS and CF: I believe you will need to pass UN/PW to your service. – Shawn Sep 20 '17 at 00:33
  • Please elaborate on what happens when you run the second code block. – Dan Bracuk Sep 20 '17 at 15:28
  • One note from our operations folks who do AMZ - Consider using the Java API rather than CF Execute for Polly. Link: http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/polly/AmazonPollyClient.html – Mark A Kruger Sep 20 '17 at 16:09
  • @DanBrucuk : It runs without error, but nothing is loaded into `standardoutput` either. – James A Mohler Sep 20 '17 at 20:19

1 Answers1

1

A couple of things had to be done to fix this.

  • I had to go to services and find the account that ColdFusion was running under.
  • I then had to go to c:\users\service running CF
  • Then create a folder called .aws
  • Create a credential file and config file.

And then it runs

Note that this was done on Windows 2016

James A Mohler
  • 11,060
  • 15
  • 46
  • 72