The AWS SDK for .NET and the AWS Toolkit for Visual Studio help developers build scalable apps on AWS services. Learn how to use these tools to define app data in Amazon DynamoDB and access it through a simple object persistence framework. We demonstrate deploying a web app to a customized, auto-scaled AWS Elastic Beanstalk environment. Finally, using the new version of the AWS SDK for .NET, you learn how to access your AWS data from apps targeting the Windows Store and Windows Phone platforms.
2. What We’ll Learn
•
•
•
•
Using Amazon DynamoDB with .NET
Deploying to AWS Elastic Beanstalk
Customizing Our Beanstalk Environments
Using Our SDK for Windows Store Applications
3. AWS Tools for the .NET Community
•
•
•
•
AWS SDK for .NET
AWS Tools for Windows PowerShell
AWS Toolkit for Visual Studio
AWS Elastic Beanstalk Container
4. AWS Tools for the .NET Community
• AWS SDK for .NET – Version 2
– Supports WinRT and Windows Phone 8
• AWS Toolkit for Visual Studio
– Supports Visual Studio 2010, 2012, and 2013
• AWS Elastic Beanstalk Container
– Container customization
– Instance Profiles
– Single Instance Environments
10. DynamoDB and the .NET SDK
• Low-level DynamoDB API
– 1:1 API Mapping
• Document-Based API
– Key-value Dictionary
• Object-Persistence API
– Annotated Classes
11. Low Level API
PutItemRequest putRequest = new PutItemRequest() {
TableName = "ImageMetadata",
Item = new Dictionary<string, AttributeValue> {
{"UserId", new AttributeValue {S = userId}},
{"ImageId", new AttributeValue {S = Guid.NewGuid().ToString()}},
{"Caption", new AttributeValue {S = "Cool Photo"}},
{"UploadDate", new AttributeValue {
S = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ")}},
{"Bucket", new AttributeValue {S = bucketName}},
{"S3Key", new AttributeValue {S = s3Key}}
}
};
PutItemResponse putResponse = this.ddbClient.PutItem(putRequest);
13. Object Persistence Model API
ImageMetadata image = new ImageMetadata(DateTime.Now, userId);
image.Caption = "Cool Photo";
image.S3Bucket = bucketName;
image.S3Key = s3Key;
context.Save<ImageMetadata>(image);
14. Amazon S3
• Unlimited Internet storage
• Keys grouped by bucket
• Objects are URL addressable
15. AWS Elastic Beanstalk
•
•
•
•
Easy deployment management
Creates all necessary AWS resources
You retain full control
Deploy .NET applications from Visual Studio
26. Windows Store & Windows Phone
• New in version 2 of the SDK
• Asynchronous API only
• Service level support
– Windows Phone has 11 services
– Window Store supports all services
• Separate assemblies for each platform