Building Scalable Windows and .NET Apps on AWS (TLS302) | AWS re:Invent 2013
Upcoming SlideShare
Loading in...5
×
 

Building Scalable Windows and .NET Apps on AWS (TLS302) | AWS re:Invent 2013

on

  • 1,586 views

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 ...

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.

Statistics

Views

Total Views
1,586
Views on SlideShare
1,582
Embed Views
4

Actions

Likes
0
Downloads
27
Comments
0

1 Embed 4

https://twitter.com 4

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Building Scalable Windows and .NET Apps on AWS (TLS302) | AWS re:Invent 2013 Building Scalable Windows and .NET Apps on AWS (TLS302) | AWS re:Invent 2013 Presentation Transcript

    • Building Scalable Windows and .NET Apps on AWS Norm Johanson & Jim Flanagan / AWS Developer Resources November 15, 2013 © 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.
    • 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
    • AWS Tools for the .NET Community • • • • AWS SDK for .NET AWS Tools for Windows PowerShell AWS Toolkit for Visual Studio AWS Elastic Beanstalk Container
    • 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
    • Application Architecture S3 Bucket CloudShotz {user123, image456} DynamoDB Table
    • How DynamoDB Works • Data is stored in Tables • Tables do not have a fixed schema • Tables have provisioned throughput
    • DynamoDB Keys Hash Key Range Key Attributes UserId ImageId S3Bucket S3Key 123 456 My-images Images/456 Key
    • Image: Wikimedia Commons DynamoDB Provisioned Throughput
    • Throttling Consumed Capacity Throttled Requests 7 600 6 500 5 4 3 2 400 300 200 1 100 0 0
    • DynamoDB and the .NET SDK • Low-level DynamoDB API – 1:1 API Mapping • Document-Based API – Key-value Dictionary • Object-Persistence API – Annotated Classes
    • 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);
    • Document Model API Table table = Table.LoadTable(this.ddbClient, "ImageMetadata"); Document document = new Document(); document["UserId"] = userId; document["ImageId"] = Guid.NewGuid(); document["Caption"] = "Cool Photo"; document["UploadDate"] = DateTime.Now; document["Bucket"] = bucketName; document["S3Key"] = s3Key; table.PutItem(document);
    • 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);
    • Amazon S3 • Unlimited Internet storage • Keys grouped by bucket • Objects are URL addressable
    • AWS Elastic Beanstalk • • • • Easy deployment management Creates all necessary AWS resources You retain full control Deploy .NET applications from Visual Studio
    • IAM Roles Action Resource ✔ s3:GetObject ✔ s3:PutObject my-s3-bucket ✔ dynamodb:GetItem ✔ Dynamodb:PutItem ImageMetadata
    • EC2 Instance Profiles EC2 SDK looks in multiple places for credentials Instance Profile AWS SDK ✖ Web.config ✔ Instance Profile Identity and Access Management EC2 Instance
    • Adding an Image Processing Worker S3 Bucket CloudShotz Elastic Beanstalk Environment DynamoDB Table
    • Adding an Image Processing Worker S3 Bucket CloudShotz Queue Elastic Beanstalk Environment DynamoDB Table
    • Adding an Image Processing Worker S3 Bucket Worker Reads from queue CloudShotz Queue Image Resizer Svc Elastic Beanstalk Environment DynamoDB Table
    • Adding an Image Processing Worker S3 Bucket CloudShotz Queue Image Resizer Svc Elastic Beanstalk Environment DynamoDB Table Worker gets image metadata from DynamoDB
    • Adding an Image Processing Worker S3 Bucket CloudShotz Queue Image Resizer Svc Elastic Beanstalk Environment DynamoDB Table Worker downloads full-size image from S3 bucket
    • Adding an Image Processing Worker S3 Bucket CloudShotz Queue Image Resizer Svc Elastic Beanstalk Environment DynamoDB Table Worker resizes image and puts thumbnail in S3 bucket
    • Adding an Image Processing Worker S3 Bucket CloudShotz Queue Image Resizer Svc Elastic Beanstalk Environment DynamoDB Table Worker updates image metadata In DynamoDB
    • Adding an Image Processing Worker S3 Bucket CloudShotz Queue Image Resizer Svc Elastic Beanstalk Environment DynamoDB Table Worker removes message from queue
    • 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
    • SDK Install Layout
    • Visual Studio Project Setup
    • Credential Management • Do not embed access credentials • Web identity federation – Supports Facebook, Google, and Amazon • Token Vending Machine
    • What’s Next? • Try out our SDK and Tools – AWS Website - http://aws.amazon.com/sdkfornet/ – Nuget - https://www.nuget.org/packages/awssdk – Open Source at GitHub - https://github.com/aws/aws-sdk-net • Let us know what you think – AWS Forums – GitHub – StackOverflow • Follow our blog http://blogs.aws.amazon.com/net/ (Twitter: @awsfornet)
    • Please give us your feedback on this presentation TLS302 As a thank you, we will select prize winners daily for completed surveys!