User guide
Region
Required string attribute.The AWS region in which to use Amazon DynamoDB. For a list of available
AWS regions, go to the Regions and Endpoints documentation.
Application
Optional string attribute.The value of the Application attribute is used to partition the session
data in the table so that the same table can be used for more than one application.
Table
Optional string attribute.The name of the table used to store session data. The default is
ASP.NET_SessionState.
ReadCapacityUnits
Optional int attribute.The read capacity units to use if the provider creates the table.The default
is 10.
WriteCapacityUnits
Optional int attribute.The write capacity units to use if the provider creates the table.The default
is 5.
CreateIfNotExist
Optional boolean attribute.The CreateIfNotExist attribute controls whether the provider will
auto-create the table if it doesn't exist. The default is true. If this flag is set to false and the table
doesn't exist, an exception will be thrown.
Security Considerations
Once the DynamoDB table is created and the application is configured, sessions can be used as with
any other session provider.
As a security best practice, we recommend that you run your applications with the credentials of an AWS
Identity and Access Management (IAM) user.You can use either the AWS Management Console or the
AWS Toolkit for Visual Studio to create IAM users and define access policies.
The session state provider needs to be able to call the DeleteItem, DescribeTable, GetItem, PutItem
and UpdateItem operations for the table that stores the session data.The sample policy below can be
used to restrict the IAM user to only the operations needed by the provider for an instance of DynamoDB
running in us-east-1:
{
"Version" : "2008-10-17",
"Statement" : [
{
"Sid" : "1",
"Effect" : "Allow",
"Action" : [
"dynamodb:DeleteItem",
"dynamodb:DescribeTable",
"dynamodb:GetItem",
"dynamodb:PutItem",
"dynamodb:UpdateItem"
],
"Resource" : "arn:aws:dynamodb:us-east-1:<YOUR-AWS-ACCOUNT-
ID>:table/ASP.NET_SessionState"
}
]
}
Version v2.0.0
42
AWS SDK for .NET Developer Guide
Security Considerations