If you already know your Sama API key and project ID, you can skip this section.
How to get your API key?
- Go to the clients tab
- Look for your client
- Click on show API key
How to get your project ID?
- Go to the projects page
- Use the filters and search for the client you are working with (i.e.,BDD)
- Click on view
- Choose the BDD project
- Take the ID from the URL (i.e., app.sama.com/projects/12345)
You can use the Sama CLI to upload assets and directly create tasks if it fit your needs. Sama CLI documentation
Using the AWS CLI will give you the best performance to upload a lot of assets.
Python3 is available on the Microsoft store
Python3 is available on macOS via Homebrew:
brew install python3
On macOS, make sure to run Install Certificates.command
after the installation.
Download the sama-aws.py
Start a terminal. The configure command create a sama
AWS CLI profile and AWS CLI will fetch temporary credentials from https://app.sama.com using your API key. It will auto-renew the credentials every hour.
python3 sama-aws.py configure
Look for Assets S3 URL
in the command output, you will need it later.
Test AWS CLI sama profile.
aws --profile sama sts get-caller-identity
aws --profile sama s3 ls <Assets S3 URL as printed by the configure command>
This command upload the batch-1 folder to your S3 dedicated prefix.
aws --profile sama s3 sync ./batch-1 <Assets S3 URL>/batch-1
Install Cyberduck
Run the following command in a shell. It will create or update the sama-cyberduck
AWS profile.
python3 sama-aws.py update-credentials-file
- Add
S3 (Credentials from AWS Command Line Interface)
bookmark in Cyberduck - Set profile name as
sama-cyberduck
- Set path to
Assets S3 URL
as printed by the configure command but without thes3://
prefix.
After an hour, the temporary credentials will expire in Cyberduck. You will need to run the script again and reconnect by going back to the Cyberduck landing page.