User guide

/>
</providers>
</sessionState>
The profile represents the AWS credentials that are used to communicate with DynamoDB to store
and retrieve the session state. If you are using the AWS SDK for .NET and are specifying a profile
in the appSettings section of your application's Web.config file, you do not need to specify a
profile in the providers section; the AWS .NET client code will discover it at run time. For more
information, see Configuring Your AWS SDK for .NET Application (p. 8).
If the web server is running on an Amazon EC2 instance that is configured to use IAM roles for EC2
instances, then you do not need to specify any credentials in the web.config file. In this case, the
AWS .NET client will use the IAM roles credentials. For more information, see Tutorial: Using an IAM
Role (p. 108) and Security Considerations (p. 68).
Web.config Options
You can use the following configuration attributes in the providers section of your web.config file:
AWSAccessKey
Access key ID to use.This can be set either in the providers section or in the appSettings
section.We recommend not using this setting. Instead, specify credentials by using AWSProfileName
to specify a profile.
AWSSecretKey
Secret key to use.This can be set either in the providers section or in the appSettings section.
We recommend not using this setting. Instead, specify credentials by using AWSProfileName to
specify a profile.
AWSProfileName
The profile name that is associated with the credentials that you want to use. For more information,
see Configuring Your AWS SDK for .NET Application (p. 8).
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.
Version v2.0.0
67
AWS SDK for .NET Developer Guide
Managing ASP.NET Session State with Amazon
DynamoDB