Infrastructure and lambda function to allow an autoscaling group to be load balanced via a single DNS entrypoint.
- Python 2.7
- Python Pip
- AWS Credentials
- Route53 Domain
- pip install -r requirements.txt
- aws configure - Follow instructions
Update variables at the top of lambdaDNSManagerFunction/autoscalingDNSManager.py
to match your environment
cd lambdaDNSManagerFunction
./upload_code.sh v1
aws cloudformation create-stack --stack-name lamba-dns-manager-stack --template-body file://infrastructure.yaml --capabilities CAPABILITY_IAM --region us-east-1
aws cloudformation create-stack --stack-name asg-nginx-lb --template-body file://infrastructure.yaml --capabilities CAPABILITY_IAM --region us-east-1
- Browse to AWS console
- Open settings for Lambda Function
- Open Triggers Tab
- Subscribe to the related nginx SNS topic
- Automatic subscribtion to SNS topic on stack launch