_:n537ec561ba2d40ef99e3121bf0a54cc0xb0
<http://schema.org/articleBody>
"Microservices on AWS usingAWS Lambda and Docker ContainersDanilo Poccia AWS Technical Evangelist@danilopWhy AWS Lambda?AWS LambdaEvent driven,fully managed computeAWS LambdaFocus on business logic,not infrastructureCustomer uploads code, AWS Lambda handles: Capacity Scaling Deployment Fault tolerance Monitoring Logging . . .AWS LambdaAutomatic scalingCustomers pay only for what they use, no overunder provisioningAWS LambdaFine-grained pricingPrice compute time by 100ms, even short jobs make sense Low request charge No hourly, daily, or monthly minimums Free tier Events come in many different shapes sizesS3 event notificationsDynamoDB StreamsKinesis events Custom eventsWhy Docker?Virtual Machine ContainerDocker on AWSAmazonLinuxA supported and maintained Linux image provided by Amazon Web ServicesAmazon EC2 Container ServiceHighly scalable, high performance container management serviceAWSElastic BeanstalkFor deploying and scaling web applications and servicesAmazon EC2 Container ServiceKey Components Container InstancesClusters Tasks Task DefinitionsAmazon EC2 instances Docker daemon Amazon ECS agenthttps:github.comawsamazon-ecs-agentAmazon EC2 Container ServiceKey Components Container Instances ClustersTasks Task DefinitionsRegional Resource pool Grouping of Container Instances Start empty, dynamically scalableAmazon EC2 Container ServiceKey Components Container Instances Clusters Tasks Task DefinitionsUnit of work Grouping of related Containers Run on Container InstancesAmazon EC2 Container ServiceKey Components Container Instances Clusters Tasks Task Definitions { image: mysql, name: db, cpu: 10, memory: 500, Tasks are defined via Task Definitions { image: tutumwordpress-stackable, name: wordpress, cpu: 10, memory: 500, essential: true, links: db , entryPoint: binsh, -c , environment: , portMappings: { containerPort: 80, hostPort: 80 } }, { image: mysql, name: db, cpu: 10, memory: 500, essential: true, entryPoint: entrypoint.sh , environment: { name: MYSQL_ROOT_PASSWORD, value: pass } , portMappings: } { image: tutumwordpress-stackable, name: wordpress, cpu: 10, memory: 500, essential: true, links: db , entryPoint: binsh, -c , environment: , portMappings: { containerPort: 80, hostPort: 80 } }, { image: mysql, name: db, cpu: 10, memory: 500, essential: true, entryPoint: entrypoint.sh , environment: { name: MYSQL_ROOT_PASSWORD, value: pass } , portMappings: }From Docker Hub10 CPU Units 1024 is full CPU, 500 Megabytes of MemoryEnvironment VariablesNo external ports exposedTasks are defined via Task Definitions { image: tutumwordpress-stackable, name: wordpress, cpu: 10, memory: 500, essential: true, links: db , entryPoint: binsh, -c , environment: , portMappings: { containerPort: 80, hostPort: 80 } }, { image: mysql, name: db, cpu: 10, memory: 500, essential: true, entryPoint: entrypoint.sh , environment: { name: MYSQL_ROOT_PASSWORD, value: pass } , portMappings: }Essential to our TaskDocker link to mysql containerExpose port 80 in container to port 80 on hostTasks are defined via Task DefinitionsAmazon EC2 Containers AWS LambdaOn-PremisesWeeks Minutes Seconds MillisecondsDemo Architecture Content Management System PrototypeLambda FunctionS3 Bucket#1S3 Bucket#2DynamoDBTableECSTaskECSClusterImages +MedatadaUpload Object + MetadataEvent NotificationThumbnailWrite MetadataRunScheduleRead MetadataWrite index.html123@danilop"
<https://vdocuments.mx/microservices-on-aws-using-aws-lambda-and-docker-containers.html>