aws-php-sdk

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

江枫思渺然 提交于 2021-01-27 17:07:45
问题 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 simple html form... After filling everything, the request result in Access Denied :-(. The user associated with the client to generate the PostObjectV4 has Allowed s3:PutObject policy on the corresponding bucket. I've already tried to : Set my

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

丶灬走出姿态 提交于 2021-01-27 17:00:22
问题 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 simple html form... After filling everything, the request result in Access Denied :-(. The user associated with the client to generate the PostObjectV4 has Allowed s3:PutObject policy on the corresponding bucket. I've already tried to : Set my

How to setup amazon timestream in php?

折月煮酒 提交于 2021-01-07 01:20:41
问题 I have found the documentation for it here. I have PHP SDK installed. Now when I go through the documents there is not so much in detail about the PHP one. I have the following questions: Here how can I specify the $client $result = $client->createDatabase([ 'DatabaseName' => '<string>', // REQUIRED 'KmsKeyId' => '<string>', 'Tags' => [ [ 'Key' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ]); Is there any good documents or videos regarding the timestream in PHP

AWS Elastic Beanstalk - Environment must have instance profile associated with it

坚强是说给别人听的谎言 提交于 2020-06-27 11:59:10
问题 I am working on a project that will programmatically create environments in AWS elastic beanstalk. I am using the AWS SDK for PHP Version 3. My script creates the environment. From the AWS console, the environment is displayed in gray and says that it is terminated. Viewing the events shows that an error of "Environment must have instance profile associated with it". I have tried using the access key and secret of two different users. One user has AmazonEC2FullAccess, IAMFullAccess, and

AWS S3 Access Denied on delete

为君一笑 提交于 2020-05-29 10:35:06
问题 I have a bucket that I can write to with no problem. However, when I try to delete an object, I get an error ... AccessDeniedException in NamespaceExceptionFactory.php line 91 Following the very basic example here, I came up with this command ... $result = $s3->deleteObject(array( 'Bucket' => $bucket, 'Key' => $keyname )); I have tried variations of this based upon other tutorials and questions I have found. $result = $s3->deleteObject(array( 'Bucket' => $bucket, 'Key' => $keyname, 'Content

Setting the description and IPv6 using authorize-security-group-ingress of aws SDK

这一生的挚爱 提交于 2020-01-25 06:47:12
问题 I am using AWS SDK v1 ( old product needs that) to add a rule for a security group. My issue is if add description and IPv6 fields I got the response of: The parameter Description is not recognized And The parameter Ipv6Ranges is not recognized This is the documentation I followed to construct the request. My code: $ec2 = new AmazonEC2(); $response = $ec2->authorize_security_group_ingress([ 'GroupId' => $secGrpID, 'IpPermissions' => [ [ 'FromPort' => $portNum, 'IpProtocol' => $protocol,

Move files from EC2 to S3 and then delete from EC2

僤鯓⒐⒋嵵緔 提交于 2020-01-06 06:44:28
问题 I'm migrating files from one remote server to S3. There are about 10k files (all accessible via http URLs from the remote server). The total size is about 300GB (no individual file is more than 1GB). I'm trying to figure out the most efficient way to make this migration. So far I have a EC2 instance and I have the S3CMD installed; PHP-SDK, I have a text file with all the URL's as well. I'm able to move files from EC2 to S3 without any issue. but the problem is if I download everything in EC2

Move files from EC2 to S3 and then delete from EC2

落爺英雄遲暮 提交于 2020-01-06 06:44:07
问题 I'm migrating files from one remote server to S3. There are about 10k files (all accessible via http URLs from the remote server). The total size is about 300GB (no individual file is more than 1GB). I'm trying to figure out the most efficient way to make this migration. So far I have a EC2 instance and I have the S3CMD installed; PHP-SDK, I have a text file with all the URL's as well. I'm able to move files from EC2 to S3 without any issue. but the problem is if I download everything in EC2

AWS PHP SDK Credentials error S

馋奶兔 提交于 2019-12-23 05:19:08
问题 I get the following error when trying to create an SNSClient object. InstanceProfileCredentialsException in InstanceMetadataClient.php line 85: Error retrieving credentials from the instance profile metadata server. When you are not running inside of Amazon EC2, you must provide your AWS access key ID and secret access key in the "key" and "secret" options when creating a client or provide an instantiated Aws\Common\Credentials\CredentialsInterface object. (Client error response [status code]

AWS-PHP-SDK / SNS direct addressing returns error

纵然是瞬间 提交于 2019-12-12 19:19:19
问题 Hi I am using Laravel 4 setup to make use of AWS SNS to send a push message to my iOS device, the publish command to my device works well from AWS console. I then tried from PHP: $sns = AWS::get('sns'); $sns->publish(array( 'Message' => 'Hello from PHP', 'TargetArn' => "arn:aws:sns:us-west-2:360542326270:endpoint/APNS_SANDBOX/Testtest/20a75cd1-da25-3331-8126-4db497cbdd5e" )); I am getting Guzzle \ Service \ Exception \ ValidationException Validation errors: [TopicArn] is a required string: