mludvig / aws-ethereum-miner

CloudFormation template for mining Ethereum crypto currency on AWS
267 stars 152 forks source link

Launching with stack with 'g4ad.2xlarge' specified #38

Closed ddpunicorn closed 2 years ago

ddpunicorn commented 2 years ago

I am getting the following error when launching the template with 'g4ad.2xlarge' specified: Received response status [FAILED] from custom resource. Message returned: Error: No wanted instance types match the available types. (RequestId: 5*******-****-****-****-*********) And the stack is getting rolled back. However, I have no trouble launching the stack with 'g4ad.xlarge'/'g4ad.8xlarge' specified. And no problem launching g4ad.2xlarge instances (both Spot and On-Demand) with the given instance template manually from the console. Screen Shot

mludvig commented 2 years ago

Which region? Are you sure you didn’t make a typo in the parameters? Also can check the output of InstanceFilter lambda in CloudWatch logs for hints.

ddpunicorn commented 2 years ago

Region: us-east-1 CloudWatch log for instance-filter.py:

"ResourceProperties": 
{ "ServiceToken": "arn:aws:lambda:us-east-1:**********", 
    "InstanceTypesWanted": "g4ad.2xlarge", 
    "InstanceTypesAttributes": 
        [ { "LaunchTemplateSpecification": 
                { "Version": "1", "LaunchTemplateId": "lt-03c7d1f39daf039df" }, "WeightedCapacity": "48", "InstanceType": "g4ad.xlarge" }, 
                { "LaunchTemplateSpecification": { "Version": "1", "LaunchTemplateId": "lt-03c7d1f39daf039df" }, "WeightedCapacity": "96", "_ExcludeInRegions": [ "ca-central-1" ], "InstanceType": "g4ad.8xlarge" },
                { "LaunchTemplateSpecification": { "Version": "1", "LaunchTemplateId": "lt-03c7d1f39daf039df" }, "WeightedCapacity": "192", "_ExcludeInRegions": [ "ca-central-1" ], "InstanceType": "g4ad.16xlarge" }, 
                { "LaunchTemplateSpecification": { "Version": "1", "LaunchTemplateId": "lt-0a9cc6367bc170ab3" }, "WeightedCapacity": "25", "InstanceType": "g5g.xlarge" }, { "WeightedCapacity": "56", "InstanceType": "g5.xlarge" }, 
                { "WeightedCapacity": "226", "InstanceType": "g5.24xlarge" },
                { "WeightedCapacity": "452", "InstanceType": "g5.48xlarge" }, 
                { "WeightedCapacity": "25", "InstanceType": "g4dn.xlarge" }, 
                { "WeightedCapacity": "25", "InstanceType": "g4dn.2xlarge" }, 
                { "WeightedCapacity": "100", "InstanceType": "g4dn.12xlarge" }, 
                { "WeightedCapacity": "204", "InstanceType": "g4dn.metal" }, 
                { "WeightedCapacity": "93", "InstanceType": "p3.2xlarge" }, 
                { "WeightedCapacity": "372", "InstanceType": "p3.8xlarge" }, 
                { "WeightedCapacity": "744", "InstanceType": "p3.16xlarge" }, 
                { "WeightedCapacity": "692", "InstanceType": "p3dn.24xlarge" } ]

"g4ad.2xlarge" is absent in the InstanceTypesAttributes list :/

However, cloudshell returning following list for the following command:

aws ec2 describe-instance-type-offerings \
>     --filters Name=instance-type,Values=g4ad* \
>     --query "InstanceTypeOfferings[].InstanceType" \
>     --region us-east-1
[
    "g4ad.xlarge",
    "g4ad.16xlarge",
    "g4ad.4xlarge",
    "g4ad.8xlarge",
    "g4ad.2xlarge"
]

And no log for : print(f"Instance types available in this region: {' '.join(types_available)}") (at line no. 89 >instance-filter.py)

git

mludvig commented 2 years ago

The latest commit from 4 days ago adds support for g4ad.2xlarge. Oh, wait, I may have to update the "Launch stack" hot links...

mludvig commented 2 years ago

Done, try it again plz, g4ad.2xlarge should now be supported.