dcl-ops-lib 6.8.9 → 6.8.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -379,11 +379,12 @@ function createInternalService(config) {
379
379
  return service;
380
380
  });
381
381
  }
382
- function setAutoscaling(_, config) {
383
- const ecsTarget = new aws.appautoscaling.Target(`ecs-target-asset-bundle-converter-dev`, {
382
+ function setAutoscaling(service, config) {
383
+ const serviceId = service.id.apply((id) => id);
384
+ const ecsTarget = new aws.appautoscaling.Target(`ecs-target-${serviceId}`, {
384
385
  maxCapacity: config.maxCapacity,
385
386
  minCapacity: config.desiredCount,
386
- resourceId: 'service/dev-main/asset-bundle-converter-blue-ad2fc4b',
387
+ resourceId: serviceId,
387
388
  scalableDimension: "ecs:service:DesiredCount",
388
389
  serviceNamespace: "ecs",
389
390
  });
@@ -393,7 +394,7 @@ function setAutoscaling(_, config) {
393
394
  dimensions: [
394
395
  {
395
396
  name: "QueueName",
396
- value: config.metricDimensionValue
397
+ value: config.metricDimensionValue,
397
398
  },
398
399
  ],
399
400
  statistic: config.statistic,
@@ -406,8 +407,8 @@ function setAutoscaling(_, config) {
406
407
  return new aws.appautoscaling.Policy(`ecs-autoscaling-policy-asset-bundle-converter-dev`, {
407
408
  policyType: "TargetTrackingScaling",
408
409
  resourceId: ecsTarget.resourceId,
409
- scalableDimension: "ecs:service:DesiredCount",
410
- serviceNamespace: "ecs",
410
+ scalableDimension: ecsTarget.scalableDimension,
411
+ serviceNamespace: ecsTarget.serviceNamespace,
411
412
  targetTrackingScalingPolicyConfiguration: {
412
413
  targetValue: config.targetValue,
413
414
  customizedMetricSpecification: TTS_CustomizedMetricSpecification,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-ops-lib",
3
- "version": "6.8.9",
3
+ "version": "6.8.10",
4
4
  "scripts": {
5
5
  "build": "tsc && cp bin/* . && node test.js",
6
6
  "clean": "rm *.d.ts *.js *.js.map"