The Amazon DynamoDB Session Store handles sessions for Ruby web applications using a DynamoDB backend. The session store is compatible with all Rack-based frameworks. For Rails applications, use the aws-sdk-rails gem. The session store is a Rack Middleware, meaning that it will implement the Rack interface for dealing with HTTP request/responses. This session store uses a DynamoDB backend in order to provide scaling and centralized data benefits for session storage with more ease than other containers, like local servers or cookies. Once an application scales beyond a single web server, session data will need to be shared across the servers. DynamoDB takes care of this burden for you by scaling with your application. Cookie storage places all session data on the client side, discouraging sensitive data storage. It also forces strict data size limitations. DynamoDB takes care of these concerns by allowing for a safe and scalable storage container with a much larger data size limit.
Features
- The session store is compatible with all Rack based frameworks
- Certain configuration options can be loaded from the environment
- Clear sessions older than one day or that have been stale for longer than an hour
- You can delete old sessions from your session table
- You can pass in your own error handler for raised exceptions
- Run the session store as a Rack middleware