Accessing Object Storage in AWS
Introduction
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 and cookiecutter installed.
Creating Neuro Project
To create a new Neuro project and build an image, run:
Creating an AWS IAM User
Follow Creating an IAM User in Your AWS Account.
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 "Add user" button, 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 to the user description, then to the "Security credentials" tab, and press the "Create access key" button:
Put these credentials to the local file in the home directory ~/aws-credentials.txt
. For example:
Set appropriate permissions to the secret file:
Set up the Neuro Platform to use this file and check that your Neuro project detects it:
Open .neuro/live.yaml
, find remote_debug
section within jobs
in it and add the following lines at the end of remote_debug
:
Creating a Bucket and Granting Access
Now, create a new S3 bucket. Remember: bucket names are globally unique.
Testing
Create a file and upload it into S3 Bucket:
Change default preset to cpu-small
in .neuro/live.yaml
to avoid consuming GPU for this test:
Run a development job and connect to the job's shell:
In your job's shell, try to use s3
to access your bucket:
To close the remote terminal session, press ^D
or type exit
.
Please don't forget to terminate the job when you've done working with it:
Last updated