Giter Site home page Giter Site logo

Comments (3)

0xtavian avatar 0xtavian commented on June 7, 2024

Hey @rew1nter, so unfortunately aws does not automatically transfer the image to a region just because you requested the image in that region.

The providers that currently support round robin, region distribution and automatic image transfer currently are:
DO. We had to add code specifically since they don’t automatically transfer the image https://github.com/pry0cc/axiom/blob/master/interact/axiom-fleet

We didn’t have to add code for Linode or IBM since they transfer the image automatically

azure is in the same boat as AWS, we need to add code the same way we did for DO to transfer the image.

So for AWS, you'll need to manually transfer the image to the new region and hope you can still reference the image by name. If not, we’ll have to add code to the AWS providers function file https://github.com/pry0cc/axiom/blob/master/providers/aws-functions.sh

If you want to figure out the cli commands to transfer an axiom image to the new region, I can try to integrate it.

from axiom.

rew1nter avatar rew1nter commented on June 7, 2024

My knowledge of the cloud is very basic. So It'd be really great if you could add the code for AWS like DO. I appreciate your time and effort

from axiom.

ethicalhackingplayground avatar ethicalhackingplayground commented on June 7, 2024

I've been looking into this myself, I've programmed a function that can return the image_id based on the region you specify

get_image_id() {                                                                                                                                                                                                         
    region="$1"                                                                                                                                                                                                      
    images=$(aws ec2 describe-images --query 'Images[*]' --owners self --region $region)                                                                                                                             
    name=$(echo $images| jq -r '.[].Name' | tail -n 1)                                                                                                                                                               
    id=$(echo $image |  jq -r ".[] | select(.Name==\"$name\") | .ImageId")                                                                                                                                           
    echo $id                                                                                                                                                                                                 
} 

but it still isn't working correctly, I still get the following error:

The image id '[ami-fd9cecc7]' does not exist

I think it's because it's looking for the original image_id and when you copy the AMI to a different region the image ids are different, if the image_id was mutable then we might not have a problem but since they are immutable it's causing this problem, I'm sure there is a solution to this problem.

from axiom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.