I am using AWS and Curl to send a request to a web service that connects to port 8080, I have already consumed another web service that connects to different ports and I have no problem, but with this,…
Tag: amazon-web-services
php Api hosted on AWS s3 bucket
I wanna host a php file that retrieve data from a mysql DB how ever aws is not authorizing POST method. I need to know how can I add the code in PHP knowing I already configured the Bucket policy and …
AWS IOT: Get Thing connection status
I currently have a bunch or things registered in the AWS IOT console. i am building a web-page that will list things and display attributes from each things shadow. i am struggling to understand how do i know if a thing is currently online in (near) real time. I am retrieving the things using the PHP SDK I am displaying
WebSockets – send json data via php
I’m trying to send a fire-and-forget request from PHP to my websocket aws api gateway. I’ve set up an action called “sendmessage”. This is the code I’m using: However, nothing happens. If I use wscat, like: it works just fine. What am I doing wrong in my php code? Note: I need the socket connection to be persistent (the way
How to intercept a new file on S3 using Laravel Queues?
I have an S3 bucket, mybucket, and I want to execute something when a new file is copied into that bucket. For the notifications, I want to use an SQS queue, notifiqueue, because my goal is to access that queue with Laravel Since I am creating my infrastructure in CloudFormation, the resources are created like this: Each time a new
AWS SDK PHP – Cannot read credentials from /.aws/credentials
There seems to be an error either in the documentation or the SDK itself. The SDK keeps looking for the standard credentials file while there is none. It fails with this error: Does anybody have a clue on how fix this? Answer I removed ‘profile’ => ‘default’, from the s3client and it worked. It seemed the profiles were defined twice.
Can’t get mbstring to work on Amazon linux 2 AMI
I run on Amazon linux 2 AMI, With PHP 7.2.5 and apache The probleme is: Call to undefined function mb_convert_encoding The initial need is to be able to read an uploaded text file correctly and have its content inserted in DB, knowing that the encodings can be various The problem i am struggling with is to get mb_convert_encoding working !
Laravel 5.6 aws cloudwatch log
Upgraded laravel from 5.4 to 5.6. Laravel removed $app->configureMonologUsing since version 5.6 the tutorial from aws not applicable anymore. https://aws.amazon.com/tw/blogs/developer/php-application-logging-with-amazon-cloudwatch-logs-and-monolog/ anyone can advise me where to migrate the logic inside $app->configureMonologUsing ? thanks Answer Install the latest version of CloudWatch handler library with: You can add a custom channel in config/logging.php like: and a factory class App/Logging/CloudWatchLoggerFactory.php as:
DynamoDb batchGetItem and Partition Key and Sort Key
I tried to use batchGetItem to return attributes of more then one item from a table but seems it works only with the combination of the partition key and range key, but what if I want to identify the requested items only by primary key ? is the only way is to create the table without the range key ?
How do I upload a gzip object to s3?
I am creating a gzip string and uploading it as an object to s3. However when I download the same file from s3 and decompress it locally with gunzip I get this error: gunzip: 111.gz: not in gzip format When I look at the mime_content_type returned in the file downloaded from s3 it is set as: application/zlib Here is the