awslabs / aws-saas-boost

AWS SaaS Boost is a ready-to-use toolset that removes the complexity of successfully running SaaS workloads in the AWS cloud.
Apache License 2.0
959 stars 188 forks source link

Apply a new service quota calculation method when using Fargate in ECS #390

Closed muylucir closed 1 year ago

muylucir commented 1 year ago

AWS Fargate is transitioning from task count-based quotas to vCPU-based quotas. Use the changed Fargate service quota (vCPU Based) during Service Limit validation when creating a new tenant

388 onboarding failed shortly after initiation


Transforming org/apache/logging/log4j/core/lookup/JndiLookup (lambdainternal.CustomerClassLoader@1a6c5a9e)
--
2022-10-25 13:05:15.685  INFO  QuotasService - Version Info: {     "tag": "",     "commit": "5c4973b",     "describe": "5c4973b" }
2022-10-25 13:05:17.869  INFO  QuotasServiceDAL - Constructor init: 2173
2022-10-25 13:05:17.869  INFO  QuotasService - Constructor init: 2621
START RequestId: 768bda4e-8c31-4762-8518-333dea0d55ad Version: $LATEST
...
2022-10-25 13:05:26.420 768bda4e-8c31-4762-8518-333dea0d55ad INFO  QuotasServiceDAL - Service: fargate
2022-10-25 13:05:26.562 768bda4e-8c31-4762-8518-333dea0d55ad INFO  QuotasServiceDAL - Entry key : Fargate On-Demand vCPU resource count, Entry value: 0.0, quotaValue: 140.0
...
2022-10-25 13:05:29.072 768bda4e-8c31-4762-8518-333dea0d55ad INFO  QuotasService - SettingsService::getSettings exec 11145
END RequestId: 768bda4e-8c31-4762-8518-333dea0d55ad
REPORT RequestId: 768bda4e-8c31-4762-8518-333dea0d55ad  Duration: 11238.94 ms   Billed Duration: 11239 ms   Memory Size: 512 MB Max Memory Used: 248 MB Init Duration: 4479.85 ms

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

muylucir commented 1 year ago

@brtrvn I reflected your feedback. Can you review it again?

muylucir commented 1 year ago

Test Result of onboarding new tenant.

 Transforming org/apache/logging/log4j/core/lookup/JndiLookup (lambdainternal.CustomerClassLoader@1a6c5a9e)
2022-10-28 05:28:56.263  INFO  QuotasService - Version Info: a1609e3-dirty
2022-10-28 05:28:58.382  INFO  QuotasServiceDAL - Constructor init: 2107
2022-10-28 05:28:58.382  INFO  QuotasService - Constructor init: 2408
START RequestId: 2eadcb5c-ab3f-4c49-b291-001e4f10820b Version: $LATEST
2022-10-28 05:29:02.843 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - Service: rds
2022-10-28 05:29:04.873 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - No Quota found for key: DB clusters
2022-10-28 05:29:04.882 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - No Quota found for key: DB instances
2022-10-28 05:29:05.485 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - Service: elasticloadbalancing
2022-10-28 05:29:05.983 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - Entry key : Application Load Balancers per Region, Entry value: 0.0, quotaValue: 50.0
2022-10-28 05:29:06.985 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - Time to process: 941
2022-10-28 05:29:07.084 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - Time to process: 98
2022-10-28 05:29:07.104 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - Service: fargate
2022-10-28 05:29:07.243 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - Entry key : Fargate On-Demand vCPU resource count, Entry value: 0.0, quotaValue: 140.0
2022-10-28 05:29:07.243 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - Entry key : Fargate Spot vCPU resource count, Entry value: 0.0, quotaValue: 140.0
2022-10-28 05:29:08.408 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - Service: vpc
2022-10-28 05:29:08.702 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - Entry key : VPCs per Region, Entry value: 2.0, quotaValue: 5.0
2022-10-28 05:29:08.702 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - Entry key : Internet gateways per Region, Entry value: 2.0, quotaValue: 5.0
2022-10-28 05:29:08.703 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - Entry key : NAT gateways per Availability Zone, Entry value: 2.0, quotaValue: 5.0
2022-10-28 05:29:08.749 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - Time to process: 46
2022-10-28 05:29:08.762 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - Service: ec2
2022-10-28 05:29:09.727 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasServiceDAL - Entry key : Running On-Demand Standard (A, C, D, H, I, M, R, T, Z) instances, Entry value: 2.0, quotaValue: 256.0
2022-10-28 05:29:09.728 2eadcb5c-ab3f-4c49-b291-001e4f10820b INFO  QuotasService - SettingsService::getSettings exec 11278
END RequestId: 2eadcb5c-ab3f-4c49-b291-001e4f10820b
REPORT RequestId: 2eadcb5c-ab3f-4c49-b291-001e4f10820b  Duration: 11524.00 ms   Billed Duration: 11524 ms   Memory Size: 512 MB Max Memory Used: 243 MB Init Duration: 4331.07 ms
image