by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:49
    somnaderi commented #2002
  • Jun 05 22:40
    codecov-commenter commented #2034
  • Jun 05 22:37
    codecov-commenter commented #2034
  • Jun 05 22:37
    codecov-commenter commented #2034
  • Jun 05 22:35
    codecov-commenter commented #2034
  • Jun 05 22:23
    SamRemis opened #2034
  • Jun 05 20:08
    howardlopez assigned #2026
  • Jun 05 18:14

    aws-sdk-php-automation on 3.140.2

    (compare)

  • Jun 05 18:14

    aws-sdk-php-automation on master

    Update models for release 3.140.2 release (compare)

  • Jun 05 18:06
    somnaderi commented #2002
  • Jun 05 17:07
    mf-lit commented #2014
  • Jun 05 09:17
    michalcharvat opened #2033
  • Jun 05 04:40
    lukecleland-myfiziq commented #1979
  • Jun 05 03:56
    razielvamp commented #2032
  • Jun 05 03:54
    razielvamp commented #2032
  • Jun 05 03:28
    lanlin commented #1386
  • Jun 04 22:23
    diehlaws commented #2032
  • Jun 04 22:23
    diehlaws unlabeled #2032
  • Jun 04 22:22
    diehlaws assigned #2032
  • Jun 04 21:57
    JefferyHus commented #1851
kevin olson
@acidjazz
3.0
looks like $exception->getMessage() contains the error?
but its a combination of text and XML
Jonathan Eskew
@jeskew
Yes
hmmm that’s not ideal
kevin olson
@acidjazz
anything else tahts more ideal.. yea
Jonathan Eskew
@jeskew
do you have an example?
kevin olson
@acidjazz
This message was deleted
woops should have made that a snippet
Jonathan Eskew
@jeskew
no worries
kevin olson
@acidjazz
string(651) "Error executing "Subscribe" on "https://sns.us-east-1.amazonaws.com"; AWS HTTP error: Client error: 403 AuthorizationError (client): User: arn:aws:iam::782785023246:root is not authorized to perform: SNS:Subscribe on resource: arn:aws:sns:us-east-1:932574457866:SMOA - <ErrorResponse xmlns="http://sns.amazonaws.com/doc/2010-03-31/">
  <Error>
    <Type>Sender</Type>
    <Code>AuthorizationError</Code>
    <Message>User: arn:aws:iam::782785023246:root is not authorized to perform: SNS:Subscribe on resource: arn:aws:sns:us-east-1:932574457866:SMOA</Message>
  </Error>
  <RequestId>12341fc4-61ca-564e-93f5-5143fbe61443</RequestId>
</ErrorResponse>
I'd like to pass through the error, preferably just the string
Is this coming from Guzzle or the SDK?
Jonathan Eskew
@jeskew
the SDK
all SDK exceptions extend from Aws\AwsException
and have a method called getAwsErrorCode that returns the error string generated by the service
so in the example you provided getAwsErrorCode would return “AuthorizationError"
kevin olson
@acidjazz
OK perfect
tahts plenty
I can then use getMessage() to get detail, but yea something more simple like that is what im looking for, thank you
Jonathan Eskew
@jeskew
The code will always tell you the class of error if you want to take an action in certain circumstances
you might also want to upgrade
v3 follows semantic versioning, so all 3.x releases will be backwards compatible with 3.0
byounes
@byounes
Hello, I have issues running a my basic aws-sdk-php test, I googled for hours without success :(
Can I ask for help here, I'm more experienced in embedded systems PHP & web is not my cup of coffee
Jonathan Eskew
@jeskew
Sure what's up?
byounes
@byounes
after an apt-get install php-aws-sdk, I tried this code:
$s3Client = S3Client::factory(array(
'credentials' => array(
'key' => '#############,
'secret' => '#######################'
)
));
I've tried adding:
require 'Aws/Common/Aws.php';
use Aws\S3\S3Client;
but it doesn't work
Fatal error: Class 'Guzzle\Service\Builder\ServiceBuilder' not found in /usr/share/php/Aws/Common/Aws.php on line 27
Jonathan Eskew
@jeskew
I don't think a system-wide aptitude install is what you want with a PHP library.
You can download a phar file from github and require that
It will include all dependencies
They would be on the
byounes
@byounes
does that mean that the Ubuntu package is not very useful, it has the next dependencies:
php5-common (>= 5.3.3), php-pear (>= 1.4.0), php-guzzle (>= 3.0.3), php5-curl
So Guzzle is there also,, I can see
it under /usr/share/php/Guzzle
Jonathan Eskew
@jeskew
I'm not familiar with the Ubuntu package but that would be an uncommon way to install a PHP library
Does it have an autoloader instructions?
byounes
@byounes
I get your point, I'll try the git release then.
Thanks Jeskew for your time.
Jonathan Eskew
@jeskew
Np happy to help
byounes
@byounes
regarding the Ubuntu package, it has no autoload file, I searched for "auto", and got zero hits
"auto"
Jonathan Eskew
@jeskew
hmmm well then they might expect you to call require_once for every class in the SDK
we don’t maintain the ubuntu package, so I’m not really sure how it’s supposed to be used
Zxurian
@Zxurian
Is there a way to stage multiple transfers to s3, or fork/queue the upload process so the script isn't waiting for a transfer to complete before moving onto the next section of the code?
Witold Cyrek
@wcyrek-comrise
Yes!
Zxurian
@Zxurian
ex. I have multiple separate directories that need to be uploaded that I can loop on, however I'd rather not wait for the transfer to complete before moving onto the next iteration.
@wcyrek-comrise excellent, do you have a link referencing that feature, or API?
Witold Cyrek
@wcyrek-comrise
I mean I am sure there is a way, but you have to probably put it in your script using soem sort of concurrency library.
I do not think there is a built in way.
Let me jsut make sure by rummiging through the docs, sicne there might be async way of doign that