User guide
Note
For now, you can leave the provisioned throughput settings at their minimum values of 1
read capacity unit and 1 write capacity unit. This will allow applications to read or write
session data at the rate of once per second. If you expect higher rates of usage, you can
come back to the DynamoDB console and increase these settings.
For more information, go to Provisioned Throughput in the Amazon DynamoDB Developer
Guide.
When all your options are entered as you want them, click Continue.
5. On the Throughput Alarms page, select the Use Basic Alarms check box. This automatically
configures Amazon CloudWatch alarms to notify you if read and write consumption reaches 80% of
the table's provisioned throughput.
In the Send notification to text box, enter your email address.This is the address to which
CloudWatch will send notification emails.
When all your options are entered as you want them, click Continue.
6. Review the options for your table:
• If you need to correct any options, click Back to return to previous panels and make corrections.
• When all your options are entered as you want them, click Create.
The ASP.NET_SessionState table is ready for use when its status changes from CREATING to ACTIVE.
Note
If you decide not to create the table beforehand, the session state provider will create the table
for you during its initialization. See the web.config options below for a list of attributes that act
as configuration parameters for the session-state table. If the provider creates the table, it will
use these parameters.
Configure the Session State Provider
To configure an ASP.NET application to use DynamoDB as the session state server
1. Add references to both AWSSDK.dll and AWS.SessionProvider.dll to your Visual Studio
ASP.NET project. These assemblies are available by installing the AWS SDK for .NET (p. 4) or
you can install them using NuGet (p. 39).
In earlier versions of the SDK, the functionality for the session state provider was contained in
AWS.Extension.dll. To improve developer usability the functionality was moved to
AWS.SessionProvider.dll. For more information, see the blog post AWS.Extension Renaming.
2. Edit your application's Web.config file: in the system.web element, replace the existing
sessionState element with the following XML fragment:
<sessionState
timeout="20"
mode="Custom"
customProvider="DynamoDBSessionStoreProvider">
<providers>
<add name="DynamoDBSessionStoreProvider"
type="Amazon.SessionProvider.DynamoDBSessionStateStore"
AWSProfileName="profile_name"
Region="us-west-2"
Version v2.0.0
66
AWS SDK for .NET Developer Guide
Managing ASP.NET Session State with Amazon
DynamoDB