Download the PHP package cinghie/yii2-aws without Composer

On this page you can find all versions of the php package cinghie/yii2-aws. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-aws

Yii2 AWS

License Latest Stable Version Latest Release Date Latest Commit Total Downloads

Yii2 AWS integrates AWS SDK for PHP v3 into Yii2 applications and provides wrappers for:

Current package version: 0.3.0 (requires aws/aws-sdk-php ^3.0; tested with 3.389.0, the latest Packagist release at time of writing).

Installation

Or add the package to composer.json:

Basic Configuration

Configure the aws component and, if you need the included dashboards, the aws module.

With this configuration credentials are not stored in code: AWS SDK uses its native credential provider chain, including environment variables, IAM roles, container credentials, local profiles, and other supported providers.

Credentials

Recommended Option: IAM, Env Or Provider Chain

Environment variables supported by AWS SDK:

Local AWS Profile

Static Credentials

Use static credentials only when an IAM, env, or profile based setup is not available.

If only one of accessKey or secretKey is configured, the component throws InvalidConfigException.

AWS SDK Options

The component exposes the main Aws\Sdk options:

sdkOptions is passed directly to the Aws\Sdk constructor, so it can be used for advanced options that are not exposed as dedicated component properties.

Security note: debug => true is refused when YII_DEBUG is false, because the SDK may log signing/credential material.

Service clients (getS3Client(), getSesClient(), getSesV2Client(), getSnsClient()) are lazy-cached on the component. Models reuse those shared clients unless you inject a mock via setters.

Error Handling

The services do not write flash messages and do not convert AWS errors into empty arrays.

The contract is:

Example:

The included dashboards already catch AwsException in their controllers, log the detailed error, and display a generic message in the UI.

Input Validation

The wrappers validate common input mistakes before calling AWS. This keeps application errors deterministic and avoids sending obviously invalid requests to AWS.

Validated inputs include:

These checks are intentionally strict for common application use. AWS remains the final authority for service-specific edge cases.

Client Injection And Tests

Models can receive specific AWS clients through Yii configuration. This simplifies testing, mocking, and application-level overrides.

Available setters:

If no client is injected, the model reuses the lazy client from Yii::$app->aws.

Amazon S3

Basic Usage

Create A Bucket

Upload A File

Large File (Multipart) And Presigned GET

Also available: getObject(), deleteObject(), doesObjectExist().

MinIO Or S3-Compatible Configuration

Amazon SES

Verify Identities

List Email Identities

Create A Template

Send A Templated Email

SESv2 (Draft) Simple Send

Prefer SESv2 for new sending code:

Create A Receipt Filter

Create A Receipt Rule With Recipients

Amazon SNS

SNS methods no longer have fake default values: protocol, endpoint, and topic must always be passed explicitly.

Create A Topic

Subscribe An Email Endpoint

Subscribe An HTTPS Endpoint

Yii2 Dashboards

The module exposes basic dashboards for the services:

Access is controlled by awsRoles:

Overrides

Controllers

Models

The bootstrap process registers model overrides in Yii's DI container. Query aliases such as S3Query, SESQuery, and SNSQuery are registered only when the mapped class extends yii\db\ActiveRecord; plain service models are not treated as ActiveRecord classes.

Views

Frontend Filter

In a Yii2 Advanced App, frontend module actions can be hidden with the included filter.

Operational Suggestions

AWS Documentation


All versions of yii2-aws with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version ^2.0.14
aws/aws-sdk-php Version ^3.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cinghie/yii2-aws contains the following files

Loading the files please wait ...