These are chat archives for aws/aws-sdk-php

27th
Jan 2016
Subash PS
@pssubashps
Jan 27 2016 05:13
hi
anyone have an idea how to sign a request in php
I create api in apigatway. I want to execute that.
Autorization AWS_IAM
Jonathan Eskew
@jeskew
Jan 27 2016 05:16
There's an example of signing an arbitrary request in our CloudSearchDomain developer guide
Subash PS
@pssubashps
Jan 27 2016 07:15
can anybody help on this
Jonathan Eskew
@jeskew
Jan 27 2016 07:27
Use this class to sign any PSR-7 request
You will need to construct a Request object to send to your API Gateway endpoint
Subash PS
@pssubashps
Jan 27 2016 07:28
RequestInterface $request,
CredentialsInterface $credentials
i need to create both,
have any idea
This is a request object from Guzzle
Subash PS
@pssubashps
Jan 27 2016 07:37
got
Jonathan Eskew
@jeskew
Jan 27 2016 07:38
For your credentials, you can use the SDK’s default provider
call_user_func(\Aws\Credentials\CredentialProvider::defaultProvider())->wait()
Subash PS
@pssubashps
Jan 27 2016 07:48
thanks guys
it worked
Zxurian
@Zxurian
Jan 27 2016 15:50
are there any known issues with a 500 error being returned after multiple consecutive multipart S3 uploads?
Jonathan Eskew
@jeskew
Jan 27 2016 15:53
@Zxurian can you provide a bit more context?
Zxurian
@Zxurian
Jan 27 2016 15:55
@jeskew I've got a looping script that uploads files to our S3 bucket, and after several consecutive files, without fail, it'll throw an exception that the S3 server returned a 500 error
I'm rerunning now to get timestamps to see if it's a length of time issue
Jonathan Eskew
@jeskew
Jan 27 2016 16:00
You may want to try wrapping the multipart uploader in a do/while loop
you will be able to resume an upload even if a part failed enough times to for the error to get surfaced
Zxurian
@Zxurian
Jan 27 2016 16:05
how would that work when using ->uploadAsync() ?
Jonathan Eskew
@jeskew
Jan 27 2016 16:12
Are you starting a bunch of uploads and calling wait on a composite promise?
Zxurian
@Zxurian
Jan 27 2016 16:23
currently just using http://pastebin.com/LEYQftTf
Zxurian
@Zxurian
Jan 27 2016 17:15
I get the following error after roughly 80 minutes, - http://pastebin.com/Skvpnt4t
and it's consistent, it always errors with the same error
Jonathan Eskew
@jeskew
Jan 27 2016 17:24
S3 issues that error and closes a connection after 20 seconds of inactivity
Requests that get that error will be retried up to the configured number of retries
It's generally caused by network contention
Jonathan Eskew
@jeskew
Jan 27 2016 17:33
How many files would you say you're uploading? If this process takes 80 minutes, curl_multi might not be the appropriate concurrency abstraction
Zxurian
@Zxurian
Jan 27 2016 17:33
hundreds +
Jonathan Eskew
@jeskew
Jan 27 2016 17:37
You might want to consider using a queue
With SQS, for example, you could have isolated workers handle 10 uploads concurrently or just single uploads
Jonathan Eskew
@jeskew
Jan 27 2016 17:44
Internally, curl_multi uses an event loop, which
Jonathan Eskew
@jeskew
Jan 27 2016 17:50
which can get saturated if too many events are being polled