Code Monkey home page Code Monkey logo

Comments (10)

ivan-khvostishkov avatar ivan-khvostishkov commented on May 23, 2024 1

@desinurch The custom bucket is under testing already. I will publish it on GitHub shortly, ETA is tomorrow.

from sagemaker-ssh-helper.

ivan-khvostishkov avatar ivan-khvostishkov commented on May 23, 2024

Hi, @desinurch . Thank you for this question. Changing the default bucket is not yet possible, but we can consider this issue as a feature request.

As for IAM role, I think it's already possible by using the native features of AWS CLI:

1/ Add a new profile to ~/.aws/config with your role as mentioned in the doc:

[default]
region = eu-west-1

[profile ssh]
region = eu-west-1
role_arn = arn:aws:iam::123456789012:role/ml-experiment-...
source_profile = default

2/ When calling the scripts, prepend the command with AWS_PROFILE env variable that is mentioned in the doc:

AWS_PROFILE=ssh python3 -m sagemaker_ssh_helper.deregister_old_instances_from_ssm

Of course, the new role that you want to use should allow the AssumeRole action for your current role and you might need to ask your AWS administrator to do that (it's not possible to switch into a random role). Read more about switching roles in the IAM doc.

Let me know if it helps with the second part of your question.

from sagemaker-ssh-helper.

desinurch avatar desinurch commented on May 23, 2024

Thank you for your answer! Sorry I think I was lacking in my description for the IAM Role, what I meant is the filtering process
in this line https://github.com/aws-samples/sagemaker-ssh-helper/blob/main/sagemaker_ssh_helper/deregister_old_instances_from_ssm.py#L64

Currently it is only filtering based on the default sagemaker role .*sagemaker.*
Would it be possible to receive an argument here to customise the filtered role?

from sagemaker-ssh-helper.

ivan-khvostishkov avatar ivan-khvostishkov commented on May 23, 2024

Hi, @desinurch . Now I got it. Thank you for the clarification.

I suggest to remove this line and filter completely. SSHOwner filter by tag should be enough.
Will it work for you?

from sagemaker-ssh-helper.

gilinachum avatar gilinachum commented on May 23, 2024

@desinurch per your request, we've removed the role tag completely.
#9

from sagemaker-ssh-helper.

desinurch avatar desinurch commented on May 23, 2024

Thanks @ivan-khvostishkov and @gilinachum now the instance deregister works like a charm!

Is there any ETA for custom bucket? otherwise i could give it a try if you're open

from sagemaker-ssh-helper.

gilinachum avatar gilinachum commented on May 23, 2024

Thanks! glad it's working for you.
You're welcome to submit a PR for a custom bucket!

from sagemaker-ssh-helper.

ivan-khvostishkov avatar ivan-khvostishkov commented on May 23, 2024

Hi, @desinurch,

Would you like to try the custom bucket feature from the main branch?
Use this command to install the dev version of library:

pip install 'git+https://github.com/aws-samples/sagemaker-ssh-helper.git'

I've added the FAQ for the feature ("How can I change the SSH authorized keys bucket and location when running sm-local-ssh-* commands?")

I plan to create a new release version shortly.

from sagemaker-ssh-helper.

desinurch avatar desinurch commented on May 23, 2024

perfect it works! thanks for the quick update

from sagemaker-ssh-helper.

ivan-khvostishkov avatar ivan-khvostishkov commented on May 23, 2024

You're welcome! The changes now are in the release v1.9.0.

from sagemaker-ssh-helper.

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.