AWS Keywords 101

Q: EC2 V.S. ECS?

  • An ECS (Elastic Container Service) is basically a logical and/or regional grouping/cluster of EC2 machines/instances [1]


  • EKS (Elastic Kubernetes Services) runs Kubernetes instead of Containers

Q: Docker V.S. Kubernetes?

  • Docker Compose networks containers within the same host
  • Docker Swarm and Kubernetes networks containers across multiple hosts [2]

Q: Docker Registry V.S. Repository?

  • Docker Registry: a service that stores docker images, could be hosted by any third party (Docker Hub, Google Container Registry, AWS Container Registry, etc.), or yourself
  • Docker Repository: a collection of different docker images with the same name but different tags. [3]

Q: What is Serverless and why use?

  • Usually when you deploy a service, you rent a server and set up everything you need before running it.
  • Serverless means that you only need to input your code to have it run, and don’t have to worry about how the environment is set up.
  • The main reason people tend to migrate over to serverless is to remove the need to maintain the scaling of servers [4].
  • So, by its definition, EC2 provides traditional servers, whereas Lambda/Fargate are serverless.

Q: AWS Fargate V.S. AWS Lambda?

  • Lambda:
    • Is event driven
    • Spawn one instance per request
    • Has numerous limits (process time within 15 minutes, response size within 6mb, etc.), so it’s more suitable for smaller tasks.
  • Fargate:
    • Is a serverless subset of ECS
    • Runs docker container based on a Task Definition
    • Its number of instances can be configured to auto-scale based on many AWS triggers

Error with css-loader

Error message looks like this:

var api = require("!./node_modules/_style-loader@1.2.1@style-loader/dist/runtime/injectStylesIntoStyleTag.js");

If you’re using Storybook, or multiple webpack configs of dev/prod, or simply multiple rules… Either way, this error means you’ve specified rules for CSS more than once.

For example, Storybook already has a set of default rules for various file types, and CSS is one of them, so you cannot specify custom CSS rules again.