How to use the @mapbox/cloudfriend.getAzs function in @mapbox/cloudfriend

To help you get started, we’ve selected a few @mapbox/cloudfriend examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hotosm / tasking-manager / cloudformation / tasking-manager.template.js View on Github external
const Resources = {
  TaskingManagerASG: {
    DependsOn: 'TaskingManagerLaunchConfiguration',
    Type: 'AWS::AutoScaling::AutoScalingGroup',
    Properties: {
      AutoScalingGroupName: cf.stackName,
      Cooldown: 300,
      MinSize: 1,
      DesiredCapacity: 1,
      MaxSize: 1,
      HealthCheckGracePeriod: 300,
      LaunchConfigurationName: cf.ref('TaskingManagerLaunchConfiguration'),
      TargetGroupARNs: [ cf.ref('TaskingManagerTargetGroup') ],
      HealthCheckType: 'EC2',
      AvailabilityZones: cf.getAzs(cf.region)
    },
    UpdatePolicy: {
      AutoScalingRollingUpdate: {
        PauseTime: 'PT60M',
        WaitOnResourceSignals: true
      }
    }
  },
  TaskingManagerScaleUp: {
      Type: "AWS::AutoScaling::ScalingPolicy",
      Properties: {
        AutoScalingGroupName: cf.ref('TaskingManagerASG'),
        PolicyType: 'TargetTrackingScaling',
        TargetTrackingConfiguration: {
          TargetValue: 85,
          PredefinedMetricSpecification: {
github hotosm / visualize-change / devops / visualize-change.template.js View on Github external
const Resources = {
  VisualizeChangeASG: {
    DependsOn: "VisualizeChangeLaunchConfiguration",
    Type: "AWS::AutoScaling::AutoScalingGroup",
    Properties: {
      AutoScalingGroupName: cf.stackName,
      Cooldown: 300,
      MinSize: 1,
      DesiredCapacity: 1,
      MaxSize: 1,
      HealthCheckGracePeriod: 300,
      LaunchConfigurationName: cf.ref("VisualizeChangeLaunchConfiguration"),
      TargetGroupARNs: [cf.ref("VisualizeChangeTargetGroup")],
      HealthCheckType: "EC2",
      AvailabilityZones: cf.getAzs(cf.region)
    }
  },
  VisualizeChangeScaleUp: {
    Type: "AWS::AutoScaling::ScalingPolicy",
    Properties: {
      AutoScalingGroupName: cf.ref("VisualizeChangeASG"),
      PolicyType: "TargetTrackingScaling",
      TargetTrackingConfiguration: {
        TargetValue: 85,
        PredefinedMetricSpecification: {
          PredefinedMetricType: "ASGAverageCPUUtilization"
        }
      },
      Cooldown: 300
    }
  },