aws-sdk-php | Official repository of the AWS SDK for PHP | Cloud Storage library

 by   aws PHP Version: 3.273.1 License: Apache-2.0

kandi X-RAY | aws-sdk-php Summary

kandi X-RAY | aws-sdk-php Summary

aws-sdk-php is a PHP library typically used in Institutions, Learning, Education, Storage, Cloud Storage, Amazon S3 applications. aws-sdk-php has no vulnerabilities, it has a Permissive License and it has medium support. However aws-sdk-php has 5 bugs. You can download it from GitHub.

The AWS SDK for PHP makes it easy for developers to access Amazon Web Services in their PHP code, and build robust applications and software using services like Amazon S3, Amazon DynamoDB, Amazon Glacier, etc. You can get started in minutes by installing the SDK through Composer or by downloading a single zip or phar file from our latest release.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              aws-sdk-php has a medium active ecosystem.
              It has 5845 star(s) with 1183 fork(s). There are 232 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 28 open issues and 1431 have been closed. On average issues are closed in 173 days. There are 16 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of aws-sdk-php is 3.273.1

            kandi-Quality Quality

              aws-sdk-php has 5 bugs (0 blocker, 0 critical, 5 major, 0 minor) and 362 code smells.

            kandi-Security Security

              aws-sdk-php has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              aws-sdk-php code analysis shows 0 unresolved vulnerabilities.
              There are 13 security hotspots that need review.

            kandi-License License

              aws-sdk-php is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              aws-sdk-php releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 24601 lines of code, 1907 functions and 1082 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed aws-sdk-php and discovered the below as its top functions. This is intended to give you an instant insight into aws-sdk-php implemented functionality, and help decide if they suit your requirements.
            • Create html for an operation
            • Validate an ARN .
            • Determine if the given result can be retried .
            • Encrypt a stream .
            • Configure credentials provider .
            • Marshall a value .
            • Creates a Guzzle request .
            • Validate message MD5 .
            • Apply user agent
            • Gets the checksum middleware .
            Get all kandi verified functions for this library.

            aws-sdk-php Key Features

            No Key Features are available at this moment for aws-sdk-php.

            aws-sdk-php Examples and Code Snippets

            No Code Snippets are available at this moment for aws-sdk-php.

            Community Discussions

            QUESTION

            Unable to install laravel/sail due to incompatible versions it seems
            Asked 2022-Mar-31 at 10:29

            I'm trying to install laravel/sail into an existing project, which doesn't appear to have had it installed before. This project is normally run on vagrant I believe.

            I'm trying to get it running on WSL2, using Laravel Sail. I'm also not entirely sure if that's the best approach in my case.

            My understanding is that I can use sail to get the project running via docker, with minimal setup and configuration.

            I seem to be getting an error when I try to install sail via composer. These are the instructions I'm following: https://laravel.com/docs/9.x/sail#installing-sail-into-existing-applications

            Here's the error:

            ...

            ANSWER

            Answered 2022-Mar-28 at 21:44

            To fix this and avoid the incompatibility of certain dependencies, you can run:

            Source https://stackoverflow.com/questions/71652070

            QUESTION

            How to Mock Aws\S3\S3Client for phpunit // how to mock magic methods
            Asked 2022-Mar-17 at 17:53

            I need to mock the S3Client in my symfony5 project to be able to provoke exceptions and test the reaction of my code to those exceptions. We use aws/aws-sdk-php version 3.*

            7 Years ago someone had the same problem and I tried to follow this solution [ PHPUnit - Mock S3Client not working well ] but I get errors.

            What I do at the moment:

            in my service:

            ...

            ANSWER

            Answered 2022-Mar-17 at 17:52

            As often it is easier to find a solution, when you know the name of your problem. I adapted the question title accordingly.

            Methods defined in the header of a class, which don't really exist are called "magic methods" and with that knowledge I found a solution to my problem:

            A comment under this link set me on the right track: https://carstenwindler.de/php/mocking-magic-methods-with-phpunit/

            In the current version of phpunit, which is 9.5, you can use addMethods and this syntax to mock magic methods:

            Source https://stackoverflow.com/questions/71497106

            QUESTION

            How to configure s3 filesystem for Laravel 8
            Asked 2021-Nov-04 at 20:04

            I have worked on some older Laravel apps (5.x) which have mapped uploads to a AWS S3 disk with credentials such as:

            ...

            ANSWER

            Answered 2021-Nov-04 at 20:04

            I finally figured it out! I had to dig down deep into the vendor library code but now I know how to configure it:

            First of all, just so you can see how the endpoint is being generated:

            Illuminate\Filessystem:put() ->AWSS3Adapter::upload() -> AWS\S3\ObjectUploader::upload() -> AWS\S3\ObjectUploader::promise() -> AWS\Api\Serializer::buildEndpoint()

            Secondly, for the actual fix:

            Source https://stackoverflow.com/questions/69845188

            QUESTION

            Amazon Polly AudioStream is always empty
            Asked 2021-Oct-16 at 20:15

            I am trying to get Polly to read something for me, using PHP.

            I have created a new project, installed Amazon composer require aws/aws-sdk-php and then created a file with code from SDK documentation example and modified a few minor things such as changing credential from default to value, var_dump to var_export and finally saved the content of the stream to file

            ...

            ANSWER

            Answered 2021-Oct-16 at 20:15

            You're not doing anything wrong, but it only outputs JSON if you're looking for speech marks. Try switching to an audio output format like MP3 as shown below.

            Source https://stackoverflow.com/questions/69232076

            QUESTION

            How do I fix the Laravel queue error: "Instances of Aws\Sqs\SqsClient cannot be serialized"?
            Asked 2021-Aug-15 at 19:04

            I have created a data migrator using the Laravel v8.x queue system and some batched jobs. For the queue backend, I am using AWS SQS. Without changing any of the code, one day jobs started failing randomly with the following error:

            ...

            ANSWER

            Answered 2021-Aug-15 at 19:04

            The answer is that AWS decided to change how its infrastructure and SDK work so that prod deployments that we thought were safe can randomly break. The solution is simple:

            Source https://stackoverflow.com/questions/68794598

            QUESTION

            AWS SQS + Lambda, get error while executing "DeleteMessage" after doing job on Lambda
            Asked 2021-Jul-15 at 23:43

            I am implementing AWS SQS job queue using "aws/aws-sdk-php": "^3.185". Jobs are processed correctly (pull job -> process job -> delete job) on my VPS using queue command:

            php artisan queue:work

            But with the same credential, in Lambda enviroments , Job can't be deleted after finished. In shorthand, pull job -> process job --X--> delete job. Here are the errors:

            "errorType": "Aws\Sqs\Exception\SqsException",

            "errorMessage": "Error executing "DeleteMessage" on "https://sqs.ap-northeast-1.amazonaws.com/xxxxxxxxxxx/SQS-TestJob"; AWS HTTP error: Client error: POST https://sqs.ap-northeast-1.amazonaws.com/xxxxxxxxxxx/SQS-TestJob resulted in a 403 Forbidden response:\nSenderI (truncated...)\n InvalidClientTokenId (client): The security token included in the request is invalid. - SenderInvalidClientTokenIdThe security token included in the request is invalid.b28151cc-0c42-5eec-be57-08a6207db931"

            After visibility time (30 secs in this case), undelete message will come again.

            Should I renew token when app bootstrap ?

            Thanks,

            ...

            ANSWER

            Answered 2021-Jul-15 at 14:53

            Although you haven't published the code, I suspect that although you think the same credential is in use, it isn't. In order to get the lambda to run, you must have assigned a IAM role to it. When your code attempts to use the underlying AWS routines, it will search automatically first to see if it can find a credential. The lambda service can automatically provide a temporary access key and secret access key to the running lambda code which can be used to access AWS services that the IAM role assigned to the lambda is permitted to access. Actually, this is the preferred way in lambda for security reasons so that you don't need hard-coded credentials.

            In short, I would validate that the IAM role assigned to the lambda function matches the permissions of the IAM user of your original credential.

            Source https://stackoverflow.com/questions/68394706

            QUESTION

            Cannot connect to s3 from ec2 via php sdk - cURL error 7
            Asked 2021-Jul-14 at 15:48

            I am having an issue with my EC2 instance connecting to our S3 Bucket.

            On my ec2 instance, I have php, httpd, aws-cli, aws-sdk installed. I am able to reach the index page where the code is located. Credentials file is set up /usr/share/httpd/.aws/credentials

            Code I am using from the Getting Started Basic Usage Guide

            ...

            ANSWER

            Answered 2021-Jul-14 at 15:47

            The issue is that the webserver, httpd, was not able to communicate with outside networks. That's why I could use the aws cli and telnet/ ping from the command line, but it was unreachable from the browser.

            After running the command setsebool -P httpd_can_network_connect 1, I was able to connect to my s3 buckets.

            Source https://stackoverflow.com/questions/68369203

            QUESTION

            How to create an IAM user with Programmatic access with Full Access to S3 using the PHP SDK
            Asked 2021-Jul-13 at 22:38

            I am trying to create a new IAM user (programmatic access only) that has full access to Amazon S3 using PHP SDK.

            I looked at https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-iam-2010-05-08.html#createuser and I am not able to figure out what parameter is required to indicate programmatic access only to the user. Does specifying the username alone indicates it to be Programmatic user? Once I create the user, I am assuming, I have to call the "createAccessKey" method for that user to get the access credentials? Is that right?

            ...

            ANSWER

            Answered 2021-Jul-13 at 22:38

            You are correct. createuser only creates an IAM user without any permissions. By default the user can't do anything, including no programmatic access. To enable the access you have to call createAccessKey.

            Since the user has no permissions by default, you will also need to add IAM policy to the user with S3 permissions.

            Source https://stackoverflow.com/questions/68369945

            QUESTION

            AWS Amazon Cloud Search Expression Definition using PHP API
            Asked 2021-Jun-18 at 15:06

            I ran into some issues doing Expression Definition via the official AWS Cloud Search API.

            The code example in the docs is mangled and doesn't actually show what the API is actually expecting:

            https://docs.aws.amazon.com/aws-sdk-php/v2/api/class-Aws.CloudSearchDomain.CloudSearchDomainClient.html#_search

            ...

            ANSWER

            Answered 2021-Jun-18 at 15:06

            After much experimentation I found the correct format for defining expressions via the PHP API.

            Hopefully this saves someone else some time.

            So the generic AWS Cloud Search docs for expression writing will show something like this:

            Source https://stackoverflow.com/questions/68027709

            QUESTION

            Issue installing composer package for Laravel, Voyager 1.4
            Asked 2021-Apr-19 at 05:34

            I am still sort of a newbie with Laravel, and I want to install the Voyager admin panel in an existing Laravel app that is not too far along yet in development. The GitHub for Voyager is here:

            Voyager Laravel Admin

            The CLI is:

            ...

            ANSWER

            Answered 2021-Apr-19 at 05:34
              Problem 1
                - tcg/voyager[1.4.x-dev, ..., 1.x-dev] require doctrine/dbal ^2.5 -> found doctrine/dbal[v2.5.0-BETA2, ..., 2.13.x-dev] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
                - tcg/voyager[v1.4.0, ..., v1.4.2] require illuminate/support ~6.0|~7.0 -> found illuminate/support[v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev] but these were not loaded, likely because it conflicts with another require.
                - Root composer.json requires tcg/voyager ^1.4 -> satisfiable by tcg/voyager[v1.4.0, ..., 1.x-dev].
            

            Source https://stackoverflow.com/questions/67153814

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install aws-sdk-php

            Sign up for AWS.
            Sign up for AWS – Before you begin, you need to sign up for an AWS account and retrieve your AWS credentials.
            Minimum requirements – To run the SDK, your system will need to meet the minimum requirements, including having PHP >= 5.5. We highly recommend having it compiled with the cURL extension and cURL 7.16.2+ compiled with a TLS backend (e.g., NSS or OpenSSL).
            Install the SDK – Using Composer is the recommended way to install the AWS SDK for PHP. The SDK is available via Packagist under the aws/aws-sdk-php package. If Composer is installed globally on your system, you can run the following in the base directory of your project to add the SDK as a dependency: composer require aws/aws-sdk-php Please see the Installation section of the User Guide for more detailed information about installing the SDK through Composer and other means.
            Using the SDK – The best way to become familiar with how to use the SDK is to read the User Guide. The Getting Started Guide will help you become familiar with the basic concepts.

            Support

            Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them. This SDK implements AWS service APIs. For general issues regarding the AWS services and their limitations, you may also take a look at the Amazon Web Services Discussion Forums.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Cloud Storage Libraries

            minio

            by minio

            rclone

            by rclone

            flysystem

            by thephpleague

            boto

            by boto

            Dropbox-Uploader

            by andreafabrizi

            Try Top Libraries by aws

            aws-cli

            by awsPython

            aws-cdk

            by awsTypeScript

            chalice

            by awsPython

            amazon-sagemaker-examples

            by awsJupyter Notebook