guenbakku / simple-aws-manager
Simple CakePHP Plugin for managing AWS resources
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 2
Type:cakephp-plugin
pkg:composer/guenbakku/simple-aws-manager
Requires
- php: >=7.0
- aws/aws-sdk-php: ^3.31
- cakephp/cakephp: ^3.4
Requires (Dev)
- phpunit/phpunit: ^5.7|^6.0
This package is auto-updated.
Last update: 2025-10-23 20:38:51 UTC
README
A simple CakePHP 3 plugin for managing AWS resources. Currently this can only list and restart EC2 instances.
Requirement
- PHP 7.0 or higher
- CakePHP 3.4 or higher
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require guenbakku/simple-aws-manager
Configure:
Load plugin
Add following into bottom of your bootstrap.php:
Plugin::load('Guenbakku/Sam', ['bootstrap' => true, 'routes' => true]);
Configure AWS credentials
Create file sam.php in your directory config with following content:
<?php return [ 'Guenbakku/Sam' => [ 'credentials' => [ 'default' => [ 'key' => 'xxxxxx', 'secret' => 'xxxxxx', ], 'uses' => 'default', ] ], ];
Note:
- You can override plugin's config content by simply write same key into your
config/sam.php. - Please set right policy for credentials which you attend to use with this plugin.
Sample of AWS Policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ec2:RebootInstances"
],
"Condition": {
"StringEquals": {
"ec2:ResourceTag/User": "me"
}
},
"Resource": "*"
}
]
}
Access to plugin
Input following URL into web browser's address bar:
http://your.domain/path-to-cakephp-root/sam
path-to-cakephp-root is optional if your cakephp app is not pointed directed by your domain.
Here is a screenshot of plugin:
