Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 12 21:27
    ziyanli-amazon synchronize #2507
  • Aug 12 18:21

    aws-sdk-php-automation on 3.233.1

    (compare)

  • Aug 12 18:21

    aws-sdk-php-automation on master

    Update models for release 3.233.1 release (compare)

  • Aug 12 15:13
    yenfryherrerafeliz labeled #2508
  • Aug 12 15:13
    yenfryherrerafeliz unlabeled #2508
  • Aug 12 15:12
    yenfryherrerafeliz commented #2508
  • Aug 12 14:21
    yenfryherrerafeliz assigned #2508
  • Aug 12 03:27
    jaimeburnap edited #2508
  • Aug 12 03:26
    jaimeburnap edited #2508
  • Aug 12 03:26
    jaimeburnap edited #2508
  • Aug 12 03:25
    jaimeburnap edited #2508
  • Aug 12 03:25
    jaimeburnap opened #2508
  • Aug 12 03:25
    jaimeburnap labeled #2508
  • Aug 12 03:25
    jaimeburnap labeled #2508
  • Aug 12 00:27
    georgewoofbates commented #2302
  • Aug 12 00:08
    ziyanli-amazon opened #2507
  • Aug 11 23:37
    github-actions[bot] commented #2500
  • Aug 11 23:37
    RaviJayagopal closed #2500
  • Aug 11 23:37
    RaviJayagopal commented #2500
  • Aug 11 22:04
    Zombaya commented #2403
Paul Preibisch
@firecentaur

hi there, I want to use the elasticsearch Analyse api with Php, but the PHP sdk does not support it. the documents configuration.asciidoc show that I can add a new endpoint, but I am un sure where to put this code - ie: it says $this->transport, indicating it should be put in Client.php?? But I dont want to edit the vendor files... can you please help? $transport = $this->transport;
$serializer = $this->serializer;

$newEndpoint = function ($class) use ($transport, $serializer) {
if ($class == 'SuperSearch') {
return new MyProject\SuperSearch($transport);
} else {
// Default handler
$fullPath = '\Elasticsearch\Endpoints\' . $class;
if ($class === 'Bulk' || $class === 'Msearch' || $class === 'MPercolate') {
return new $fullPath($transport, $serializer);
} else {
return new $fullPath($transport);
}
}
};

$client = ClientBuilder::create()
->setEndpoint($newEndpoint)
->build();

jezzarb94
@jezzarb94
code.png
im getting a error 500 when using this code
Aaron McQuade
@amcquade
@jezzarb94 it looks like you are missing the access keys
@firecentaur have you tried using the sdk from elasticsearch ?
Sheldon Lendrum
@sheldonlendrum
Hi, have any of you used a ARN for Auth with the S3 SDK/Library?
https://stackoverflow.com/questions/65029196/php-sdk-for-aws-s3-using-arn-bucket-for-auth
Aaron McQuade
@amcquade
@sheldonlendrum what's the reasoning for not using the bucket name ?
Sheldon Lendrum
@sheldonlendrum
Hi Aaron, how do you auth using ARN with just using the bucket name?
@amcquade even digging in the code, the logic is parsing for arn: and separating out the string for auth?
Are you using ARN differently?
Aaron McQuade
@amcquade
@sheldonlendrum I've only used ARNs for s3 buckets in cloudformation, if I'm using the sdk I just use the actual bucket name
Sheldon Lendrum
@sheldonlendrum
Does that mean you use the KEY/Secret? or are your permissions tied to your EC2?
Aaron McQuade
@amcquade
also, in that example there are no credentials, create an IAM user and give them access to that bucket and whatever operations you need. take the key and secret and supply them to your s3client object
usually use key and secret, although for some things it makes sense to create an IAM Role with the permissions you need and attach it to the instance, but in that way you'd need to get the credentials a different way
Sheldon Lendrum
@sheldonlendrum
Thanks!
Dzianis Charnysh
@dzianis1_gitlab
Hello guys.
I need your help.
I am gonna dynamo db in laravel project.
So I have issue in define the connection with dynamo db.
Please help me,
Anyone here?
Aaron McQuade
@amcquade
what is your issue ? @dzianis1_gitlab
pratiweb
@pratiweb
Hello
I want to use
Managing Amazon EC2 Instances Using the AWS SDK for PHP Version 3.
I have added sdk library using zip donwload. but in composer update autoload file is not generated. How to use it ?
Aaron McQuade
@amcquade
there is an autoloader within the sdk @pratiweb
Raj
@rajshah001

Hey, Everyone does anyone have an idea of how to use AWS AppConfig with the AWS SDK PHP.
My Particular use case is, I am running a simple PHP app on the EC2 instance and want to receive the JSON configurations written in the AppConfig.

require 'vendor/autoload.php';
use Aws\AppConfig\Exception\AppConfigException;
use Aws\AppConfig\AppConfigClient;

$appConfigClient = new AppConfigClient(['version' => 'latest', 'region' => 'ap-south-1']);
$clientid  = uniqid('', true);
$params = [
    'Application' => $APP_CONFIG_APP,
    'ClientId' => $clientid,
    'Configuration' => $APP_CONFIG_CONFIGURATION_PROFILE,
    'Environment' => $APP_CONFIG_ENVIRONMENT
];

$response = $appConfigClient->getConfiguration($params);
$config = $response['Content'];

Also, I am authorizing with the AppConfig by an Adminstrator IAM Role Provided so, no issues on that side and I am able to get the following output

{ "Content": {}, "ConfigurationVersion": "1", "ContentType": "application\/octet-stream", "@metadata": { "statusCode": 200, client_id=60696", and some more fields...}

But the issue is I am not getting the AppConfig Content but able to extract the metadata regarding the Data.
So, Anyone who had tried this please help me out here.

Luis Miguel
@ktecho
Hi there. I've been unable to find a way to revoke every rule from a Security Group.
Is there any way to do it easyly? Something like revokeSecurityGroupIngress(describeSecurityGroup('name' => 'securityGroupName'))
What I'm trying to do is deleting all the rules and creating new ones
Luis Miguel
@ktecho
Ok, I'm doing a DescribeSecurityGroup, then feeding the information to this function:
        $revoked = $this->getEC2Client($awsZone)->revokeSecurityGroupIngress([
            'GroupId' => $securityGroup['GroupId'],
            //'GroupName' => $securityGroup['GroupName'],
            'IpPermissions' => $securityGroup['IpPermissions']
        ]);
But it returns InvalidRequest (client): The request received was invalid
Abishek R Srikaanth
@abishekrsrikaanth
How do I get the LastModifiedTime of a directory in S3? I uploaded a directory using the AWS S3 console and the Last Modified Time column is empty
Chris Loftus
@chrisloftus
Anyone had issues installing the Laravel package with Laravel v8.51.0?
Abishek R Srikaanth
@abishekrsrikaanth
when moving files from on S3 folder to another S3 folder, are these physically moved? Why is the performance of the file move very slow?
barasim
@barasim:matrix.org
[m]
Does the SDK in any way take care of rate limits and throttling under the hood? Or is there something in the SDK I can use to make requests within the limit?
Petro
@pgbce
Having issues connecting MediaPackage and Cloudfront Distribution.
I have been able to create the MediaPackage Endpoint and obtain the necessary URL to use to create the cloudfront distro.
Unfortunately, there is nothing in the documentation on how to link them together.
Similar if not identical issue can be found here - aws/aws-sdk-php#1656
Unfortunately, the solution has not worked for me.
Any information would be appreciated.
SamRemis
@SamRemis
@barasim, sorry for the late reply on this, but better late than never I guess. There’s an experimental mode on retry that sounds like what you may be looking for: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_configuration.html#config-retries
Adaptive mode
bapu
@khatavi_twitter
Hi, I am working on IoT so please anybody share the code for publish and subscribe code using aws sdk
Hi, I am working on IoT so please anybody share the code for publish and subscribe code using aws sdk in php
SamRemis
@SamRemis
You're trying to publish an MQTT message?
$result = $client->publish([
'payload' => <string || resource || Psr\Http\Message\StreamInterface>,
'qos' => <integer>,
'retain' => true || false,
'topic' => '<string>', // REQUIRED
]);
@khatavi_twitter
If that's not what you're looking for, then could you give an idea of what you're trying to publish and subscribe to?
Superkooka
@Superkooka
Hi! When do u expect to update the package for Laravel 9? aws/aws-sdk-php-laravel#205
SamRemis
@SamRemis
Hi there @Superkooka , can't give an exact date just yet, and I can't promise anything. That said, I'm pushing for us to officially stop support of 7.0 and lower soon in order to not make breaking changes for customers while enabling us to upgrade the versions of PHPUnit, Laravel, etc. Once we officially announce it, then we need to give it a few months before we can upgrade the repo to having the minimum version, and from that point, I just need to make the PR and check for breaking changes
1 reply
SamRemis
@SamRemis
So the few months thing is based on a part of our deprecation policy that says we need to give users warnings that their version will be deprecated soon.
Luckily, the policy is pretty vague; while precedent is that we give at least three months, I may be able to bend that a bit for the Laravel repo specifically. I should have a better idea of exactly how much I can bend it on Tuesday. I can’t promise an exact date even then, but I can at least give a clearer timeline.
Hossam Maher
@HosMercury_twitter
Hi could this package used for aws signature v4?
SamRemis
@SamRemis
@HosMercury_twitter, yes, it will provide sigv4 automatically on most calls
Sigv4a needs a dependency though
Hossam Maher
@HosMercury_twitter
Thx, but What dependency ?