Skip to content

axelspringer/ecs-service-discovery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ECS Service Discovery

Taylor Swift Volkswagen Build Status MIT license

A service discovery for AWS ECS based on Route53 and AWS LAMBDA

Getting Started

This Lambda function is doing the service discovery for an ECS Cluster.

Environment Variables

PROJECT_ID

The project id which prefixes the parameter in the parameter store.

Parameters

We use our go-aws and the System Manager Parameter Store to inject environment variables in Lambda functions.

/projectId/route53-zone

This is Route 53 hosted zone to be used for constructing the discovery entries (e.g. tortuga.local).

/projectId/route53-zone-id

The Route 53 id of the hosted zone.

/projectId/ecs-cluster

The name of the ECS cluster that should be discoverd.

Policy

We use various policies for the execution.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ],
            "Resource": [
                "arn:aws:logs:*:*:*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "ecs:*"
            ],
            "Resource": [
                "*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "ec2:*"
            ],
            "Resource": [
                "*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "route53:*",
                "servicediscovery:*"
            ],
            "Resource": "*"
        }
    ]
}

License

MIT

Releases

No releases published

Packages

No packages published

Languages