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
6
votes
3 answers

AWS IAM Roles and policies in simple English?

I've been working with the AWS PHP SDK and I seem to get everything except the IAM Roles and permissions. Can someone please explain to me in the simplest term how the IAM roles work and explain the following terms: StatementId, Action, ARN and most…
supersan
  • 5,671
  • 3
  • 45
  • 64
6
votes
2 answers

AWS SNS HTTP subscription confirmation in PHP

I am unable to get the confirmation of AWS SNS Http connection in PHP. My application is developed on Laravel 5.1 In AWS I have created a Topic and added a subscription. I have selected endpoint as HTTP and provided the URL http://myurl.com/sns. My…
Prabesh
  • 298
  • 1
  • 5
  • 12
6
votes
1 answer

How to add ContentType to AWS PHP SDK MultiPartUploader

I have searched high and low for how to add a simple ContentType metadata to a MultiPartUploader in AWS PHP SDK. The docs specifically mention how to do it for PutObject, but have no mention of how to do it with a MultiPartUploader. I have tried…
Daniel
  • 1,403
  • 1
  • 14
  • 30
5
votes
1 answer

Naming an AWS EC2 security group IP permissions rule

I am using the AWS PHP SDK version 3. I am able to create security groups using the API, as well as creating IP Permission rules. What I can't figure out is how give the IP Permissions rule a name. Here's what I have: $params = [ 'Description'…
EastsideDev
  • 6,257
  • 9
  • 59
  • 116
5
votes
0 answers

Add metadata to S3 Object, while keeping existing metadata and ACL

I'm looking for a way to programmatically add specific metadata to a set of S3 objects. I've recently updated the code in my project to set the 'Cache-Control: max-age' and 'Expires' when uploading objects to S3, but now I'm trying to set those…
5
votes
1 answer

AWS SNS : Why is my "ghost" subscription not showing in Topic

I'm having a weird issue with Amazon AWS SNS : When creating subscriptions and topics using aws-php-sdk (3.112.7), there is always a "ghost" or "invisible" subscription. As you can see, this subscription exists in "subscriptions" tab. However, when…
André DS
  • 1,823
  • 1
  • 14
  • 24
5
votes
1 answer

How to mock an annotated AWS method in PHPUnit?

I am writing a unit test and I want to check whether the method publish() was called one or more times. This is a snippet from my whole test class:
ReynierPM
  • 17,594
  • 53
  • 193
  • 363
5
votes
1 answer

AWS S3 Upload Access Denied through Presigned post generated with AWS-SDK PHP

i'm trying to upload a file (an image for my tests) to my s3 bucket with a pre-signed post generated with AWS SDK PHP. Firstable i generate the pre-signed post, then i manually create the request with given PostObjectV4 datas with Postman or via a…
ffouillet
  • 111
  • 11
5
votes
2 answers

How to process with AWS-cognito NEW_PASSWORD_REQUIRED Challenge

When I use the below code: $result = $this->client->adminInitiateAuth([ 'AuthFlow' => 'ADMIN_NO_SRP_AUTH', 'ClientId' => $this->client_id, 'UserPoolId' => $this->userpool_id, …
imlokeshs
  • 195
  • 1
  • 1
  • 10
5
votes
3 answers

Can't pass my credentials to AWS PHP SDK

I installed AWS PHP SDK and am trying to use SES. My problem is that it's (apparently) trying to read ~/.aws/credentials no matter what I do. I currently have this code: $S3_AK = getenv('S3_AK'); $S3_PK = getenv('S3_PK'); $profile = 'default'; $path…
5
votes
2 answers

Response logging in AWS PHP SDK v3

In v2 of the AWS PHP SDK, I was able to setup logging of request and response information by simply doing this:
jmar
  • 452
  • 2
  • 14
5
votes
2 answers

Is there anyway to move AWS infrastructure from one region to another?

I have, EC2 x 8 AMIs x 2 RDS x 1 ELBs x 2 SG (security Groups) x 8 VPCs x 1 in Tokyo region. But I would like to move my entire setup to Oregon. Is there any tool I can utilise to do this? By mistake this question has "Move" in it. But I am…
TeaCupApp
  • 11,316
  • 18
  • 70
  • 150
4
votes
1 answer

Couldn't generate correct PASSWORD_CLAIM_SIGNATURE in PHP for Cognito

I am trying to use AuthFlow USER_SRP_AUTH for user login. I am getting the "PASSWORD_VERIFIER" challenge in the response of initiateAuth request. While responding to that challenge I am not sure what I should pass as the value of…
Vivek Pipaliya
  • 488
  • 1
  • 7
  • 17
4
votes
2 answers

S3 listObjectsV2 - StartAfter does not show intended results

I am trying to get all files in a bucket that come after a certain identifier. Here is my code, omitted the non-relevant parts. require_once LIB . DS . 'Aws/vendor/autoload.php'; use Aws\S3\S3Client as S3Client; use Aws\Credentials as…
web-nomad
  • 6,003
  • 3
  • 34
  • 49
4
votes
1 answer

Get AWS S3 Object with spaces in filename

I'm trying to download an object from AWS S3 using the SDK for PHP. $filename = "filename with spaces in it.jpg"; $src = "path/from/bucket-root/".$filename; $result = S3Client->getObject([ 'Bucket' => 'my-bucket-name', 'Key' =>…
yevg
  • 1,846
  • 9
  • 34
  • 70
1
2
3
20 21