Repository: aws-samples/cdk-keycloak (language: python)

Issue:
modify
    const taskDefinition = new ecs.FargateTaskDefinition(this, 'TaskDef', {
      cpu: 1024,
      memoryLimitMiB: 2048,
      executionRole: taskRole,
    });


Discussion / hints:

Fix patch:
diff --git a/.projen/deps.json b/.projen/deps.json
index 107145c..27ba6de 100644
--- a/.projen/deps.json
+++ b/.projen/deps.json
@@ -14,6 +14,11 @@
       "version": "^14.17.0",
       "type": "build"
     },
+    {
+      "name": "@types/prettier",
+      "version": "<2.6.0",
+      "type": "build"
+    },
     {
       "name": "@typescript-eslint/eslint-plugin",
       "type": "build"
diff --git a/.projenrc.js b/.projenrc.js
index ae6c9b5..58ce081 100644
--- a/.projenrc.js
+++ b/.projenrc.js
@@ -22,6 +22,10 @@ const project = new AwsCdkConstructLibrary({
     '@aws-cdk/aws-secretsmanager',
     '@aws-cdk/core',
   ],
+  devDeps: [
+    '@types/prettier@<2.6.0',
+  ],
+  // jestOptions: { jestVersion: '^28.0.0' },
   depsUpgradeOptions: {
     ignoreProjen: false,
     workflowOptions: {
diff --git a/package.json b/package.json
index 35c2dc2..350b1ab 100644
--- a/package.json
+++ b/package.json
@@ -37,6 +37,7 @@
     "@aws-cdk/assert": "^1.73.0",
     "@types/jest": "^26.0.24",
     "@types/node": "^14.17.0",
+    "@types/prettier": "<2.6.0",
     "@typescript-eslint/eslint-plugin": "^4.33.0",
     "@typescript-eslint/parser": "^4.33.0",
     "eslint": "^7.32.0",
diff --git a/src/keycloak.ts b/src/keycloak.ts
index 0a198a4..0aabf90 100644
--- a/src/keycloak.ts
+++ b/src/keycloak.ts
@@ -508,8 +508,8 @@ export class ContainerService extends cdk.Construct {
       ),
     });
     const taskDefinition = new ecs.FargateTaskDefinition(this, 'TaskDef', {
-      cpu: 4096,
-      memoryLimitMiB: 30720,
+      cpu: 1024,
+      memoryLimitMiB: 2048,
       executionRole: taskRole,
     });
 
diff --git a/yarn.lock b/yarn.lock
index fcacf7c..cd0b7d9 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1396,6 +1396,11 @@
   resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301"
   integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==
 
+"@types/prettier@<2.6.0":
+  version "2.4.4"
+  resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.4.tgz#5d9b63132df54d8909fce1c3f8ca260fdd693e17"
+  integrity sha512-ReVR2rLTV1kvtlWFyuot+d1pkpG2Fw/XKE3PDAdj57rbM97ttSp9JZ2UsP+2EHTylra9cUf6JA7tGwW1INzUrA==
+
 "@types/prettier@^2.0.0":
   version "2.4.1"
   resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.1.tgz#e1303048d5389563e130f5bdd89d37a99acb75eb"


Test patch:
diff --git a/test/__snapshots__/integ.snapshot.test.ts.snap b/test/__snapshots__/integ.snapshot.test.ts.snap
index 1397821..e423161 100644
--- a/test/__snapshots__/integ.snapshot.test.ts.snap
+++ b/test/__snapshots__/integ.snapshot.test.ts.snap
@@ -701,7 +701,7 @@ Object {
             ],
           },
         ],
-        "Cpu": "4096",
+        "Cpu": "1024",
         "ExecutionRoleArn": Object {
           "Fn::GetAtt": Array [
             "KeyCloakKeyCloakContainerSerivceTaskRole0658CED2",
@@ -709,7 +709,7 @@ Object {
           ],
         },
         "Family": "keycloakdemoKeyCloakKeyCloakContainerSerivceTaskDef486F1059",
-        "Memory": "30720",
+        "Memory": "2048",
         "NetworkMode": "awsvpc",
         "RequiresCompatibilities": Array [
           "FARGATE",
diff --git a/test/cluster.test.ts b/test/cluster.test.ts
index a435dce..8f41c4d 100644
--- a/test/cluster.test.ts
+++ b/test/cluster.test.ts
@@ -420,7 +420,7 @@ test('with env', () => {
         ],
       },
     ],
-    Cpu: '4096',
+    Cpu: '1024',
     ExecutionRoleArn: {
       'Fn::GetAtt': [
         'KeyCloakKeyCloakContainerSerivceTaskRole0658CED2',
@@ -428,7 +428,7 @@ test('with env', () => {
       ],
     },
     Family: 'testingstackKeyCloakKeyCloakContainerSerivceTaskDef799BAD5B',
-    Memory: '30720',
+    Memory: '2048',
     NetworkMode: 'awsvpc',
     RequiresCompatibilities: [
       'FARGATE',