Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppStream 2.0 createStreamingURL -- Incorrect Endpoint #1189

seliger opened this issue Feb 19, 2017 · 3 comments

AppStream 2.0 createStreamingURL -- Incorrect Endpoint #1189

seliger opened this issue Feb 19, 2017 · 3 comments


Copy link

@seliger seliger commented Feb 19, 2017

I am attempting to write a PHP script that uses createStreamingURL() to shuffle users over to AppStream to run apps. However, when I attempt to do this, I am seeing the following in the debug output:

Fatal error:  Uncaught exception 'Aws\Appstream\Exception\AppstreamException' with message 'Error executing "CreateStreamingURL" on ""; AWS HTTP error: Client error: `POST` resulted in a `404 Not Found` response:

 Unable to parse error information from response - Error parsing JSON: unexpected character'

exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: `POST` resulted in a `404 Not Found` response:

' in /home/ubuntu/workspace/appstream-auth/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:111
Stack trace:
#0 /home/ubuntu/workspace/appstream-auth/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 /home/ubuntu/workspace/appstream-auth/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHtt in /home/ubuntu/workspace/appstream-auth/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php on line 192

If you notice, the URL it is sending the request to is Invoking the same call using the CLI with debugging turned on shows something different -- and it works:

2017-02-19 21:17:40,079 - MainThread - botocore.hooks - DEBUG - Event request-created.appstream2.CreateStreamingURL: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f0bb3cf5410>>
2017-02-19 21:17:40,080 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2017-02-19 21:17:40,080 - MainThread - botocore.auth - DEBUG - CanonicalRequest:


2017-02-19 21:17:40,080 - MainThread - botocore.auth - DEBUG - StringToSign:
2017-02-19 21:17:40,081 - MainThread - botocore.auth - DEBUG - Signature:
2017-02-19 21:17:40,089 - MainThread - botocore.endpoint - DEBUG - Sending http request: <PreparedRequest [POST]>
2017-02-19 21:17:40,090 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - Starting new HTTPS connection (1):
2017-02-19 21:17:40,316 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - DEBUG - "POST / HTTP/1.1" 200 448

You will notice here, using, that the CLI gets a 200 and happily returns a JSON object containing the requested streaming URL.

Please investigate. I tried mucking about in the SDK code trying to get it to point at appstream2, but that proved to be more difficult than originally thought.

Thank you!


Copy link

@seliger seliger commented Feb 19, 2017

Also --

coreyseliger:~/workspace/appstream-auth $ composer info
aws/aws-sdk-php        3.22.7 AWS SDK for PHP - Use Amazon Web Services in your PHP project
guzzlehttp/guzzle      6.2.2  Guzzle is a PHP HTTP client library
guzzlehttp/promises    v1.3.1 Guzzle promises library
guzzlehttp/psr7        1.3.1  PSR-7 message implementation
mtdowling/jmespath.php 2.4.0  Declaratively specify how to extract elements from a JSON document
psr/http-message       1.0.1  Common interface for HTTP messages
Copy link

@seliger seliger commented Feb 19, 2017

It is possible to work around this issue:

$appstream = $sdk->createAppstream([ 
        'endpoint' => '' 

(Not sure if it breaks the rest of the API, but does allow me to continue with this specific use case...)

Copy link

@cjyclaire cjyclaire commented Feb 20, 2017

@seliger Thanks for the information! This is a know bug, PR #1171 is opened to fix the issue, we are working on that.
A proposed workaround currently is having endpoint param hardcoded in the client as:

$appStream = new AppStreamClient([
    'region' => 'us-east-1',
    'version' => 'latest',
    'endpoint' => ''

Appreciate your patience : )

Update: tracking #1192 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.