Repository: cdklabs/cdk-enterprise-iac (language: python)

Issue:
bug: Ecs Scaler doesn't work in Python
### What is the problem?

When calling the Python EcsIsoServiceAutoScaler, it can't find the Lambda asset

```
jsii.errors.JSIIError: Cannot find asset at <current_dir>/resources/constructs/ecsIsoServiceAutoscaler
```

### Reproduction Steps

Install the module in Python and attempt to instantiate EcsIsoServiceAutoScaler

### What did you expect to happen?

The construct is instantiated correctly

### What actually happened?

Received pathing error

### cdk-enterprise-iac version

latest

### Language

Python

### Other information

_No response_


Discussion / hints:

Fix patch:
diff --git a/API.md b/API.md
index 6bd72b1..0f16b08 100644
--- a/API.md
+++ b/API.md
@@ -199,10 +199,10 @@ const ecsIsoServiceAutoscalerProps: EcsIsoServiceAutoscalerProps = { ... }
 | <code><a href="#@cdklabs/cdk-enterprise-iac.EcsIsoServiceAutoscalerProps.property.scaleAlarm">scaleAlarm</a></code> | <code>aws-cdk-lib.aws_cloudwatch.Alarm</code> | The Cloudwatch Alarm that will cause scaling actions to be invoked, whether it's in or not in alarm will determine scale up and down actions. |
 | <code><a href="#@cdklabs/cdk-enterprise-iac.EcsIsoServiceAutoscalerProps.property.maximumTaskCount">maximumTaskCount</a></code> | <code>number</code> | The maximum number of tasks that the service will scale out to. |
 | <code><a href="#@cdklabs/cdk-enterprise-iac.EcsIsoServiceAutoscalerProps.property.minimumTaskCount">minimumTaskCount</a></code> | <code>number</code> | The minimum number of tasks the service will have. |
-| <code><a href="#@cdklabs/cdk-enterprise-iac.EcsIsoServiceAutoscalerProps.property.scaleInCooldowwn">scaleInCooldowwn</a></code> | <code>aws-cdk-lib.Duration</code> | How long will the application wait before performing another scale in action. |
-| <code><a href="#@cdklabs/cdk-enterprise-iac.EcsIsoServiceAutoscalerProps.property.scaleInIncrement">scaleInIncrement</a></code> | <code>number</code> | The number of tasks that will scale out on scal out alarm status. |
+| <code><a href="#@cdklabs/cdk-enterprise-iac.EcsIsoServiceAutoscalerProps.property.scaleInCooldown">scaleInCooldown</a></code> | <code>aws-cdk-lib.Duration</code> | How long will the application wait before performing another scale in action. |
+| <code><a href="#@cdklabs/cdk-enterprise-iac.EcsIsoServiceAutoscalerProps.property.scaleInIncrement">scaleInIncrement</a></code> | <code>number</code> | The number of tasks that will scale in on scale in alarm status. |
 | <code><a href="#@cdklabs/cdk-enterprise-iac.EcsIsoServiceAutoscalerProps.property.scaleOutCooldown">scaleOutCooldown</a></code> | <code>aws-cdk-lib.Duration</code> | How long will a the application wait before performing another scale out action. |
-| <code><a href="#@cdklabs/cdk-enterprise-iac.EcsIsoServiceAutoscalerProps.property.scaleOutIncrement">scaleOutIncrement</a></code> | <code>number</code> | The number of tasks that will scale out on scal out alarm status. |
+| <code><a href="#@cdklabs/cdk-enterprise-iac.EcsIsoServiceAutoscalerProps.property.scaleOutIncrement">scaleOutIncrement</a></code> | <code>number</code> | The number of tasks that will scale out on scale out alarm status. |
 
 ---
 
@@ -284,10 +284,10 @@ The minimum number of tasks the service will have.
 
 ---
 
-##### `scaleInCooldowwn`<sup>Optional</sup> <a name="scaleInCooldowwn" id="@cdklabs/cdk-enterprise-iac.EcsIsoServiceAutoscalerProps.property.scaleInCooldowwn"></a>
+##### `scaleInCooldown`<sup>Optional</sup> <a name="scaleInCooldown" id="@cdklabs/cdk-enterprise-iac.EcsIsoServiceAutoscalerProps.property.scaleInCooldown"></a>
 
 ```typescript
-public readonly scaleInCooldowwn: Duration;
+public readonly scaleInCooldown: Duration;
 ```
 
 - *Type:* aws-cdk-lib.Duration
@@ -306,7 +306,7 @@ public readonly scaleInIncrement: number;
 - *Type:* number
 - *Default:* 1
 
-The number of tasks that will scale out on scal out alarm status.
+The number of tasks that will scale in on scale in alarm status.
 
 ---
 
@@ -332,7 +332,7 @@ public readonly scaleOutIncrement: number;
 - *Type:* number
 - *Default:* 1
 
-The number of tasks that will scale out on scal out alarm status.
+The number of tasks that will scale out on scale out alarm status.
 
 ---
 
diff --git a/src/constructs/ecsIsoServiceAutoscaler/ecsIsoServiceAutoscaler.ts b/src/constructs/ecsIsoServiceAutoscaler/ecsIsoServiceAutoscaler.ts
index 326dd76..ad335c8 100644
--- a/src/constructs/ecsIsoServiceAutoscaler/ecsIsoServiceAutoscaler.ts
+++ b/src/constructs/ecsIsoServiceAutoscaler/ecsIsoServiceAutoscaler.ts
@@ -2,6 +2,8 @@
 Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 SPDX-License-Identifier: Apache-2.0
 */
+
+import * as path from 'path';
 import { Duration } from 'aws-cdk-lib';
 import { Alarm } from 'aws-cdk-lib/aws-cloudwatch';
 import { Cluster, IService } from 'aws-cdk-lib/aws-ecs';
@@ -43,13 +45,13 @@ export interface EcsIsoServiceAutoscalerProps {
    */
   readonly scaleAlarm: Alarm;
   /**
-   * The number of tasks that will scale out on scal out alarm status
+   * The number of tasks that will scale out on scale out alarm status
    *
    * @default 1
    */
   readonly scaleOutIncrement?: number;
   /**
-   * The number of tasks that will scale out on scal out alarm status
+   * The number of tasks that will scale in on scale in alarm status
    *
    * @default 1
    */
@@ -65,7 +67,7 @@ export interface EcsIsoServiceAutoscalerProps {
    *
    * @default 60 seconds
    */
-  readonly scaleInCooldowwn?: Duration;
+  readonly scaleInCooldown?: Duration;
 }
 
 /**
@@ -91,14 +93,19 @@ export class EcsIsoServiceAutoscaler extends Construct {
       scaleOutIncrement = 1,
       scaleInIncrement = 1,
       scaleOutCooldown = Duration.seconds(60),
-      scaleInCooldowwn = Duration.seconds(60),
+      scaleInCooldown = Duration.seconds(60),
     } = props;
 
     const ecsScalingManager = new Function(
       this,
       `${id}-EcsServiceScalingManager`,
       {
-        code: Code.fromAsset('./resources/constructs/ecsIsoServiceAutoscaler/'),
+        code: Code.fromAsset(
+          path.join(
+            __dirname,
+            '../../../resources/constructs/ecsIsoServiceAutoscaler'
+          )
+        ),
         handler: 'ecs_scaling_manager.handler',
         runtime: Runtime.PYTHON_3_7,
         role: props.role,
@@ -111,7 +118,7 @@ export class EcsIsoServiceAutoscaler extends Construct {
           SCALE_OUT_INCREMENT: scaleOutIncrement.toString(),
           SCALE_OUT_COOLDOWN: scaleOutCooldown.toSeconds().toString(),
           SCALE_IN_INCREMENT: scaleInIncrement.toString(),
-          SCALE_IN_COOLDOWN: scaleInCooldowwn.toSeconds().toString(),
+          SCALE_IN_COOLDOWN: scaleInCooldown.toSeconds().toString(),
         },
       }
     );


Test patch:
diff --git a/test/constructs/ecsIsoServiceAutoscaler/ecsIsoServiceAutoscaler.test.ts b/test/constructs/ecsIsoServiceAutoscaler/ecsIsoServiceAutoscaler.test.ts
index c91a48d..04c3191 100644
--- a/test/constructs/ecsIsoServiceAutoscaler/ecsIsoServiceAutoscaler.test.ts
+++ b/test/constructs/ecsIsoServiceAutoscaler/ecsIsoServiceAutoscaler.test.ts
@@ -97,7 +97,7 @@ describe('EcsIsoServiceAutoscaler construct', () => {
       maximumTaskCount: 15,
       scaleInIncrement: 2,
       scaleOutIncrement: 2,
-      scaleInCooldowwn: Duration.seconds(120),
+      scaleInCooldown: Duration.seconds(120),
       scaleOutCooldown: Duration.seconds(120),
     });