Questions tagged [aws-php-sdk]

Amazon Web Services SDK for PHP

The AWS SDK for PHP enables PHP developers to easily work with Amazon Web Services and build scalable solutions with Amazon S3, Amazon DynamoDB, Amazon Glacier, and more.

Download Link

User Guide

API Documentation

314 questions
0
votes
1 answer

AWS S3 file uploads but files in bucket has no size?

Good Day, all. I want to upload multiple image files to my S3 bucket, I am able to do this. The only problem I encounter after uploading the files to my AWS S3 bucket is that the files are there but all of the image files have a size = 0. What could…
0
votes
1 answer

php s3 sdk - how to get object's latest version

I'm trying to get latest version of a given object. I tried using this function listObjectVersions but couldn't get it to work like I want. It lists all the files, with their versions, on my bucket. $fileVersion = $s3Client->listObjectVersions([ …
Sumit Wadhwa
  • 2,825
  • 1
  • 20
  • 34
0
votes
1 answer

how to read results from aws s3 headObject using PHP SDK v2?

I am able to successfully get results back from a call to headObject like this. But then I can't access what's in $result as result is an object (Guzzle\Service|Resource\Model) and the data I see in it is obviously in protected variables meaning I…
Nick Weavers
  • 534
  • 7
  • 23
0
votes
1 answer

Why does Amazon SES fail half the time when called using the PHP SDK?

I'm using the AWS SDK for PHP (version 3.52.33, PHP version 7.2.19) and trying to send emails using the Simple Email Service (SES). I have SES configured, and can run the example code successfully. To make my life easier, I wrote a function to send…
Zino
  • 35
  • 6
0
votes
1 answer

DependencyViolation occurred when I delete subnet after terminate instance using aws-sdk

I control AWS environment using AWS-SDK PHP. When I delete all test environment, the problem has been occurred. I read the document and I already know DependencyViolation is occurred if I have running instances in target subnet. So I terminated…
JW Kim
  • 171
  • 7
0
votes
1 answer

How to fix getFederationToken returns 403 not authorized error after upgrading from SDK version 1 to 3

We have existing code that uses AWS PHP SDK version 1 AmazonSTS()->get_federation_token(). After upgrading to SDK version 3, the same call using the same credentials, resource and policy returns a 403 not authorized error. Version and region appear…
0
votes
1 answer

S3 CreateEventSourceMapping triggers "Operation not found" error

I'm trying to create source maps so when someone uploads something inside the bucket, Lambda will trigger a previously created function, as described here But, when I call this: $fnName = 'my_function'; $s3->createEventSourceMapping([ …
CarlosCarucce
  • 3,420
  • 1
  • 28
  • 51
0
votes
1 answer

Aws Php SDk - Create Cloudfront distribution using hard-coded credentials

I'm trying to create a cloudfront distribution while doing the authentication via hardcoded credentials. However i receive this error when i run my code Fatal error: Uncaught Aws\Exception\CredentialsException: Cannot read credentials from…
Crerem
  • 1,289
  • 2
  • 18
  • 45
0
votes
1 answer

AWS Assume Role access denied while using AWS PHP SDK

I have a problem using the AWS PHP SDK when calling AssumeRole from the apache server (PHP SDK) the following error appears Error executing "AssumeRole" on "https://sts.amazonaws.com"; AWS HTTP error: Client error: `POST…
0
votes
1 answer

Creating a signed URL - generated URL is missing signature

I am very new to using aws-sdk-php and I am trying to create a signed URL for Cloudfront (to an object in a S3 bucket). My code is as follows (using the aws-sdk-php): function test_cloudfront_signed_url(){ require ABSPATH .…
Chris Hawkins
  • 421
  • 3
  • 10
  • 21
0
votes
1 answer

No response from AWS SES when I try to send an email

I have a recent issue with my emails, on week ago I started get errors in my email sending, problem is that sometimes when I call this function sendEmail it never returns the Aws/Result or any Exception. So my script is looped waited for it. The…
0
votes
2 answers

Is it possible to copy aws s3 folder with different name with aws sdk?

I want copy one s3 folder with some different name using php aws sdk. Is there a way to do this. I have not got any code to copy folder rather I only got for individual files.
0
votes
1 answer

Is there a way to set a CORS header to a AWS signed URL?

I am using a signed url from a GET object and the i could only find normal headers to use but not CORS headers. How do i make it possible so that content from another domain is accepted by the browser.I want to use a header like…
0
votes
0 answers

AWS s3Client->copyObject succeeds but the copied object loses is garbled

Please assist. I am successfully uploading objects to S3 using the following code snippet: // Send a PutObject request and get the result object. $result = $this->s3EncryptionClient->putObject([ '@MaterialsProvider' =>…
Dean
  • 1,226
  • 2
  • 20
  • 39
0
votes
1 answer

Function restoreObject don't use Tier field?

I'm using S3Client from PHP SDK to restore an object from Glacier and I want to use the Expedited flag. I saw the documentation and I found the "Tier" field that is a required field but doesn't work. Standard is always used. I tried to use without…
Jorge B.
  • 1,144
  • 2
  • 17
  • 37