former2 icon indicating copy to clipboard operation
former2 copied to clipboard

access_logs.s3.bucket' cannot be empty

Open reidca opened this issue 5 years ago • 1 comments

Created a template from an ALBv2.

It created the following block for the LoadBalancerAttributes: (note I had not changed any of these values from the defaults)

      LoadBalancerAttributes: 
        - 
          Key: "access_logs.s3.enabled"
          Value: "false"
        - 
          Key: "access_logs.s3.bucket"
          Value: ""
        - 
          Key: "access_logs.s3.prefix"
          Value: ""
        - 
          Key: "idle_timeout.timeout_seconds"
          Value: "60"
        - 
          Key: "deletion_protection.enabled"
          Value: "false"
        - 
          Key: "routing.http2.enabled"
          Value: "true"
        - 
          Key: "routing.http.drop_invalid_header_fields.enabled"
          Value: "false"

I then put this into a template and launched a stack which failed with the following:

The value of 'access_logs.s3.bucket' cannot be empty (Service: AmazonElasticLoadBalancingV2; Status Code: 400; Error Code: ValidationError;

reidca avatar Feb 10 '20 16:02 reidca

Thanks @reidca,

I've updated to strip out attributes with empty values. Can you give this a shot?

Note there is no way to differentiate between a default value and an explicitly set value (and defaults can change) so properties may be more verbose than desired.

iann0036 avatar Feb 10 '20 22:02 iann0036