Mais conteúdo relacionado Semelhante a Developing serverless applications with .NET using AWS SDK & tools - MAD311 - New York AWS Summit (20) Mais de Amazon Web Services (20) Developing serverless applications with .NET using AWS SDK & tools - MAD311 - New York AWS Summit1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Developing serverless applications
with .NET using AWS SDK & tools
Steve Roberts
Senior Technical Evangelist
Amazon Web Services
M A D 3 1 1
2. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
What is CloudMosaic?
+ =
4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
What does the application illustrate?
• Developing modern, serverless .NET applications on AWS
• Using the AWS SDK and tools for .NET to work with AWS services
• AWS Lambda
• AWS Batch
• AWS Step Functions
• Amazon DynamoDB
• Amazon Cognito
• AWS Systems Manager
• Deploying to services using the tools that you are familiar with
• AWS Toolkit for Visual Studio
• AWS extensions for the dotnet CLI
5. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
6. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Overall architecture
Tile gallery
Tile data
8. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
What does tile ingestion do?
• It accepts a user’s .zip file that contains multiple images
• The .zip file is unpacked, and each image is analyzed to determine the average
color
• Each image is then resized and saved as a tile in a named gallery
10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
How tile ingestion works
11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Why did we choose AWS Batch?
• To take advantage of serverless
It manages the compute capacity for us
• Work can be queued for
asynchronous processing
Tile creation is not a time-critical task
• Cost savings
• No charge for idle compute environments
• Ability to use Amazon EC2 spot instances
Spot
instance(s)
On-demand
instance(s)
12. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Tile gallery ingestion review
• Using dead-letter queues (DLQs) to help detect and diagnose failures
• Using the AWS .NET Mock Lambda Test Tool to replay and debug failed events
in a DLQ
• Using AWS Batch
14. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
What does the mosaic rendering workflow do?
• Accepts an image file from the user plus the name of a tile gallery
• Analyzes the image against the tile data in the gallery
• Builds a new mosaic image using the matched tiles
16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
How mosaic rendering works
Select
tiles
(F#)
Small
render
Medium
render
Large
render
Completion
notification
Color
map
17. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Mosaic rendering workflow review
• How to use AWS Step Functions to orchestrate a workflow
• Deploying multiple projects with a single serverless template
• Using the dotnet lambda CLI global tool to deploy
19. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
What is the web front end responsible for?
• Allowing user registration and authentication
• Enabling signed-in users to
• Create new tile galleries
• Upload an image to create a mosaic
21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
How the front end works
22. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Web front end review
• Using high-level libraries from AWS to handle
• Identity
• Data protection (anti-forgery tokens)
• Application configuration at runtime
• Calling AWS Batch and AWS Step Functions from application code
• Deploying containers to AWS Fargate from Visual Studio
Can also use the dotnet ecs CLI tool
24. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Useful links
AWS .NET blog: https://aws.amazon.com/blogs/developer/tag/net/
AWS .NET Twitter handle: @awsfornet
GitHub
AWS .NET home: https://github.com/aws/dotnet
AWS SDK for .NET: https://github.com/aws/aws-sdk-net
AWS Lambda for .NET Core: https://github.com/aws/aws-lambda-dotnet
AWS .NET Global Tools: https://github.com/aws/aws-extensions-for-dotnet-cli
27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Additional extension libraries on GitHub
ASP.NET Core identity provider for Amazon Cognito:
https://github.com/aws/aws-aspnet-cognito-identity-provider
IConfiguration provider for AWS Systems Manager Parameter Store:
https://github.com/aws/aws-dotnet-extensions-configuration
ASP.NET Core DataProtection provider for AWS Systems Manager:
https://github.com/aws/aws-ssm-data-protection-provider-for-aspnet
28. Thank you!
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Steve Roberts
Twitter: @bellevuesteve