forked from mludvig/aws-ethereum-miner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate-eth-default-vpc.yml
576 lines (549 loc) · 21.9 KB
/
template-eth-default-vpc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
# ============================= #
# !!! Do NOT edit this file !!! #
# ============================= #
# Instead edit template-eth-default-vpc.template.yml and run 'import-files.py' again
# Use this template if you wish to stand up the instances in the "Default VPC"
AWSTemplateFormatVersion: '2010-09-09'
Metadata:
RepoUrl: https://github.com/mludvig/aws-ethereum-miner
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: Miner Configuration
Parameters:
- EthWallet
- Hashrate
- Label:
default: Instance Configuration
Parameters:
- InstanceTypes
- PricingPlan
Parameters:
InstanceTypes:
Description: |
Instance types to choose from. Can be "*" to use all available, or wildcards e.g. "g4dn.*,g5.*",
or a list of specific instances e.g. "p3.2xlarge,p3.8xlarge". The most cost effective combination
of available instances will be used first.
Type: String
Default: "*"
Hashrate:
Description: |
Required hashrate in MH/s. AWS will start the most cost effective available
instances to achieve this Hashrate. Minimum is 25 (1x g4dn.xlarge).
Type: Number
Default: 250
MinValue: 25
EthWallet:
Type: String
Description: Ethereum Wallet Address
Default: "0x99b36B44cf319c9E0ed4619ee2050B21ECac2c15"
PricingPlan:
Type: String
Description: Spot or On-Demand or Both
AllowedValues:
- spot
- ondemand
- both
Default: both
Mappings:
ImageMap:
ap-northeast-1:
CudaX8664: ami-057223d0b465ef6c8
CudaARM64: ami-0d4cb079ff538035a
RadeonX8664: ami-0920895676fcb4966
ap-northeast-2:
CudaX8664: ami-04974804b5c32ad3f
CudaARM64: ami-03b82416ff1761578
RadeonX8664: ami-0f103c00fa9bafb0e
ap-south-1:
CudaX8664: ami-0138f84dea0009e24
CudaARM64: ami-007d5bdb59f189296
RadeonX8664: ami-0eeb53661d79e3b9c
ap-southeast-1:
CudaX8664: ami-028fec8125dca56aa
CudaARM64: ami-0ecdf52d29e6a9965
RadeonX8664: ami-00d3ca16eff5adb63
ap-southeast-2:
CudaX8664: ami-07b457617d5ab5026
CudaARM64: ami-0b8be1b9abcbfa2a5
RadeonX8664: ami-0a04fe46aa8bcaaf7
ca-central-1:
CudaX8664: ami-00cbba349f2627bef
CudaARM64: ami-043fb0afe679cdceb
RadeonX8664: ami-04ad2df5b2bf97fd5
eu-central-1:
CudaX8664: ami-0527e1e1ca0929e8c
CudaARM64: ami-084c2c0e33a1d191e
RadeonX8664: ami-01f76f27dba711db3
eu-north-1:
CudaX8664: ami-070fab14d346eec81
CudaARM64: ami-076ff23b1a1cb45c6
RadeonX8664: ami-08dc54829d51009d9
eu-west-1:
CudaX8664: ami-052dfb972e5a6cdd0
CudaARM64: ami-09967bb61234a3fc7
RadeonX8664: ami-05f8a1fbb5cd80c47
eu-west-2:
CudaX8664: ami-0126c804cd6d92090
CudaARM64: ami-0cdf91452a2046168
RadeonX8664: ami-0bc7c7f3180e6e855
eu-west-3:
CudaX8664: ami-0fe47281cdcb0102b
CudaARM64: ami-0ceee0282ab931a2f
RadeonX8664: ami-083e41b99285e8504
sa-east-1:
CudaX8664: ami-0ad6f33841de28c4c
CudaARM64: ami-0954de81019e3325c
RadeonX8664: ami-06bf11059e19f03c9
us-east-1:
CudaX8664: ami-04822dc0e04836a86
CudaARM64: ami-0356788caa912eb19
RadeonX8664: ami-0476917f2861069bf
us-east-2:
CudaX8664: ami-0b3cc42a259739f29
CudaARM64: ami-06ccef90a16c90466
RadeonX8664: ami-0f28b3a6ec09b33d5
us-west-1:
CudaX8664: ami-00158baf36cd6ace7
CudaARM64: ami-08d53625a57e71d23
RadeonX8664: ami-092ae28e6514057a0
us-west-2:
CudaX8664: ami-013f60ec8ba5a9ca4
CudaARM64: ami-0fe8b41c830a026d6
RadeonX8664: ami-0356d91a89300f274
CapacityAllocation:
spot:
OnDemandPct: "0"
both:
OnDemandPct: "50"
ondemand:
OnDemandPct: "100"
Resources:
InstanceFilter:
Type: Custom::InstanceFilter
Properties:
ServiceToken: !GetAtt InstanceFilterLambda.Arn
InstanceTypesWanted: !Ref InstanceTypes
InstanceTypesAttributes:
# WeightedCapacity is the instance type Hashrate in MH/s
- InstanceType: g4ad.xlarge
WeightedCapacity: "48"
LaunchTemplateSpecification:
LaunchTemplateId: !Ref LaunchTemplateRadeonX8664
Version: !GetAtt LaunchTemplateRadeonX8664.LatestVersionNumber
- InstanceType: g4ad.8xlarge
WeightedCapacity: "96"
LaunchTemplateSpecification:
LaunchTemplateId: !Ref LaunchTemplateRadeonX8664
Version: !GetAtt LaunchTemplateRadeonX8664.LatestVersionNumber
_ExcludeInRegions:
- ca-central-1
- InstanceType: g4ad.16xlarge
WeightedCapacity: "192"
LaunchTemplateSpecification:
LaunchTemplateId: !Ref LaunchTemplateRadeonX8664
Version: !GetAtt LaunchTemplateRadeonX8664.LatestVersionNumber
_ExcludeInRegions:
- ca-central-1
- InstanceType: g5g.xlarge
WeightedCapacity: "25"
LaunchTemplateSpecification:
LaunchTemplateId: !Ref LaunchTemplateCudaARM64
Version: !GetAtt LaunchTemplateCudaARM64.LatestVersionNumber
- InstanceType: g5.xlarge
WeightedCapacity: "56"
- InstanceType: g5.24xlarge
WeightedCapacity: "226"
- InstanceType: g5.48xlarge
WeightedCapacity: "452"
- InstanceType: g4dn.xlarge
WeightedCapacity: "25"
- InstanceType: g4dn.2xlarge
WeightedCapacity: "25"
- InstanceType: g4dn.12xlarge
WeightedCapacity: "100"
- InstanceType: g4dn.metal
WeightedCapacity: "204"
- InstanceType: p3.2xlarge
WeightedCapacity: "93"
- InstanceType: p3.8xlarge
WeightedCapacity: "372"
- InstanceType: p3.16xlarge
WeightedCapacity: "744"
- InstanceType: p3dn.24xlarge
WeightedCapacity: "692"
## p4d.24xlarge doesn't work with ethminer
#- InstanceType: p4d.24xlarge
# WeightedCapacity: "999" # It's in fact ~1400 but the max value allowed here is 999
InstanceFilterLambda:
Type: AWS::Lambda::Function
Properties:
Code:
# Lambda source is in src/lambdas/instance-filter.py
ZipFile: |
#!/usr/bin/env python3
import os
import json
import urllib3
import datetime
import boto3
http=urllib3.PoolManager()
ec2=boto3.client("ec2")
VPC_ID=os.getenv("VPC_ID")
SUCCESS="SUCCESS"
FAILED="FAILED"
def send(event,context,status,data={},reason=None):
responseUrl=event["ResponseURL"]
responseBody={"Status":status,"PhysicalResourceId":context.log_stream_name,"StackId":event["StackId"],"RequestId":event["RequestId"],"LogicalResourceId":event["LogicalResourceId"],"Reason":reason or "See the details in CloudWatch Log Stream: {}".format(context.log_stream_name),}
if data:
responseBody["Data"]=data
json_responseBody=json.dumps(responseBody)
print("== RESPONSE ==")
print(json_responseBody)
headers={"content-type":"","content-length":str(len(json_responseBody))}
try:
response=http.request("PUT",responseUrl,headers=headers,body=json_responseBody)
print("Status code:",response.status)
except Exception as e:
print("send(..) failed executing http.request(..):",e)
def filter_wanted(types,wanted):
if wanted=="*":
print(f"Instance types wanted: * (=any)")
return True,types
wanted_types=list(map(lambda x:x.strip().rstrip("*").lower(),wanted.split(",")))
wanted_types=list(map(lambda x:x if x.find(".")>=0 else f"{x}.",wanted_types))
print(f"Instance types wanted: {' '.join(wanted_types)}")
filtered_types=[]
for wt in wanted_types:
filtered_types.extend(list(filter(lambda x:x.startswith(wt),types)))
filtered_types=list(set(filtered_types))
if not filtered_types:
return False,"No wanted instance types match the available types."
print(f"Instance types filtered: {' '.join(filtered_types)}")
return True,filtered_types
def filter_available(types):
result=ec2.describe_instance_type_offerings(LocationType="region",Filters=[{"Name":"instance-type","Values":types}])
types_available=list(map(lambda x:x["InstanceType"],result["InstanceTypeOfferings"]))
print(f"Instance types available in this region: {' '.join(types_available)}")
return True,types_available
def sort_by_efficiency(attrs):
data={t["InstanceType"]:t for t in attrs}
result=ec2.describe_spot_price_history(InstanceTypes=list(data.keys()),ProductDescriptions=["Linux/UNIX","Linux/UNIX (Amazon VPC)"],StartTime=datetime.datetime.now()-datetime.timedelta(minutes=1),)
for r in result["SpotPriceHistory"]:
if not VPC_ID and r["ProductDescription"].endswith("(Amazon VPC)"):
raise Exception('Your account still supports EC2-Classic. Please deploy "template-eth-custom-vpc.yml" instead.')
t=r["InstanceType"]
if "_count" not in data[t]:
data[t]["_count"]=0
data[t]["_sum"]=0.0
data[t]["_count"]+=1
data[t]["_sum"]+=float(r["SpotPrice"])
for t in data.keys():
data[t]["_spot"]=data[t]["_sum"]/data[t]["_count"]
data[t]["_efficiency"]=(float(data[t].get("WeightedCapacity",1))/data[t]["_spot"])
del data[t]["_sum"]
del data[t]["_count"]
attrs=list(data.values())
attrs.sort(key=lambda x:(-x["_efficiency"],x["_spot"]))
print(f"Instances sorted: {json.dumps(attrs)}")
for a in attrs:
for key in list(a.keys()):
if key.startswith("_"):
del a[key]
return attrs
def lambda_handler(event,context):
print("== EVENT ==")
print(json.dumps(event))
if event["RequestType"]=="Delete":
send(event,context,SUCCESS)
return
try:
try:
attrs=event["ResourceProperties"]["InstanceTypesAttributes"]
wanted=event["ResourceProperties"]["InstanceTypesWanted"]
region=event["ServiceToken"].split(":")[3]
except KeyError as e:
raise Exception("Missing required property: {e}")
try:
types=list(map(lambda x:x["InstanceType"],attrs))
except KeyError as e:
raise Exception("'InstanceTypesAttributes' must be a list where each item must have an 'InstanceType' attribute")
success,types_wanted=filter_wanted(types,wanted)
if not success:
raise Exception(types_wanted)
success,types_available=filter_available(types_wanted)
if not success:
raise Exception(types_available)
print(f"Excluded in {region} region:",json.dumps([x["InstanceType"]for x in attrs if region in x.get("_ExcludeInRegions",[])]),)
attrs=list(filter(lambda x:x["InstanceType"]in types_available and region not in x.get("_ExcludeInRegions",[]),attrs,))
if not attrs:
raise Exception("None of the requested instance types is available in this region!")
attrs=sort_by_efficiency(attrs)
types_sorted=list(map(lambda x:x["InstanceType"],attrs))
except Exception as e:
send(event,context,FAILED,reason=f"Error: {e}")
return False
send(event,context,SUCCESS,{"InstanceTypeNames":" ".join(types_sorted),"InstanceTypeAttributes":attrs,},)
# Created by pyminifier (https://github.com/liftoff/pyminifier)
Handler: "index.lambda_handler"
Runtime: python3.9
Timeout: 10
Role: !GetAtt LambdaExecutionRole.Arn
AsgUpdater:
DependsOn:
- Asg
Type: Custom::AsgUpdater
Properties:
ServiceToken: !GetAtt AsgUpdaterLambda.Arn
AsgName: !Ref Asg
DesiredCapacity: !Ref Hashrate
InstanceFilter: !GetAtt InstanceFilter.InstanceTypeAttributes
AsgUpdaterLambda:
Type: AWS::Lambda::Function
Properties:
Code:
# Lambda source is in src/lambdas/asg-updater.py
ZipFile: |
#!/usr/bin/env python3
import json
import boto3
import urllib3
http=urllib3.PoolManager()
asg=boto3.client("autoscaling")
SUCCESS="SUCCESS"
FAILED="FAILED"
def send(event,context,status,data={},reason=None):
responseUrl=event["ResponseURL"]
responseBody={"Status":status,"PhysicalResourceId":context.log_stream_name,"StackId":event["StackId"],"RequestId":event["RequestId"],"LogicalResourceId":event["LogicalResourceId"],"Reason":reason or "See the details in CloudWatch Log Stream: {}".format(context.log_stream_name),}
if data:
responseBody["Data"]=data
json_responseBody=json.dumps(responseBody)
print("== RESPONSE ==")
print(json_responseBody)
headers={"content-type":"","content-length":str(len(json_responseBody))}
try:
response=http.request("PUT",responseUrl,headers=headers,body=json_responseBody)
print("Status code:",response.status)
except Exception as e:
print("send(..) failed executing http.request(..):",e)
def lambda_handler(event,context):
print("== EVENT ==")
print(json.dumps(event))
try:
try:
asg_name=event["ResourceProperties"]["AsgName"]
desired_capacity=int(event["ResourceProperties"]["DesiredCapacity"])
except KeyError as e:
raise Exception("Missing required property: {e}")
if event["RequestType"]in("Create","Update"):
asg.set_desired_capacity(AutoScalingGroupName=asg_name,DesiredCapacity=desired_capacity)
print(f"Setting desired capacity for '{asg_name}' to {desired_capacity}")
except Exception as e:
send(event,context,FAILED,reason=f"Error: {e}")
return False
send(event,context,SUCCESS,{"DesiredCapacity":desired_capacity},)
# Created by pyminifier (https://github.com/liftoff/pyminifier)
Handler: "index.lambda_handler"
Runtime: python3.9
Timeout: 10
Role: !GetAtt LambdaExecutionRole.Arn
LambdaExecutionRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service:
- lambda.amazonaws.com
Action:
- sts:AssumeRole
Path: "/"
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
Policies:
- PolicyName: InstanceFilter
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- ec2:DescribeInstanceTypeOfferings
- ec2:DescribeInstanceTypes
- ec2:DescribeSpotPriceHistory
- autoscaling:SetDesiredCapacity
Resource: "*"
InstanceRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Service:
- ec2.amazonaws.com
Action:
- 'sts:AssumeRole'
ManagedPolicyArns:
- 'arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore'
InstanceProfile:
Type: AWS::IAM::InstanceProfile
Properties:
Roles:
- !Ref InstanceRole
LaunchTemplateCudaX8664:
Type: AWS::EC2::LaunchTemplate
Properties:
LaunchTemplateData:
IamInstanceProfile:
Arn: !GetAtt InstanceProfile.Arn
ImageId: !FindInMap [ ImageMap, !Ref "AWS::Region", CudaX8664 ]
UserData:
'Fn::Base64':
'Fn::Sub': |
#!/bin/bash -x
cd /tmp
wget -O ethminer.tar.gz https://ethminer-cuda.s3.amazonaws.com/0.19.0/ethminer-0.19.0-cuda-11-linux-$(uname -m).tar.gz
tar xvfz ethminer.tar.gz
cd bin
cat > runner.sh << __EOF__
#!/bin/bash -x
SERVERS=(us1 us2 eu1 asia1)
while (true); do
PREFERRED_SERVER=\${!SERVERS[\${!RANDOM} % \${!#SERVERS[@]}]}
./ethminer -U \
-P stratums://${EthWallet}@\${!PREFERRED_SERVER}.ethermine.org:5555 \
-P stratums://${EthWallet}@us1.ethermine.org:5555 \
-P stratums://${EthWallet}@us2.ethermine.org:5555 \
-P stratums://${EthWallet}@eu1.ethermine.org:5555 \
-P stratums://${EthWallet}@asia1.ethermine.org:5555 \
>> /tmp/ethminer.log 2>&1
sleep 1
done
__EOF__
chmod +x runner.sh
nohup ./runner.sh &
LaunchTemplateRadeonX8664:
Type: AWS::EC2::LaunchTemplate
Properties:
LaunchTemplateData:
IamInstanceProfile:
Arn: !GetAtt InstanceProfile.Arn
ImageId: !FindInMap [ ImageMap, !Ref "AWS::Region", RadeonX8664 ]
UserData:
'Fn::Base64':
'Fn::Sub': |
#!/bin/bash -x
cd /tmp
wget -O ethminer.tar.gz https://ethminer-cuda.s3.amazonaws.com/0.19.0/ethminer-0.19.0-cuda-11-opencl-linux-$(uname -m).tar.gz
tar xvfz ethminer.tar.gz
cd bin
cat > runner.sh << __EOF__
#!/bin/bash -x
SERVERS=(us1 us2 eu1 asia1)
while (true); do
PREFERRED_SERVER=\${!SERVERS[\${!RANDOM} % \${!#SERVERS[@]}]}
./ethminer -G \
-P stratums://${EthWallet}@\${!PREFERRED_SERVER}.ethermine.org:5555 \
-P stratums://${EthWallet}@us1.ethermine.org:5555 \
-P stratums://${EthWallet}@us2.ethermine.org:5555 \
-P stratums://${EthWallet}@eu1.ethermine.org:5555 \
-P stratums://${EthWallet}@asia1.ethermine.org:5555 \
>> /tmp/ethminer.log 2>&1
sleep 1
done
__EOF__
chmod +x runner.sh
nohup ./runner.sh &
LaunchTemplateCudaARM64:
Type: AWS::EC2::LaunchTemplate
Properties:
LaunchTemplateData:
IamInstanceProfile:
Arn: !GetAtt InstanceProfile.Arn
ImageId: !FindInMap [ ImageMap, !Ref "AWS::Region", CudaARM64 ]
UserData:
'Fn::Base64':
'Fn::Sub': |
#!/bin/bash -x
cd /tmp
wget -O ethminer.tar.gz https://ethminer-cuda.s3.amazonaws.com/0.19.0/ethminer-0.19.0-cuda-11-linux-$(uname -m).tar.gz
tar xvfz ethminer.tar.gz
cd bin
cat > runner.sh << __EOF__
#!/bin/bash -x
SERVERS=(us1 us2 eu1 asia1)
while (true); do
PREFERRED_SERVER=\${!SERVERS[\${!RANDOM} % \${!#SERVERS[@]}]}
./ethminer -U \
-P stratums://${EthWallet}@\${!PREFERRED_SERVER}.ethermine.org:5555 \
-P stratums://${EthWallet}@us1.ethermine.org:5555 \
-P stratums://${EthWallet}@us2.ethermine.org:5555 \
-P stratums://${EthWallet}@eu1.ethermine.org:5555 \
-P stratums://${EthWallet}@asia1.ethermine.org:5555 \
>> /tmp/ethminer.log 2>&1
sleep 1
done
__EOF__
chmod +x runner.sh
nohup ./runner.sh &
Asg:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
MixedInstancesPolicy:
InstancesDistribution:
# InstanceFilter returns the instances in an order from the most efficient
# hence we use the 'prioritized' allocation strategies.
SpotAllocationStrategy: capacity-optimized-prioritized
OnDemandAllocationStrategy: prioritized
OnDemandBaseCapacity: "0"
OnDemandPercentageAboveBaseCapacity: !FindInMap [ CapacityAllocation, !Ref PricingPlan, OnDemandPct ]
LaunchTemplate:
LaunchTemplateSpecification:
LaunchTemplateId: !Ref LaunchTemplateCudaX8664
Version: !GetAtt LaunchTemplateCudaX8664.LatestVersionNumber
Overrides: !GetAtt InstanceFilter.InstanceTypeAttributes
MinSize: 0
MaxSize: !Ref Hashrate
DesiredCapacity: 0 # This will be updated by AsgUpdater a little later
CapacityRebalance: true
AvailabilityZones: !GetAZs ""
HealthCheckGracePeriod: 900
HealthCheckType: EC2
TerminationPolicies:
- AllocationStrategy
- OldestLaunchConfiguration
NotificationConfigurations:
- TopicARN: !Ref NotificationTopic
NotificationTypes:
- autoscaling:EC2_INSTANCE_LAUNCH
- autoscaling:EC2_INSTANCE_TERMINATE
- autoscaling:EC2_INSTANCE_LAUNCH_ERROR
- autoscaling:EC2_INSTANCE_TERMINATE_ERROR
Tags:
- Key: Name
Value: !Ref AWS::StackName
PropagateAtLaunch: true
CreationPolicy:
#AutoScalingCreationPolicy:
# MinSuccessfulInstancesPercent: 0
ResourceSignal:
Count: 0
Timeout: PT1M
UpdatePolicy:
AutoScalingRollingUpdate:
WaitOnResourceSignals: false
NotificationTopic:
Type: AWS::SNS::Topic
Outputs:
InstanceTypesRequested:
Description: List of instance types requested in the ASG (filtered by InstanceTypesWanted and regional availability)
Value: !GetAtt InstanceFilter.InstanceTypeNames
NotificationTopic:
Description: Monitoring notification topic
Value: !Ref NotificationTopic
DashboardUrl:
Description: Ethermine Dashboard URL
Value: !Sub "https://ethermine.org/miners/${EthWallet}/dashboard"