ClimateMisinformation / Scrapers

Web scrapers
5 stars 1 forks source link

Doccano repo fails on deployment to aws account fails on repeat try #7

Closed ebrucucen closed 3 years ago

ebrucucen commented 3 years ago

awsdeploy.yml fails with an error "ami is not found"...

Screenshot 2020-12-16 at 19 01 26

    Type: Custom::FindAMI
    Properties:
      ServiceToken: !Sub ${GetLatestAMI.Arn}
      Owner: "099720109477"
      Name: "ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20190913"
      Architecture: "x86_64"
ricjhill commented 3 years ago

Assumption: Custom::FindAMI is some magic non-standard API call, I need to dig into this

ricjhill commented 3 years ago

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html

ricjhill commented 3 years ago
  Ubuntu16Ami:
    Type: Custom::FindAMI
    Properties:
      ServiceToken: !Sub ${GetLatestAMI.Arn}
      Owner: "099720109477"
      Name: "ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20190913"
      Architecture: "x86_64

099720109477 is AWS id for Canonical. The image used is here: https://thecloudmarket.com/search?architecture=x86_64&order=created_at+desc&page=1&platform=ubuntu&search_term=ubuntu-xenial-16.04-amd64-server-20190913&tag=ubuntu&type=machine

The Cloud formation template yaml is copied from here: https://stackoverflow.com/questions/55479945/cloudformation-always-use-latest-ami. I expect there will be a better way of provisioning this.

ricjhill commented 3 years ago

So after reading AWS docs for 1/2 day , I opened the cloudfoundation editor imported the template yaml then made the lambda function a dependency of Ubuntu16Ami and the provisioning works.

http://ec2-18-196-88-236.eu-central-1.compute.amazonaws.com

We can close this.