Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 11:33
    RaviJayagopal opened #1928
  • Dec 13 19:49

    aws-sdk-php-automation on 3.129.0

    (compare)

  • Dec 13 19:49

    aws-sdk-php-automation on master

    Update models for release 3.129.0 release (compare)

  • Dec 13 17:49
    diehlaws unlabeled #1926
  • Dec 13 17:49
    diehlaws unlabeled #1874
  • Dec 13 17:49
    diehlaws unlabeled #1852
  • Dec 13 15:22
    furester opened #1927
  • Dec 13 15:09
    Kuijkens commented #1908
  • Dec 13 07:23
    bolovdor closed #1926
  • Dec 13 07:23
    bolovdor commented #1926
  • Dec 13 00:32
    diehlaws labeled #1926
  • Dec 13 00:32
    diehlaws commented #1926
  • Dec 13 00:31
    diehlaws labeled #1926
  • Dec 13 00:31
    diehlaws assigned #1926
  • Dec 12 22:22
    diehlaws labeled #1922
  • Dec 12 22:22
    diehlaws commented #1922
  • Dec 12 22:16
    diehlaws labeled #1922
  • Dec 12 22:16
    diehlaws assigned #1922
  • Dec 12 21:54
    diehlaws labeled #1920
  • Dec 12 21:54
    diehlaws commented #1920
kevin olson
@acidjazz
hi everyone o/
finally on a project where i need to use this SDK :)
Sharjeel Zubair
@sharjeelz
hi, any one implemented CloudWatch Sdk with PHP
Jami Schwarzwalder
@jschwarzwalder
Here are some code samples for cloud watch using the PHP SDK https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/cw-examples.html
Ramiro Varandas Jr
@ramirovjr
hello everyone, I'm having a strange problem when generating S3 presigned URLs, we have 2 buckets (one for testing (us-east-1 / N. Virginia) and one for production (sa-east-1 / Sao Paulo)), both have KMS enabled and when we generate the presigned url using the PHP SDK v3 for the us-east-1 region, the link works fine, but not for the sa-east-1 region
Ramiro Varandas Jr
@ramirovjr

hello everyone, I'm having a strange problem when generating S3 presigned URLs, we have 2 buckets (one for testing (us-east-1 / N. Virginia) and one for production (sa-east-1 / Sao Paulo)), both have KMS enabled and when we generate the presigned url using the PHP SDK v3 for the us-east-1 region, the link works fine, but not for the sa-east-1 region

Nevermind, it was a lack of permission in the KMS key, the IAM user didn't had usage access, sorry to bother

Teodor
@PixellUp
$result = $ec2Client->runInstances(array(
        'LaunchTemplate' => [
            'LaunchTemplateId' => 'lt-0783e3c58265de43b',
            'Version' => '1',
        ],
        'MaxCount' => 1, // REQUIRED - number of instances
        'MinCount' => 1, // REQUIRED - number of instances
    ));


$instanceID = $result['Instances'][0]['InstanceId'];
$ec2Client->waitUntil('InstanceRunning', [
    'instance-id' => [$instanceID],
    'instance-state-name' => ['running'],
    'instance-state-code' => ['16']
]);
Does anybody know does not wait until ec2 instance is in 'Running' state ?
Jami Schwarzwalder
@jschwarzwalder
Are you using describe instance to get state?
Teodor
@PixellUp
@jschwarzwalder I was looking for solution more like this https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_waiters.html
but hey if the above doesn't work I'll have to use the describe instance method and sleep until I get 'state' => 'running'
Ramiro Varandas Jr
@ramirovjr
@PixellUp you can subscribe a SNS webhook to get EC2 Instance State Change https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#ec2_event_type
Teodor
@PixellUp
@ramirovjr @jschwarzwalder Thanks for the help. I've done it with describeInstances and do while loop with 5 seconds sleep
Ghost
@ghost~5c219531d73408ce4fb2d084
Hello! Question: is there a special version of aws-sdk-php that includes the MultipartUploader class? I installed via composer and as I'm searching through the vendor folders, I can't find this class. Thanks.
Ghost
@ghost~5c219531d73408ce4fb2d084
Sorry for the post. F*&^ng typo was the problem. Merry Christmas/Happy Holidays!
kevin olson
@acidjazz
anyone here ever successfully setup reverse DNS with Route 53 ?
Aaron McQuade
@amcquade
any tips on updating the sdk with composer ?
Aaron McQuade
@amcquade
and/or have success using the new Transfer api ?
Paul Dragoonis
@dragoonis
I'm looking for docs on sending metris to xray from PHP application. I want this to be ASync from the PHP app to the XRay daemon running on my EC2 instance.
Kien Ngoc Nguyen
@tgsoon2002
Hi all
I just start work on the amazon sdk for php
and I dont' know how to make this work.
i used this at work.
and we have a server with running wordpress.
Kien Ngoc Nguyen
@tgsoon2002
samuel6446
@samuel6446

How to update/upgrade aws php sdk ?

Just mentioning the version 'version' => '2018-11-15' is enough or need to do something

Lewis Yuburi
@yub_gitlab
Hi all
Darwin Corn
@amsDarwin_gitlab
anyone here using the SDK in a provided (custom) lambda runtime? having issues assuming the instance role
crazyfree
@crazyfree

Hey guys,
i have a question, i am using SDK v2.6.9 and i heard about signature v2 will be deprecated on June 24.
I've changed signature to v4 by adding signature when creating an instance

S3Client::factory(array(
'key' => $key,
'secret' => $secret,
'region' => $region,
'signature' => 'v4',
));

But i also saw a table, that told me have to update SDK to v3 to adopt the signature v4. It make me confused, because i am using SDK v2 and also can send v4 signature to server. My system was made from 2013 so, it's really heavy and difficult to change
So my question is: Do I have to change SDK to v3? or can continuously using SDK v2?

Thank you for reading and answer

Vishnu pradeep
@intermediatech
Is there any sample to get list of Elemental MediaLive channels currently in the account.
$mediaLive = new MediaLiveClient([
    'version'     => 'latest',
    'region'      => 'ap-south-1',
    'credentials' => [
        'key'    => 'key',
        'secret' => 'secret'
    ]
]);
$channels = $mediaLive->listChannels(
        [
            'MaxResults' => 10,
        ]
    );
var_dump($channels);
Chase Coalwell
@srchase
@crazyfree Since you're already using v2.5 or later, you can continue to use v2.
Chase Coalwell
@srchase
@intermediatech yes, that's the correct operation for listing the channels in an account.
cemarta7
@cemarta7
ANybody has used PinpointSMSVoiceClient??
return $pinpoint->sendVoiceMessage([
                'CallerId'=>$originationNumber,
                'Content' => [
                    'SSMLMessage' => [
                        'Text' => "<speak>This is a text from <emphasis>Pinpoint</emphasis> using SSML. <break time='1s' /> I repeat. This is a text from <emphasis>Pinpoint</emphasis> using SSML.</speak>",
                    ],
                ],
                'OriginationPhoneNumber' => $originationNumber,
                'DestinationPhoneNumber' => $phoneNumber
            ]);
I just keep getting resulted in a 415 Unsupported Media Type
Harendra Kumar Kanojiya
@harendra21
is there anyone who can provide me code for transcript generate
Shivanshu Patel
@shivanshuit914
I need help with php sdk, Currently I am using it for kenisis client. I am struggling with finding checkpoint feature with aws php sdk
sakshamsingh1
@sakshamsingh1

Hey, I am trying to make a sagemaker runtime client using :
"
$client = new Aws\SageMakerRuntime\SageMakerRuntimeClient([

                        'credentials' => $memoizedProvider,
                        'region' => $region,
                        'version' => "latest"
                    ]);

"
but I am getting a fatal error. "Fatal error: Uncaught Aws\Exception\UnresolvedApiException: The runtime.sagemaker service does not have version: latest."

I have been looking from a very long while but could not find any right version value. Please suggest changes or correction required.
Howard Lopez
@howardlopez
@sakshamsingh1 What version of the SDK do you have? If you look at src/data/manifest.json, do you see the following:
    "runtime.sagemaker": {
        "namespace": "SageMakerRuntime",
        "versions": {
            "latest": "2017-05-13",
            "2017-05-13": "2017-05-13"
        }
    },
sakshamsingh1
@sakshamsingh1
I have version 3.0, I looked into this file. It looks the same as the above.
sakshamsingh1
@sakshamsingh1
@howardlopez thanks it is working now, seems to be some issue due to wrong include files( because it worked when I removed them).
Henry Paradiz
@hparadiz
I'm using $iamClient->listUsers() but the result set is missing tags. Is there something I'm doing wrong?
Raivis Kalinins
@Swanty
Hello, how to have one AwsClient singleton for the whole runtime of php script, but use different config (region/endpoint/credentials) based on what lambda function is being invoked?
example code:
    $client = new AwsClient([
        'credentials' => [
            'key' => '...',
            'secret' => '...',
        ],
        'region' => 'eu-west-1',
        'version' => '2015-03-31',
    ]);

    // This is ok, because default is EU region
    $client->invoke([
        'FunctionName' => 'EuFunc',
        'Payload' => '...',
    ]);

    // How to switch region to US for this?
    $client->invoke([
        'FunctionName' => 'UsFunc',
        'Payload' => '...',
    ]);

    // I am running local dev aws sam cli and developing new function and want to switch "endpoint" in config + credentials
   //  to local for this function without affecting the other functions. How? :)
    $client->invoke([
        'FunctionName' => 'LocalFunc',
        'Payload' => '...',
    ]);
John Skoteiniotis
@j0hnskot
Hi all, this might not be the correct place to ask but I was wondering, is there a way to buy items remotely? We have a website that we want to be able to buy stuff from amazon automatically for the customer, instead of sending the customer to amazon and expecting them to buy it manually. Any chance this exists on an API?
ziasultan2
@ziasultan2
image.png
Hi I'm using laravel for aws rekognition I'm sending image for face compare but it returns me {} this
Here is my code
Please help me to find this problem solution
Teodor
@PixellUp
Does anybody know why "describeSpotFleetInstances" does not return "Active Instances" response but instead return the "requestSpotFleet" response. Does somebody sees something not right or I'm too tired and better go sleep.
        $client = App::make('aws')->createClient('ec2');

        $instance = $client->requestSpotFleet([
            'SpotFleetRequestConfig' => [
                'IamFleetRole' => 'arn:aws:iam::552724291356:role/aws-ec2-spot-fleet-tagging-role',
                'LaunchSpecifications' => [
                    [
                        'ImageId' => 'ami-0ace68c630867ba8c',
                        'InstanceType' => 't3a.nano', // smallest vCore 2 & 512 MB Ram
                        'KeyName' => '2nj35n2j3n5j25-key', // SSH key
                    ],
                ],
                'TerminateInstancesWithExpiration' => true,
                'ValidUntil' => $expire_at->toDateTimeString(),
                'TargetCapacity' => 1,
            ],
        ]);

        $spotFleetRequestId = $instance['SpotFleetRequestId'];
        dump($spotFleetRequestId);

        $instanceID = null;
        do{

            $result = $client->describeSpotFleetInstances([
                'SpotFleetRequestId' => $spotFleetRequestId,
            ]);


            dd($result); // here should return the Active instances array

            if (!empty($result['ActiveInstances']))
                $instanceID = $result['ActiveInstances'][0]['InstanceId'];

            echo "sleep" . PHP_EOL;
            sleep(5);
        }while($instanceID == null);
bolovdor
@bolovdor
Does somebody knows why following code throws error "ErrorException: A non-numeric value encountered in file .... /vendor/aws/aws-sdk-php/src/Api/Serializer/Ec2ParamBuilder.php on line 36".
Below is the code that cause that error:
        $instance = $client->requestSpotFleet([
            'SpotFleetRequestConfig' => [
                'IamFleetRole' => 'arn:aws:iam::552724291356:role/aws-ec2-spot-fleet-tagging-role',
                'LaunchSpecifications' => [
                    'LaunchTemplateConfigs' => [
                        'LaunchTemplateSpecification' => [
                            'LaunchTemplateId' => 'lt-0783e3c58265de43b',
                        ],
                    ],
                ],
                'TerminateInstancesWithExpiration' => true,
                'ValidUntil' => $expire_at->toDateTimeString(), // work with 5 min instances
                'TargetCapacity' => 1
            ],
        ]);