0

I am creating an ALB in amazon with StackA named StackA and I export the ALB name and value using

Export=Export((Join("", [Ref("AWS::StackName"), "-ALB"]))), Value = GetAtt(ApplicationElasticLB, "DNSName")

I can see in AWS Console that the value is being export for ALB "internal-alb-test-12345678.us-east-1.elb.amazonaws.com"

So now I want to use this ALB name from StackB while creating ECSService. I am using it like this

LoadBalancerName=ImportValue('StackA-ALB')

But then the AWS throws an error saying

elb name longer than 32. (Service: AmazonECS; Status Code: 400; Error Code: InvalidParameterException

Am I doing anything wrong here ? please help me understand the cause.

Rob
  • 150
  • 1
  • 4
  • 17

1 Answers1

0

I think that you need to export the ALB:ARN not the ALB:Name

Miguel Conde
  • 813
  • 10
  • 22