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
Tag: amazon-web-services
Htaccess giving 404 error on Aws Linux 2 AMI
I have set up an elastic beanstalk and deployed my application to it, the application has a .htaccess file in it. .htaccess works perfectly on my localhost but when checking it on the live server it gives back a 404 error. For Example I have a login file named login_1.php, on my .htaccess I’ve set the file to be called
AWS SQS only receiving 1 message from two different dispatch
Currently, I’m using the AWS PHP SDK to communicate with AWS SQS. I’m using a FIFO queue. We have different “models” that need to communicate with SQS, therefore they all have different message group ids in order to make SQS more efficient in processing the data. I’ve made a method that dispatches calls to AWS SQS called DispatchSQSJob($arrayData, $messageGroupId =
How do I manage read and write AWS Aurora host endpoints in CakePHP?
I am working with a CakePHP based API that utilizes AWS Aurora to manage our MySQL database. The CakePHP application has many large read queries that that requires a separate Reader Endpoint to not exhaust the database resources. The way this works is that AWS gives you separate endpoints to use in the host field when you connect CakePHP to
PHP S3 – How to get all versions of a specific file
I have a Laravel project and a version enabled S3 bucket. I can list the versions of all objects within the bucket using the listObjectVersions method. My attempt to list the versions of a specific object is as follows: This seems to get all objects within the bucket which is not what I want. Is there a way to get
PHP – How to cache database credentials retrieved from AWS KMS Parameter Store
I’m running a PHP application that connects to a RDS database using username and password to serve data to clients. The username and password are retrieved from AWS KMS as encrypted string using AWS SSM client. I do this for every single request to the PHP app to open up a connection to the database. So the flow looks something
The path of a URI with an authority must start with a slash “/” or be empty. DigitalOcean Spaces AWS S3 SDK PHP
I don’t fully understand this error, I have tried changing the header request, I don’t know what else to try, I am blank at the moment. I have also assumed it is a problem in the headers. Currently my header request looks like this: I will also leave the respective php codes: part where I manage the file for the
Safe location to write oauth key files in laravel
I am deploying my laravel application to AWS Elastic Beanstalk and I’m encountering the problem of persisting the oauth keys for laravel passport. I went through this and this. While the S3 option sounds reasonable, I still wanted a more secure way and wanted to checkout secret manager from AWS. Since laravel passport provides the option to load keys from
AWS CloudFront for PHP hosting
I’m new to AWS and am having some difficulties understanding CloudFront. I have started off with one EC2 instance with NGINX, MySQL, and some PHP files within the public folder to expose APIs to the world. Then I was told CloudFront could be used to protect the instance from malicious attacks. I figured CloudFront required an Elastic Load Balancer. So
How to delete files automatically after one month?
I’m using S3 as a storage for my files and I have some files I need to delete them after like one month! I know I have to use laravel scheduler but these files that I need to delete is not store in database to just delete them! So is there any to delete the files in the bucket based