<<

Containers & Service

Kirk Davis Senior Solutions Architect

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Containers

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. containers

Container Runtime

Docker Engine Linux Container Linux Container

containerD App App

Linux Kernel

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Windows Containers ( containers)

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Windows Hyper-V container vs process container

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Windows Base Container Images

. Windows Nanoserver . Windows . Windows

docker pull mcr..com/windows/nanoserver:1909 docker pull mcr.microsoft.com/windows/servercore:1909 docker pull mcr.microsoft.com/windows:1909

*Current versions are ltsc2019 or 1909

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. mcr.microsoft.com/windows/nanoserver

• Smallest base layer available for Windows • Only 64-bit applications • No graphical applications • . Core • Only PowerShell Core is available • PowerShell Core not included by default (version 1709 onwards)

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. mcr.microsoft.com/windows/servercore

• Minimal installation of 2016/2019 • Windows PowerShell • .NET Core & .NET Framework • No Widows Desktop • Great for migrating existing Windows applications to containers

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. mcr.microsoft.com/windows

• Full installation of • Windows PowerShell • .NET Core & .NET Framework • Widows Shell Desktop including DirectX (but you can’t RDP into it) • Useful for automating builds and testing that rely on GUI APIs

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. .NET Core container images

. Container with .NET Core 3.1 runtime . Container with ASP.NET Core 3.1 . Container with .NET Core 3.1 SDK

docker pull mcr.microsoft.com/dotnet/core/runtime:3.1 docker pull mcr.microsoft.com/dotnet/core/aspnet:3.1 docker pull mcr.microsoft.com/dotnet/core/sdk:3.1

*Current .NET Core version is 3.1

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. .NET Framework vs .NET Core containers

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Container Orchestration Services

Amazon ECS Amazon EKS

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ECS and ECS comparison

Amazon ECS Amazon EKS . Original AWS container . Managed Kubernetes service orchestration service introduced in 2018 . Supports Linux & Windows . Supports Linux & Windows . Just docker hosts . Master node + worker nodes . Supports Fargate . Supports Fargate “serverless “serverless containers” containers” . Launch using ECS CLI, AWS . Launch using eksctl CLI, or AWS .NET tool for ECS

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Elastic Container Registry

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Other topics….

. ECS Service Discovery . AWS App Mesh . Running containers in Elastic Beanstalk . Running containers on vanilla EC2

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Owning servers means dealing with ...

Operations and management Scaling

Provisioning and utilization Availability and fault tolerance

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Benefits of Lambda and serverless compute

No servers to provision Scales with usage or manage

Never pay for idle Availability and fault tolerance built in © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Lambda pricing

• Buy compute in Free Tier 100 ms increments 1 million requests and 400,000 GBs of compute every month, every customer • Low request charge $0.0000002 per request (Ohio) • No hourly, daily, or monthly minimums • No per-device fees • No paying for idle

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Architecture

Event source Target

Changes in Lambda data state

Requests to endpoints Changes in resource state … C# (.NET Core) Any service Python Java Node.js Go Ruby Custom*

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Services for building serverless applications

Compute and API Proxy

AWS Lambda Amazon API Gateway AWS Fargate

Database, Storage, Orchestration, Analytics, Interprocess Messaging

Amazon DynamoDB AWS Step Functions Amazon SQS

Amazon S3 Amazon Kinesis Amazon SNS

Developer Tools

AWS -Ray AWS CodeBuild Third-Party Tools

AWS SAM AWS CodePipeline Open Source © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Anatomy of a Lambda function

Handler() function Event Object Context Object

Methods available to interact Function to be executed upon Data sent during Lambda with runtime information invocation function invocation (request ID etc)

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Lambda execution models

Synchronous Asynchronous Stream based*

API Gateway S3 Kinesis Stream

//resource

Lambda Function RDS Service S3 Bucket

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Example event sources that trigger AWS Lambda

DATA STORES ENDPOINTS

Amazon S3 Amazon Amazon Amazon Amazon AWS IoT AWS Step Amazon DynamoDB Kinesis Cognito API Gateway Functions Alexa

CONFIGURATION REPOSITORIES EVENT/MESSAGE SERVICES

AWS AWS CloudTrail AWS Amazon Amazon Amazon SNS Cron events CloudFormation CodeCommit CloudWatch SES

And more, with new integrations added all the time

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon API Gateway: Serverless APIs

AWS

/api/orders API Gateway Cache Mobile Apps

/api/catalog

Internet Websites Amazon CloudFront Amazon API Gateway

/api/cart

Services

Amazon CloudWatch Monitoring /api/inventory © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lambda layers

. Centrally manage code and data that is shared across multiple functions. . Keep deployment packages small, and avoid errors that can occur when you install and package dependencies with your function code. . A layer is a ZIP archive that contains libraries, a custom runtime, or other dependencies. . .NET support for Lambda layers is enabled by the Amazon.Lambda.Tools NuGet package (.NET Core Global Tool) Allows you to create and inspect layers, and deploy layer-aware functions . Using layers enables you to pre-JIT the platform-agnostic MSIL into native machine code, significantly reducing cold- times! (Requires publishing the layer from an Amazon Linux AMI EC2 instance)

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Custom Runtime support

. Use your own runtime within a Lambda function. . Craft and use languages and custom runtimes not provided by AWS . Distribute custom runtimes as Layers if desired . Opens up Lambda to almost any language or customized runtime environment . .NET support for custom runtimes is enabled by the Amazon.Lambda.RuntimeSupport NuGet package Allows you to specify custom .NET Core versions (for 3.0, preview, etc) . AWS also provides reference implementations for C++ and Rust

https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you!

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.