Awesome Open Source
Awesome Open Source

DynamoDB Adapter

Migrated to

DynamoDB Adapter is the DynamoDB adapter for Casbin. With this library, Casbin can load policy from DynamoDB or save policy to it.


go get

Simple Example

package main

import (

func main() {
	// Initialize a DynamoDB adapter and use it in a Casbin enforcer:
	config := &aws.Config{} // Your AWS configuration
	ds := "casbin-rules"
	a := dynacasbin.NewAdapter(config, ds) // Your aws configuration and data source.
	e := casbin.NewEnforcer("examples/rbac_model.conf", a)

	// Load the policy from DB.

	// Check the permission.
	e.Enforce("alice", "data1", "read")

	// Modify the policy.
	// e.AddPolicy(...)
	// e.RemovePolicy(...)

	// Save the policy back to DB.

Getting Help

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Go (160,616
Adapter (11,213
Dynamodb (3,399
Casbin (288