Open In Colab

install required libraries

!pip install -q --upgrade aws-sam-cli nicHelper==0.0.74 pycryptodome beartype
!apt install -qq awscli

Save Key

Only run this once, remember your password can comment it out after the first run

from nicHelper.colab import saveAwsPw
from getpass import getpass

awskey = getpass('enter your aws key').encode()
awssecret = getpass('enter your aws Secret').encode()
password = getpass('set your password').encode()
path = '/content/drive/MyDrive/.test'
saveAwsPw(awskey=awskey, awssecret=awssecret, path=path, password=password)

Set up aws with the saved key

must use the password you set earlier

from nicHelper.colab import autoSetupAws
path = '/content/drive/MyDrive/.test'

autoSetupAws(path=path,
             password = getpass('enter your password').encode(),
             region='ap-southeast-1' )
## dont worry this is not printing the full key/password
### note this this function will only work in colab

for non-colab folks

or for more customizability

from nicHelper.colab import loadAwsPw, setUpAws
from os import system
password = getpass('enter our password').encode()
path = '/content/drive/MyDrive/.test'
region = 'ap-southeast-1'

key,secret = loadAwsPw(path = path, password = password)
setupStrings = setUpAws(awsKey=key.decode(), awsSecret=secret.decode(), region = region)
print(setupStrings) ### remember to comment this out
for setupString in setupStrings:
  system(setupString)