Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ environments:
- path: "/"
allowed_source_ips: ["67.170.82.40/32", "0.0.0.0/0"]
alias: example.com
count:
response_time: 2s
network:
vpc:
security_groups:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,25 @@ Resources: # If a bucket URL is specified, that means the template exists.
ScaleInCooldown: 120
ScaleOutCooldown: 150
TargetValue: 70
AutoScalingPolicyALBAverageResponseTime:
Type: AWS::ApplicationAutoScaling::ScalingPolicy
Properties:
PolicyName: !Join ['-', [!Ref WorkloadName, ALBAverageResponseTime, ScalingPolicy]]
PolicyType: TargetTrackingScaling
ScalingTargetId: !Ref AutoScalingTarget
TargetTrackingScalingPolicyConfiguration:
CustomizedMetricSpecification:
Dimensions:
- Name: LoadBalancer
Value: mockImportALBName
- Name: TargetGroup
Value: !GetAtt TargetGroupForImportedALB.TargetGroupFullName
MetricName: TargetResponseTime
Namespace: AWS/ApplicationELB
Statistic: Average
ScaleInCooldown: 120
ScaleOutCooldown: 60
TargetValue: 2
EnvControllerAction:
Metadata:
'aws:copilot:description': "Update your environment's shared resources"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,11 @@ AutoScalingPolicyALBAverageResponseTime:
Value: !GetAtt EnvControllerAction.PublicLoadBalancerFullName
{{- end}}
- Name: TargetGroup
{{- if $.ImportedALB}}
Value: !GetAtt TargetGroupForImportedALB.TargetGroupFullName
{{- else}}
Value: !GetAtt TargetGroup.TargetGroupFullName
{{- end}}
MetricName: TargetResponseTime
Namespace: AWS/ApplicationELB
Statistic: Average
Expand Down