Repository: getmoto/moto
Pull request #7240 (2024-01-22 17:07:55)

ELBv2: add new valid attributes for modify_load_balancer_attributes
When working with Terraform and this particular module (https://registry.terraform.io/modules/terraform-aws-modules/alb/aws/latest), a user has been encountering an issue when using newer version of the AWS provider (after `5.30.0`) when using the `aws_lb` resource.

```
Error: modifying ELBv2 Load Balancer (arn:aws:elasticloadbalancing:us-east-1:000000000000:loadbalancer/app/local-kitchen-sink-v2/7554522d) attributes: InvalidConfigurationRequest: Key connection_logs.s3.enabled not valid
│       status code: 400, request id: d8735ead-498b-4ec9-bc3c-8a849a5bdb69
```

It seems AWS has added new valid attributes to `modify-load-balancer-attributes`:
https://docs.aws.amazon.com/cli/latest/reference/elbv2/modify-load-balancer-attributes.html
- `connection_logs.s3.bucket`
- `connection_logs.s3.enabled`
- `connection_logs.s3.prefix`

I've added the 3 reported `connection_logs.s3` attributes which caused the issue to the list of valid attributes, and added a test for it.
I've also removed an unused template for `ModifyLoadBalancerAttributes` that was supplanted it seems (removed `MODIFY_ATTRIBUTES_TEMPLATE`, replaced by `MODIFY_LOADBALANCER_ATTRS_TEMPLATE`).


Patch:
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone-id/ap-northeast-1.json b/moto/ec2/resources/instance_type_offerings/availability-zone-id/ap-northeast-1.json
index db3be8416..ff1a1e89b 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone-id/ap-northeast-1.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone-id/ap-northeast-1.json
@@ -4647,6 +4647,50 @@
   "InstanceType": "r7gd.xlarge",
   "Location": "apne1-az2"
  },
+ {
+  "InstanceType": "r7i.12xlarge",
+  "Location": "apne1-az2"
+ },
+ {
+  "InstanceType": "r7i.16xlarge",
+  "Location": "apne1-az2"
+ },
+ {
+  "InstanceType": "r7i.24xlarge",
+  "Location": "apne1-az2"
+ },
+ {
+  "InstanceType": "r7i.2xlarge",
+  "Location": "apne1-az2"
+ },
+ {
+  "InstanceType": "r7i.48xlarge",
+  "Location": "apne1-az2"
+ },
+ {
+  "InstanceType": "r7i.4xlarge",
+  "Location": "apne1-az2"
+ },
+ {
+  "InstanceType": "r7i.8xlarge",
+  "Location": "apne1-az2"
+ },
+ {
+  "InstanceType": "r7i.large",
+  "Location": "apne1-az2"
+ },
+ {
+  "InstanceType": "r7i.metal-24xl",
+  "Location": "apne1-az2"
+ },
+ {
+  "InstanceType": "r7i.metal-48xl",
+  "Location": "apne1-az2"
+ },
+ {
+  "InstanceType": "r7i.xlarge",
+  "Location": "apne1-az2"
+ },
  {
   "InstanceType": "t2.2xlarge",
   "Location": "apne1-az2"
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone-id/ap-northeast-2.json b/moto/ec2/resources/instance_type_offerings/availability-zone-id/ap-northeast-2.json
index e6093bb26..6ef98b9a7 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone-id/ap-northeast-2.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone-id/ap-northeast-2.json
@@ -1763,6 +1763,10 @@
   "InstanceType": "t4g.xlarge",
   "Location": "apne2-az1"
  },
+ {
+  "InstanceType": "u-12tb1.112xlarge",
+  "Location": "apne2-az1"
+ },
  {
   "InstanceType": "u-6tb1.112xlarge",
   "Location": "apne2-az1"
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone-id/eu-west-2.json b/moto/ec2/resources/instance_type_offerings/availability-zone-id/eu-west-2.json
index c88c855a7..28313c772 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone-id/eu-west-2.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone-id/eu-west-2.json
@@ -1667,6 +1667,10 @@
   "InstanceType": "u-6tb1.56xlarge",
   "Location": "euw2-az1"
  },
+ {
+  "InstanceType": "u-9tb1.112xlarge",
+  "Location": "euw2-az1"
+ },
  {
   "InstanceType": "x1.16xlarge",
   "Location": "euw2-az1"
@@ -3795,6 +3799,50 @@
   "InstanceType": "c5n.xlarge",
   "Location": "euw2-az3"
  },
+ {
+  "InstanceType": "c6a.12xlarge",
+  "Location": "euw2-az3"
+ },
+ {
+  "InstanceType": "c6a.16xlarge",
+  "Location": "euw2-az3"
+ },
+ {
+  "InstanceType": "c6a.24xlarge",
+  "Location": "euw2-az3"
+ },
+ {
+  "InstanceType": "c6a.2xlarge",
+  "Location": "euw2-az3"
+ },
+ {
+  "InstanceType": "c6a.32xlarge",
+  "Location": "euw2-az3"
+ },
+ {
+  "InstanceType": "c6a.48xlarge",
+  "Location": "euw2-az3"
+ },
+ {
+  "InstanceType": "c6a.4xlarge",
+  "Location": "euw2-az3"
+ },
+ {
+  "InstanceType": "c6a.8xlarge",
+  "Location": "euw2-az3"
+ },
+ {
+  "InstanceType": "c6a.large",
+  "Location": "euw2-az3"
+ },
+ {
+  "InstanceType": "c6a.metal",
+  "Location": "euw2-az3"
+ },
+ {
+  "InstanceType": "c6a.xlarge",
+  "Location": "euw2-az3"
+ },
  {
   "InstanceType": "c6g.12xlarge",
   "Location": "euw2-az3"
@@ -5211,6 +5259,10 @@
   "InstanceType": "u-6tb1.56xlarge",
   "Location": "euw2-az3"
  },
+ {
+  "InstanceType": "u-9tb1.112xlarge",
+  "Location": "euw2-az3"
+ },
  {
   "InstanceType": "x1.16xlarge",
   "Location": "euw2-az3"
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone-id/us-east-1.json b/moto/ec2/resources/instance_type_offerings/availability-zone-id/us-east-1.json
index 9078869ef..3a9fc7b19 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone-id/us-east-1.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone-id/us-east-1.json
@@ -1287,6 +1287,86 @@
   "InstanceType": "m6id.xlarge",
   "Location": "use1-az1"
  },
+ {
+  "InstanceType": "m6idn.12xlarge",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6idn.16xlarge",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6idn.24xlarge",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6idn.2xlarge",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6idn.32xlarge",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6idn.4xlarge",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6idn.8xlarge",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6idn.large",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6idn.metal",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6idn.xlarge",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6in.12xlarge",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6in.16xlarge",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6in.24xlarge",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6in.2xlarge",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6in.32xlarge",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6in.4xlarge",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6in.8xlarge",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6in.large",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6in.metal",
+  "Location": "use1-az1"
+ },
+ {
+  "InstanceType": "m6in.xlarge",
+  "Location": "use1-az1"
+ },
  {
   "InstanceType": "m7g.12xlarge",
   "Location": "use1-az1"
@@ -3035,6 +3115,38 @@
   "InstanceType": "c7gd.xlarge",
   "Location": "use1-az2"
  },
+ {
+  "InstanceType": "c7gn.12xlarge",
+  "Location": "use1-az2"
+ },
+ {
+  "InstanceType": "c7gn.16xlarge",
+  "Location": "use1-az2"
+ },
+ {
+  "InstanceType": "c7gn.2xlarge",
+  "Location": "use1-az2"
+ },
+ {
+  "InstanceType": "c7gn.4xlarge",
+  "Location": "use1-az2"
+ },
+ {
+  "InstanceType": "c7gn.8xlarge",
+  "Location": "use1-az2"
+ },
+ {
+  "InstanceType": "c7gn.large",
+  "Location": "use1-az2"
+ },
+ {
+  "InstanceType": "c7gn.medium",
+  "Location": "use1-az2"
+ },
+ {
+  "InstanceType": "c7gn.xlarge",
+  "Location": "use1-az2"
+ },
  {
   "InstanceType": "c7i.12xlarge",
   "Location": "use1-az2"
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone-id/us-east-2.json b/moto/ec2/resources/instance_type_offerings/availability-zone-id/us-east-2.json
index f8eeb40bb..8c9296d40 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone-id/us-east-2.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone-id/us-east-2.json
@@ -2671,6 +2671,10 @@
   "InstanceType": "u-6tb1.56xlarge",
   "Location": "use2-az1"
  },
+ {
+  "InstanceType": "u-9tb1.112xlarge",
+  "Location": "use2-az1"
+ },
  {
   "InstanceType": "x1.16xlarge",
   "Location": "use2-az1"
@@ -5479,6 +5483,10 @@
   "InstanceType": "u-6tb1.56xlarge",
   "Location": "use2-az2"
  },
+ {
+  "InstanceType": "u-9tb1.112xlarge",
+  "Location": "use2-az2"
+ },
  {
   "InstanceType": "x1.16xlarge",
   "Location": "use2-az2"
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone-id/us-west-2.json b/moto/ec2/resources/instance_type_offerings/availability-zone-id/us-west-2.json
index 23164d255..cbda318c0 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone-id/us-west-2.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone-id/us-west-2.json
@@ -9955,6 +9955,86 @@
   "InstanceType": "m6id.xlarge",
   "Location": "usw2-az4"
  },
+ {
+  "InstanceType": "m6idn.12xlarge",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6idn.16xlarge",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6idn.24xlarge",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6idn.2xlarge",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6idn.32xlarge",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6idn.4xlarge",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6idn.8xlarge",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6idn.large",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6idn.metal",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6idn.xlarge",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6in.12xlarge",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6in.16xlarge",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6in.24xlarge",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6in.2xlarge",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6in.32xlarge",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6in.4xlarge",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6in.8xlarge",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6in.large",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6in.metal",
+  "Location": "usw2-az4"
+ },
+ {
+  "InstanceType": "m6in.xlarge",
+  "Location": "usw2-az4"
+ },
  {
   "InstanceType": "m7g.12xlarge",
   "Location": "usw2-az4"
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone/ap-northeast-1.json b/moto/ec2/resources/instance_type_offerings/availability-zone/ap-northeast-1.json
index 247aef8c3..009570a03 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone/ap-northeast-1.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone/ap-northeast-1.json
@@ -7367,6 +7367,50 @@
   "InstanceType": "r7gd.xlarge",
   "Location": "ap-northeast-1d"
  },
+ {
+  "InstanceType": "r7i.12xlarge",
+  "Location": "ap-northeast-1d"
+ },
+ {
+  "InstanceType": "r7i.16xlarge",
+  "Location": "ap-northeast-1d"
+ },
+ {
+  "InstanceType": "r7i.24xlarge",
+  "Location": "ap-northeast-1d"
+ },
+ {
+  "InstanceType": "r7i.2xlarge",
+  "Location": "ap-northeast-1d"
+ },
+ {
+  "InstanceType": "r7i.48xlarge",
+  "Location": "ap-northeast-1d"
+ },
+ {
+  "InstanceType": "r7i.4xlarge",
+  "Location": "ap-northeast-1d"
+ },
+ {
+  "InstanceType": "r7i.8xlarge",
+  "Location": "ap-northeast-1d"
+ },
+ {
+  "InstanceType": "r7i.large",
+  "Location": "ap-northeast-1d"
+ },
+ {
+  "InstanceType": "r7i.metal-24xl",
+  "Location": "ap-northeast-1d"
+ },
+ {
+  "InstanceType": "r7i.metal-48xl",
+  "Location": "ap-northeast-1d"
+ },
+ {
+  "InstanceType": "r7i.xlarge",
+  "Location": "ap-northeast-1d"
+ },
  {
   "InstanceType": "t2.2xlarge",
   "Location": "ap-northeast-1d"
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone/ap-northeast-2.json b/moto/ec2/resources/instance_type_offerings/availability-zone/ap-northeast-2.json
index 777f39289..1cd4edecd 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone/ap-northeast-2.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone/ap-northeast-2.json
@@ -1763,6 +1763,10 @@
   "InstanceType": "t4g.xlarge",
   "Location": "ap-northeast-2a"
  },
+ {
+  "InstanceType": "u-12tb1.112xlarge",
+  "Location": "ap-northeast-2a"
+ },
  {
   "InstanceType": "u-6tb1.112xlarge",
   "Location": "ap-northeast-2a"
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone/eu-west-2.json b/moto/ec2/resources/instance_type_offerings/availability-zone/eu-west-2.json
index 38dc1dc3b..18986d104 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone/eu-west-2.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone/eu-west-2.json
@@ -2043,6 +2043,50 @@
   "InstanceType": "c5n.xlarge",
   "Location": "eu-west-2b"
  },
+ {
+  "InstanceType": "c6a.12xlarge",
+  "Location": "eu-west-2b"
+ },
+ {
+  "InstanceType": "c6a.16xlarge",
+  "Location": "eu-west-2b"
+ },
+ {
+  "InstanceType": "c6a.24xlarge",
+  "Location": "eu-west-2b"
+ },
+ {
+  "InstanceType": "c6a.2xlarge",
+  "Location": "eu-west-2b"
+ },
+ {
+  "InstanceType": "c6a.32xlarge",
+  "Location": "eu-west-2b"
+ },
+ {
+  "InstanceType": "c6a.48xlarge",
+  "Location": "eu-west-2b"
+ },
+ {
+  "InstanceType": "c6a.4xlarge",
+  "Location": "eu-west-2b"
+ },
+ {
+  "InstanceType": "c6a.8xlarge",
+  "Location": "eu-west-2b"
+ },
+ {
+  "InstanceType": "c6a.large",
+  "Location": "eu-west-2b"
+ },
+ {
+  "InstanceType": "c6a.metal",
+  "Location": "eu-west-2b"
+ },
+ {
+  "InstanceType": "c6a.xlarge",
+  "Location": "eu-west-2b"
+ },
  {
   "InstanceType": "c6g.12xlarge",
   "Location": "eu-west-2b"
@@ -3459,6 +3503,10 @@
   "InstanceType": "u-6tb1.56xlarge",
   "Location": "eu-west-2b"
  },
+ {
+  "InstanceType": "u-9tb1.112xlarge",
+  "Location": "eu-west-2b"
+ },
  {
   "InstanceType": "x1.16xlarge",
   "Location": "eu-west-2b"
@@ -5211,6 +5259,10 @@
   "InstanceType": "u-6tb1.56xlarge",
   "Location": "eu-west-2c"
  },
+ {
+  "InstanceType": "u-9tb1.112xlarge",
+  "Location": "eu-west-2c"
+ },
  {
   "InstanceType": "x1.16xlarge",
   "Location": "eu-west-2c"
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone/us-east-1.json b/moto/ec2/resources/instance_type_offerings/availability-zone/us-east-1.json
index 8e94fa4c6..ee2e4ab36 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone/us-east-1.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone/us-east-1.json
@@ -1287,6 +1287,86 @@
   "InstanceType": "m6id.xlarge",
   "Location": "us-east-1a"
  },
+ {
+  "InstanceType": "m6idn.12xlarge",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6idn.16xlarge",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6idn.24xlarge",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6idn.2xlarge",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6idn.32xlarge",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6idn.4xlarge",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6idn.8xlarge",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6idn.large",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6idn.metal",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6idn.xlarge",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6in.12xlarge",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6in.16xlarge",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6in.24xlarge",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6in.2xlarge",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6in.32xlarge",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6in.4xlarge",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6in.8xlarge",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6in.large",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6in.metal",
+  "Location": "us-east-1a"
+ },
+ {
+  "InstanceType": "m6in.xlarge",
+  "Location": "us-east-1a"
+ },
  {
   "InstanceType": "m7g.12xlarge",
   "Location": "us-east-1a"
@@ -3035,6 +3115,38 @@
   "InstanceType": "c7gd.xlarge",
   "Location": "us-east-1b"
  },
+ {
+  "InstanceType": "c7gn.12xlarge",
+  "Location": "us-east-1b"
+ },
+ {
+  "InstanceType": "c7gn.16xlarge",
+  "Location": "us-east-1b"
+ },
+ {
+  "InstanceType": "c7gn.2xlarge",
+  "Location": "us-east-1b"
+ },
+ {
+  "InstanceType": "c7gn.4xlarge",
+  "Location": "us-east-1b"
+ },
+ {
+  "InstanceType": "c7gn.8xlarge",
+  "Location": "us-east-1b"
+ },
+ {
+  "InstanceType": "c7gn.large",
+  "Location": "us-east-1b"
+ },
+ {
+  "InstanceType": "c7gn.medium",
+  "Location": "us-east-1b"
+ },
+ {
+  "InstanceType": "c7gn.xlarge",
+  "Location": "us-east-1b"
+ },
  {
   "InstanceType": "c7i.12xlarge",
   "Location": "us-east-1b"
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone/us-east-2.json b/moto/ec2/resources/instance_type_offerings/availability-zone/us-east-2.json
index 2b0e332c3..488c5a672 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone/us-east-2.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone/us-east-2.json
@@ -2671,6 +2671,10 @@
   "InstanceType": "u-6tb1.56xlarge",
   "Location": "us-east-2a"
  },
+ {
+  "InstanceType": "u-9tb1.112xlarge",
+  "Location": "us-east-2a"
+ },
  {
   "InstanceType": "x1.16xlarge",
   "Location": "us-east-2a"
@@ -5479,6 +5483,10 @@
   "InstanceType": "u-6tb1.56xlarge",
   "Location": "us-east-2b"
  },
+ {
+  "InstanceType": "u-9tb1.112xlarge",
+  "Location": "us-east-2b"
+ },
  {
   "InstanceType": "x1.16xlarge",
   "Location": "us-east-2b"
diff --git a/moto/ec2/resources/instance_type_offerings/availability-zone/us-west-2.json b/moto/ec2/resources/instance_type_offerings/availability-zone/us-west-2.json
index 031ade678..21772f1bb 100644
--- a/moto/ec2/resources/instance_type_offerings/availability-zone/us-west-2.json
+++ b/moto/ec2/resources/instance_type_offerings/availability-zone/us-west-2.json
@@ -9955,6 +9955,86 @@
   "InstanceType": "m6id.xlarge",
   "Location": "us-west-2d"
  },
+ {
+  "InstanceType": "m6idn.12xlarge",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6idn.16xlarge",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6idn.24xlarge",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6idn.2xlarge",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6idn.32xlarge",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6idn.4xlarge",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6idn.8xlarge",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6idn.large",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6idn.metal",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6idn.xlarge",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6in.12xlarge",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6in.16xlarge",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6in.24xlarge",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6in.2xlarge",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6in.32xlarge",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6in.4xlarge",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6in.8xlarge",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6in.large",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6in.metal",
+  "Location": "us-west-2d"
+ },
+ {
+  "InstanceType": "m6in.xlarge",
+  "Location": "us-west-2d"
+ },
  {
   "InstanceType": "m7g.12xlarge",
   "Location": "us-west-2d"
diff --git a/moto/ec2/resources/instance_type_offerings/region/ap-northeast-2.json b/moto/ec2/resources/instance_type_offerings/region/ap-northeast-2.json
index 88b68bc9f..a212d8624 100644
--- a/moto/ec2/resources/instance_type_offerings/region/ap-northeast-2.json
+++ b/moto/ec2/resources/instance_type_offerings/region/ap-northeast-2.json
@@ -1767,6 +1767,10 @@
   "InstanceType": "t4g.xlarge",
   "Location": "ap-northeast-2"
  },
+ {
+  "InstanceType": "u-12tb1.112xlarge",
+  "Location": "ap-northeast-2"
+ },
  {
   "InstanceType": "u-24tb1.112xlarge",
   "Location": "ap-northeast-2"
diff --git a/moto/ec2/resources/instance_type_offerings/region/eu-west-2.json b/moto/ec2/resources/instance_type_offerings/region/eu-west-2.json
index 0175f2c56..a2fd6f4a0 100644
--- a/moto/ec2/resources/instance_type_offerings/region/eu-west-2.json
+++ b/moto/ec2/resources/instance_type_offerings/region/eu-west-2.json
@@ -1815,6 +1815,10 @@
   "InstanceType": "u-6tb1.56xlarge",
   "Location": "eu-west-2"
  },
+ {
+  "InstanceType": "u-9tb1.112xlarge",
+  "Location": "eu-west-2"
+ },
  {
   "InstanceType": "x1.16xlarge",
   "Location": "eu-west-2"
diff --git a/moto/ec2/resources/instance_type_offerings/region/us-east-2.json b/moto/ec2/resources/instance_type_offerings/region/us-east-2.json
index c18be1999..bcb7d751b 100644
--- a/moto/ec2/resources/instance_type_offerings/region/us-east-2.json
+++ b/moto/ec2/resources/instance_type_offerings/region/us-east-2.json
@@ -2723,6 +2723,10 @@
   "InstanceType": "u-6tb1.56xlarge",
   "Location": "us-east-2"
  },
+ {
+  "InstanceType": "u-9tb1.112xlarge",
+  "Location": "us-east-2"
+ },
  {
   "InstanceType": "x1.16xlarge",
   "Location": "us-east-2"
diff --git a/moto/elbv2/models.py b/moto/elbv2/models.py
index 4b3cf67ea..a748103e9 100644
--- a/moto/elbv2/models.py
+++ b/moto/elbv2/models.py
@@ -576,6 +576,9 @@ class FakeLoadBalancer(CloudFormationModel):
         "access_logs.s3.enabled",
         "access_logs.s3.bucket",
         "access_logs.s3.prefix",
+        "connection_logs.s3.bucket",
+        "connection_logs.s3.enabled",
+        "connection_logs.s3.prefix",
         "deletion_protection.enabled",
         "idle_timeout.timeout_seconds",
         "ipv6.deny_all_igw_traffic",
diff --git a/moto/elbv2/responses.py b/moto/elbv2/responses.py
index 2df73d292..8b50ab7bb 100644
--- a/moto/elbv2/responses.py
+++ b/moto/elbv2/responses.py
@@ -1578,40 +1578,6 @@ DESCRIBE_ATTRIBUTES_TEMPLATE = """<DescribeLoadBalancerAttributesResponse  xmlns
 </DescribeLoadBalancerAttributesResponse>
 """
 
-MODIFY_ATTRIBUTES_TEMPLATE = """<ModifyLoadBalancerAttributesResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/">
-  <ModifyLoadBalancerAttributesResult>
-  <LoadBalancerName>{{ load_balancer.name }}</LoadBalancerName>
-    <LoadBalancerAttributes>
-      <AccessLog>
-        <Enabled>{{ attributes.access_log.enabled }}</Enabled>
-        {% if attributes.access_log.enabled %}
-        <S3BucketName>{{ attributes.access_log.s3_bucket_name }}</S3BucketName>
-        <S3BucketPrefix>{{ attributes.access_log.s3_bucket_prefix }}</S3BucketPrefix>
-        <EmitInterval>{{ attributes.access_log.emit_interval }}</EmitInterval>
-        {% endif %}
-      </AccessLog>
-      <ConnectionSettings>
-        <IdleTimeout>{{ attributes.connecting_settings.idle_timeout }}</IdleTimeout>
-      </ConnectionSettings>
-      <CrossZoneLoadBalancing>
-        <Enabled>{{ attributes.cross_zone_load_balancing.enabled }}</Enabled>
-      </CrossZoneLoadBalancing>
-      <ConnectionDraining>
-        {% if attributes.connection_draining.enabled %}
-        <Enabled>true</Enabled>
-        <Timeout>{{ attributes.connection_draining.timeout }}</Timeout>
-        {% else %}
-        <Enabled>false</Enabled>
-        {% endif %}
-      </ConnectionDraining>
-    </LoadBalancerAttributes>
-  </ModifyLoadBalancerAttributesResult>
-  <ResponseMetadata>
-    <RequestId>{{ request_id }}</RequestId>
-  </ResponseMetadata>
-</ModifyLoadBalancerAttributesResponse>
-"""
-
 CREATE_LOAD_BALANCER_POLICY_TEMPLATE = """<CreateLoadBalancerPolicyResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/">
   <CreateLoadBalancerPolicyResult/>
   <ResponseMetadata>


Test patch:
diff --git a/tests/test_elbv2/test_elbv2.py b/tests/test_elbv2/test_elbv2.py
index cd933cb5a..4da6b059c 100644
--- a/tests/test_elbv2/test_elbv2.py
+++ b/tests/test_elbv2/test_elbv2.py
@@ -1291,6 +1291,28 @@ def test_modify_load_balancer_attributes_routing_http_drop_invalid_header_fields
     assert routing_http_drop_invalid_header_fields_enabled["Value"] == "false"
 
 
+@mock_elbv2
+@mock_ec2
+def test_modify_load_balancer_attributes_connection_logs_s3():
+    response, _, _, _, _, client = create_load_balancer()
+    arn = response["LoadBalancers"][0]["LoadBalancerArn"]
+
+    client.modify_load_balancer_attributes(
+        LoadBalancerArn=arn,
+        Attributes=[
+            {"Key": "connection_logs.s3.enabled", "Value": "true"},
+            {"Key": "connection_logs.s3.bucket", "Value": "s3bucket"},
+            {"Key": "connection_logs.s3.prefix", "Value": "test_prefix"},
+        ],
+    )
+
+    response = client.describe_load_balancer_attributes(LoadBalancerArn=arn)
+    attrs = client.describe_load_balancer_attributes(LoadBalancerArn=arn)["Attributes"]
+    assert {"Key": "connection_logs.s3.enabled", "Value": "true"} in attrs
+    assert {"Key": "connection_logs.s3.bucket", "Value": "s3bucket"} in attrs
+    assert {"Key": "connection_logs.s3.prefix", "Value": "test_prefix"} in attrs
+
+
 @mock_elbv2
 @mock_ec2
 @mock_acm