PHPackages                             kenxudk/yii2-dynamodb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. kenxudk/yii2-dynamodb

ActiveLibrary[Database &amp; ORM](/categories/database)

kenxudk/yii2-dynamodb
=====================

Logical query of aws dynamodb

1.0.1(3y ago)133MITPHPPHP &gt;=7.0

Since Oct 9Pushed 3y agoCompare

[ Source](https://github.com/kenxudk/yii2-dynamodb)[ Packagist](https://packagist.org/packages/kenxudk/yii2-dynamodb)[ RSS](/packages/kenxudk-yii2-dynamodb/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

[![996.icu](https://camo.githubusercontent.com/ac8f294a80f65338db545230f1a881b9a382204a1f187c6ff40ee679d42d40ca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c696e6b2d3939362e6963752d7265642e737667)](https://996.icu)

yii2-dynamodb
=============

[](#yii2-dynamodb)

A aws dynamodb insert, delete, update, select package （一个简单的aws dynamodb 链路操作封装类）

composer
========

[](#composer)

```
composer require kenxudk/yii2-dynamodb

```

description
===========

[](#description)

Because I used the YII2 framework, the log is yii, and the AWS package is placed under the vender. The configuration file for this class is in params.php. as follows:

因为我用的时YII2框架，所以日志用的是yii的，并且AWS包放在vender下面，这个类的配置文件在params.php里面,如下：

```
   'aws'=>[
        'region'=>'ap-southeast-1',
        'version'=>'',
        'key'=>"",
        'secret'=>"",
    ],

```

simple use
==========

[](#simple-use)

TABLE\_NAME is the name of the table you are using, TABLE\_INDEX is currently using the index name （说明TABLE\_NAME是你使用表名，TABLE\_INDEX当前使用的索引名称）

### add

[](#add)

```
$result = Dynamodb::table(TABLE_NAME)->insert($data);

```

### update

[](#update)

```
$expressValue = $updata = $expressName = [];
$i = 0;
foreach ($up_arr as $key => $value) {
    $f = '#f'.$i;
    $v = ':v'.$i;
    $expressName[$f] = $key;
    $updata[] = [$f,$v];
    $expressValue[$v] = $value;
    $i++;
}
 $result = KmDynamodb::table(TABLE_NAME)->expressValue($expressValue)->kWhere(['pk_id'=>$primary_key])->expressName($expressName)->update($updata);

```

### select

[](#select)

#### Get multiples with the primary key (batchGetItem)

[](#get-multiples-with-the-primary-key-batchgetitem)

```
    $keys = [];
    foreach ($primary_keys as $primary_key) {
        $keys[] = ['kid' => $primary_key];
    }
    $feeds = Dynamodb::table(TABLE_NAME)->kWhere($keys)->order(true)->ones();

```

#### Get one with the primary key (getItem)

[](#get-one-with-the-primary-key-getitem)

```
   Dynamodb::table(TABLE_NAME)->kWhere(['kid'=>$primary_key])->one();

```

#### query

[](#query)

```
 Dynamodb::table(TABLE_NAME,TABLE_INDEX)->kWhere('kid=:v')
 ->expressValue([':v'=>$primary_key])->limit(10,[])->query();

```

### delete

[](#delete)

```
Dynamodb::table(TABLE_NAME)->kWhere(['kid'=>$primary_key])->delete();

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1311d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/244d3fb436ae5662e7378d8b4dbdcf38a4a0a594f5948343725f48b072d03089?d=identicon)[kenxudk](/maintainers/kenxudk)

---

Top Contributors

[![kenxudk](https://avatars.githubusercontent.com/u/33343488?v=4)](https://github.com/kenxudk "kenxudk (19 commits)")

---

Tags

dynamodbphpyii2phpawsdynamodbyii2

### Embed Badge

![Health badge](/badges/kenxudk-yii2-dynamodb/health.svg)

```
[![Health](https://phpackages.com/badges/kenxudk-yii2-dynamodb/health.svg)](https://phpackages.com/packages/kenxudk-yii2-dynamodb)
```

###  Alternatives

[aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PHP.

1.7k35.6M75](/packages/aws-aws-sdk-php-laravel)[baopham/dynamodb

Eloquent syntax for DynamoDB

4975.7M6](/packages/baopham-dynamodb)[kettle/dynamodb-orm

A lightweight object-dynamodb mapper for PHP

49210.0k](/packages/kettle-dynamodb-orm)[fedemotta/yii2-aws-sdk

This extension provides the AWS SDK integration for the Yii2 framework

15430.4k2](/packages/fedemotta-yii2-aws-sdk)[oryxcloud/laravel-dynamodb-session-driver

DynamoDB Session Driver for Laravel 5

1460.8k](/packages/oryxcloud-laravel-dynamodb-session-driver)[infinitypaul/laravel-dynamodb-auditing

DynamoDB driver for Laravel Auditing package

113.5k](/packages/infinitypaul-laravel-dynamodb-auditing)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
