aws elb #17

Supports: bionic


This layer provides the AWS-ELB.


This layer adds AWS ElasticLoadBalancer infront of your EC2 deployed applications.

Usage and Caveats

To use this charm you must have a pre-existing ACM cert for the domain/fqdn you wish to use on the ELB, as well as pre-existing IGW subnets.

Future version of this charm will offer lets-encrypt cert creation/acquisition capability.

Deployment Example

# Create the model and network space
# (I often use a "nat" space that includes subnets that use a routing table that points -> nat-gw)

juju add-model aws-elb-testing aws/us-west-2
juju add-spaces nat
# Deploy the 2 primary charms and the subordinate
juju deploy cs:~containers/aws-integrator-5 --constraints "spaces=nat instance-type=m5.large"

juju deploy cs:~omnivector/aws-elb-16

juju deploy cs:~jamesbeedy/flask-test-2 --constraints "spaces=nat instance-type=m5.large"
juju expose flask-test

# Trust, config, and make relations
# (The aws-elb charm will block until the 'subnets' and 'cert-fqdn' configs are set)

juju trust aws-integrator

# (use your own cert-fqdn and subnet ids - both must pre-exist in aws)
juju config aws-elb cert-fqdn="*"
juju config aws-elb subnets="subnet-1de11955,subnet-50b0f336,subnet-7128282a"

juju relate aws-integrator aws-elb

juju relate aws-elb flask-test

After the ELB is successfully created, you can use the action get-elb-dns to get the dns name of the ELB.

$ juju run-action aws-elb/17 --wait get-elb-dns
  id: 6e867463-2f3b-4411-82c9-6f14b6b8f209
  status: completed
    completed: 2018-09-23 00:48:21 +0000 UTC
    enqueued: 2018-09-23 00:48:21 +0000 UTC
    started: 2018-09-23 00:48:21 +0000 UTC
  unit: aws-elb/17

Following this you need to create/update an CNAME record to point at the FQDN of the ELB before you will be able to successfully access the web endpoint.



  • AGPLv3 (See `License' file)


(string) FQDN matching the iregex for the cert you wish to use in ACM.
(string) Comma separated list of subnet-ids to use for ELB provisioning.