From 5a4874b1c4dd975e86013f70d45218c019d03377 Mon Sep 17 00:00:00 2001 From: Jerry Kindall <52084730+Jerry-AWS@users.noreply.github.com> Date: Fri, 20 Dec 2019 03:44:54 -0800 Subject: [PATCH] docs(alb): ALB requires region to use logging (#5085) * Add comment about requiring region to use logging * Update application-load-balancer.ts Co-authored-by: Rico Huijbers --- .../lib/alb/application-load-balancer.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts index f161a6bd816ca..33d8cf8557895 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts @@ -79,7 +79,10 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic } /** - * Enable access logging for this load balancer + * Enable access logging for this load balancer. + * + * A region must be specified on the stack containing the load balancer; you cannot enable logging on + * environment-agnostic stacks. See https://docs.aws.amazon.com/cdk/latest/guide/environments.html */ public logAccessLogs(bucket: s3.IBucket, prefix?: string) { this.setAttribute('access_logs.s3.enabled', 'true');