Continers Flashcards
Which file on ec2 needs editing to be included in Ecs cluster
/etc/ecs/ecs.config
you pushed your container to ECR but CodeBuild fails to pull it - what could be reason ?
IAM PERMISSIONS FOR CODEBUILD.
You can push your Docker or Open Container Initiative (OCI) images to an Amazon ECR repository with the docker push command.
Amazon ECR users require permission to call ecr:GetAuthorizationToken before they can authenticate to a registry and push or pull any images from any Amazon ECR repository. Amazon ECR provides several managed policies to control user access at varying levels
A photo-sharing application manages its EC2 server fleet running behind an Application Load Balancer and the traffic is fronted by a CloudFront distribution. The development team wants to decouple the user authentication process for the application so that the application servers can just focus on the business logic.
Use Cognito Authentication via Cognito User Pools for your Application Load Balancer
Application Load Balancer can be used to securely authenticate users for accessing your applications. This enables you to offload the work of authenticating users to your load balancer so that your applications can focus on their business logic. You can use Cognito User Pools to authenticate users through well-known social IdPs, such as Amazon, Facebook, or Google, through the user pools supported by Amazon Cognito or through corporate identities, using SAML, LDAP, or Microsoft AD, through the user pools supported by Amazon Cognito. You configure user authentication by creating an authenticate action for one or more listener rules. The authenticate-cognito and authenticate-oidc action types are supported only with HTTPS listeners.
how to view your ECS Container logs in one location. Remember that FARGATE is serverless so cant download any agents.
Use the awslogs log driver to configure the containers in your tasks to send log information to CloudWatch Logs. Add the required logConfiguration parameters to your task definition
Ecs task placement strategies
Binpack
Random
Spread
Spread is default and spreads evenly over AZs for high availability
Binpack is used to place tasks based on Least amount of memory or cpu to minimise number of instances in use