Unable to write a graphlab Sframe to Amazon s3 file

User 5341 | 6/30/2016, 7:31:14 AM

while executing this line: ch.save('s3://hike-sticker-analytics/predicted_langs') ch is the name of the sframe above.

it is throwing the following error: Traceback (most recent call last): > File "language_use.py", line 129, in <module>

                	  File "/usr/local/lib/python2.7/dist-packages/graphlab/data_structures/sframe.py", line 3370, in save
                	    raise ValueError("Unsupported format: {}".format(format))
                	  File "/usr/local/lib/python2.7/dist-packages/graphlab/cython/context.py", line 49, in __exit__
                	    raise exc_type(exc_value)
                	IOError: Cannot open s3://hike-sticker-analytics/predicted_langs/dir_archive.ini for write. AWS S3 Error:HTTP/1.1 403 Forbidden
                	x-amz-request-id: 07B33099A836CAE9
                	x-amz-id-2: wtnnbldDV4qowLFG0Kmr4dOOETNr+voMzWJAWU6CxZlr1YVsmWpK9t/xswVlmwQM/1vb13ZqSR0=
                	Content-Type: application/xml
                	Transfer-Encoding: chunked
                	Date: Thu, 30 Jun 2016 07:27:58 GMT
                	Server: AmazonS3

I am able to upload a file to the same directory using aws s3 cp command


User 16 | 6/30/2016, 6:14:28 PM

It looks like you don't have permission to write to that location in S3. You either haven't set your AWS credentials or those credentials don't have permission to write to that location. You can set your AWS credentials via graphlab.aws.set_credentials

User 5341 | 7/1/2016, 12:31:22 PM

I have set the credentials using graphlab.aws.set_credentials. I have the write permission to the above directory because I am able to copy to the same directory using aws s3 cp command using same credentials.

User 16 | 7/1/2016, 6:29:35 PM

@raman - What operating system do you have? Also what version of GraphLab Create are you using?

User 5341 | 7/4/2016, 8:47:42 AM

I am running it on r3.xlarge ubuntu machine with GraphLab-Create==1.10.1 and GraphLab-Create-License==1.10.1

User 16 | 7/5/2016, 7:42:33 PM

I just tried saving an SFrame to S3 on Ubuntu, using version 1.10.1. It worked fine for me. Did you set the credentials via graphlab.aws.set_credentials?

User 4582 | 7/18/2016, 12:11:21 PM

Can you make a full tutorial for saving and loading files, SFrames and models from\to aws S3 from EC2? I use ec2, I did set credentials with graphlab.aws.set_credentials, I tried to open the s3 to the world (and I can read a csv file) but cannot save\load anything turi related.

User 16 | 7/18/2016, 6:27:37 PM

Could you post the code you are using (without the actual credentials omitted) along with the entire output?

I'm very confused why you are having issues. It's probably something simple. Perhaps you're not specify the S3 path correctly. It should be in the form: "s3://<bucket-name>/<s3-key>"

Here is some simple code: ` import graphlab as gl gl.aws.set_credentials(<your public key>, <your private key>)

mysframe = gl.SFrame({'a': range(10)}) s3path = 's3://<s3-bucket>/<s3-key>'

mysframe.save(s3path) gl.loadsframe(s3path) `