Download the PHP package jstormes/aws-tools without Composer
On this page you can find all versions of the php package jstormes/aws-tools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jstormes/aws-tools
More information about jstormes/aws-tools
Files in jstormes/aws-tools
Package aws-tools
Short Description A very light weight wrapper around AWS services as a PHP composer package.
License GPL-3.0-or-later
Informations about the package aws-tools
AWS Tools
A wrapper around AWS services to make the easier to use in PHP.
Quickstart
PHP on Bare Metal
Clone project
git clone [email protected]:jstormes/AWSTools.git
cd AWSTools
Use composer to install AWS dependencies
composer install
Make sure AWS is set up for you CLI environment.
You should have .aws in your home directory with proper
credentials
and config
files. Your access_key MUST
have permissions to create CloudWatch Logs and Streams.
Run the demos:
./bin/cli-demo-minimal.php
./bin/cli-demo-lazy-vs-direct.php
./bin/cli-demo-dynamic-severity.php
./bin/cli-demo-formatters.php
./bin/cli-demo-log-context-obj.php
Look in the CloudWatch logs to see the output from the examples.
PHP in Docker
TBD
Known issues
-
If you have two PHP apps running at the same time and logging to the same stream, you will have issues with sequenceToken, this will cause a performance issue. You need to make sure each PHP Application instance (aka Docker Instance) gets its own stream. My current ideas is to use the HOSTNAME as it is unique to each Docker instance as part of the stream name.
- An extension of the previous issue is two long-running scrips on the same docker instance. It might be necessary to use shared memory and lock to make sure the sequenceToken is correct across the two running PHP instances. Embrace the statelessness of the cloud!!! Or let the call fail and try to recover the sequenceToken, that might be a performance nightmare.
To Do
- Allow S3 file for stack dump.
- Better use of Stream Naming, not sure how but perhaps something with the
Formatter
- Create examples of
try
catch
use case - Create examples of
set_error_handler
use case - Create ZF2 DI use case example
- Create squelch option and use case examples
- Create method for chaining
formatter
- Create example of using
formatter
to call a new instance ofLogs