# The manifest for the "kafka-broker" service. # Read the full specification for the "Load Balanced Web Service" type at: # https://aws.github.io/copilot-cli/docs/manifest/lb-web-service/ # This is a non-essential experimental service to test running Kafka within ECS. It has no volume, is a single broker, and will be recreated in # dev environment deployments. With this in mind, it should only be used on a test basis. # Your service name will be used in naming your resources like log groups, ECS services, etc. name: kafka-broker type: Load Balanced Web Service ## Distribute traffic to your service. http: false nlb: port: 9092 # Allow service-to-service communication with ECS Service Connect network: connect: true # Configuration for your containers and service. image: location: docker.io/bitnami/kafka:3.4 # Port exposed through your container to route traffic to it. port: 9092 cpu: 256 # Number of CPU units for the task. memory: 2048 # Amount of memory in MiB used by the task. count: 1 # Number of tasks that should be running in your service. exec: true # Enable getting a shell to your container (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html). # Pass environment variables as key value pairs. variables: # Definitions for some of these variables can be found in the Bitnami docker documentation here: https://hub.docker.com/r/bitnami/kafka/ ALLOW_PLAINTEXT_LISTENER: yes KAFKA_ENABLE_KRAFT: no KAFKA_ZOOKEEPER_CONNECT: kafka-zookeeper:2181 # Interfaces that Kafka binds to KAFKA_LISTENERS: PLAINTEXT://:9092 # Define the protocol to use per listener name KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT # Metadata passed back to clients, that they will use to connect to brokers # This is currently only accessible within an ECS service that can connect to kafka-broker KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-broker:9092 environments: dev: count: 1 # Number of tasks to run for the "dev" environment. deployment: # The deployment strategy for the "dev" environment. rolling: 'recreate' # Stops existing tasks before new ones are started for faster deployments.