Support Mobycasthttps://glow.fm/mobycastIn this episode, we cover the following topics:Amazon Elastic Container Service (ECS) basicsOrchestration system for containersWell integrated with all the other Amazon services – More bang for your buckECS componentsClusterLogical grouping of tasks or servicesFor EC2 launch type, set of EC2 instances that are defined and managed by:Launch ConfigurationAuto Scale GroupServiceAllows you to run and maintain a specified number of instances of a task definition simultaneouslyFor long-running applicationsTaskDefines a collection of containers that you want to run togetherSpecifies resource quotas needed to run (e.g. memory, CPU, disk volumes)Simple deployment with ECSBuild image, publish image, create task definition revision, update ECS serviceRunning containersThree methodsCreate a long running taskECS service, service scheduler, integration with ELBRun a single taskCreate a scheduled taskWe are going to focus on the most typical use case - ECS servicesYou have to choose a launch typeEC2 or FargateFargateAnnounced at re:Invent 2017Generally available since 2018What is it?Allows you to run containers without having to manage servers or clusters of EC2sDon't need to choose server types, decide when to scale your clusters, or optimize cluster packingYou get complete control over task placement within your own VPCBut underlying infrastructure is managed by FargateBenefitsNo clusters to manageSeamless scalingOnly pay for when you are running tasksIdeal for batch jobs, cron jobs and other on-and-off workloadsRunning cluster of instances constantly incurs costs, but Fargate stops billing when containers stopSpecificsEach Fargate task has its own isolation boundaryIt does not share the underlying kernel, CPU resources, memory resources, or ENILeverages Firecracker microVMIncreases efficiency (e.g. approximately 50% price cut for Fargate in January 2019 due to Firecracker)Tasks must be launched into a clusterCluster is logical infrastructure and permissions boundary for isolating groups of tasksClusters support running both EC2 and Fargate launch types (mix-n-match)Fargate tasks require awsvpc network modeProvides each task with an ENIYou must specify one or more subnetsYou must specify one or more security groupsDecide on whether to assign public IP address to ENIIf on public subnet, you must assign public IP to pull imagesIf on private subnet, just requires NAT gatewayYou must specify CPU and memory at the task levelYou can also optionally specify CPU and memory at container levelOnly supports the following log driversawslogsSends log information to CloudWatch LogssplunkPricingBased on amount of CPU and memory usedCharged by the second, with minimum charge of 1 minuteExample costs for running a blog server 24x7Note: costs for us-west-2 regionFargate, 0.25 VCPU, 0.5GB memoryper vCPU per hour: $0.04048per GB per hour: $0.004445Memory = $1.60 (30 days * 24 hours * 0.5 GB * 0.004445)CPU = $7.29 (30 days * 24 hours * 0.25VCPU * 0.04048)Total = $8.89 / montht2.micro, 1 VCPU, 1GB memoryper hour: $0.0116Total = $8.35 (30 days * 24 hours * 0.0116)t3.nano, 2 VCPU, 0.5GB memoryper hour: $0.0052Total = $3.74 (30 days * 24 hours * 0.0052)LinksAmazon Elastic Container ServiceECS FargateAWS Fargate Price Reduction – Up to 50%End SongERRE - LamictalFor a full transcription of this episode, please visit the episode webpage.We'd love to hear from you! You can reach us at:Web: https://mobycast.fmVoicemail: 844-818-0993Email: ask@mobycast.fmTwitter: https://twitter.com/hashtag/mobycastReddit: https://reddit.com/r/mobycast