This tutorial demonstrates how to access your AWS S3 from Neuro Platform. You will set up a new Neuro project, create an S3 bucket, and make it is accessible from Neuro Platform jobs.
Make sure you have Neu.ro CLI installed.
To create a new Neuro project, run:
neuro project initcd <project-slug>make setup
Briefly, in AWS Console, go to "Services" drop-down list, "IAM" (Identity and Access Management). On the left-hand panel choose "Access management" -> "Users", click the blue button "Add user", go through the wizard, and as a result you'll have a new user added:
Ensure that this user has "AmazonS3FullAccess" in the list of permissions.
Then, you'll need to create an access key for the newly created user. For that, go the user description, tab "Security credentials", press button "Create access key":
Put these credentials to the local file in your project directory
./config/aws-credentials.txt, for example:
Set appropriate permissions to the secret file:
chmod 600 ./config/aws-credentials.txt
Set up Neuro Platform to use this file and check that Neuro project detects the file:
export AWS_SECRET_FILE=aws-credentials.txtmake aws-check-auth
This command should print something like: `AWS will be authenticated via user account credentials file: '/project-path/config/aws-credentials.txt".
Now, create a new S3 bucket. Remember: bucket names are globally unique.
BUCKET_NAME="my-neuro-bucket-42"aws s3 mb s3://$BUCKET_NAME/
Create a file and upload it into S3 Bucket:
echo "Hello World" | aws s3 cp - s3://$BUCKET_NAME/hello.txt
Run a development job and connect to the job's shell:
export PRESET=cpu-small # to avoid consuming GPU for this testmake developmake connect-develop
In your job's shell, try to use's 3` to access your bucket:
aws s3 cp s3://my-neuro-bucket-42/hello.txt -
To close the remote terminal session, press
^D or type
Please don't forget to terminate your job when you don't need it anymore: