1

I have set up a sagemaker studio , opened a terminal and cloned a project from gitlab repo, over https.

git clone https://somegilaburl/project

I dont' have access to save ssh keys, so i want to save my credentials as aws secret in secrets manager and use that from a jupyter notebook (not just terminal), to issue git pull/push commands. are there any examples of how to do this from a jupyter notebook?

haju
  • 95
  • 6

1 Answers1

1

Here's an example of achieving this through Lifecycle scripts - https://github.com/aws-samples/sagemaker-studio-lifecycle-config-examples/blob/main/scripts/set-git-credentials/on-jupyter-server-start.sh

You can run line 52-63(after importing boto3) to get the secrets on a notebook as well.

durga_sury
  • 869
  • 4
  • 6