in Education by
I am writing an API for an iOS app where the user's login with the Facebook API on iOS. The server validates the user against the token Facebook issues to the iOS user and issues a temporary Session Token. From this point, the user needs to download content that is stored in S3. This content only belongs to the user and a subset of his friends. This user can add more content to S3 which can be accessed by the same bunch of people. I guess it is similar to attaching a file to a Facebook group... There are 2 ways a user can interact with S3... leave it to the server or get the server to issue a temporary S3 token (not sure of the possibilities here) and the user can hit upon the content URLs directly to S3. So the questions: Is there a way to limit a user to access only some content on S3 when a temporary token is issued? How can I do this? Assume there's... say 100,000 or more users. Is it a good idea to let the iOS device pull this content out directly? Or should let the server control all content passing (this solves the security of course)? Does this mean I have to download all content to the server before handing it down to the connected users? If you know rails... can I use paperclip and aws-sdk gems to achieve this kinda setup? Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
You can get temporary signed URL for any S3 object by calling url_for by using the aws-sdk gem: s3 = AWS::S3.new( :access_key_id => 1234, :secret_access_key => abcd ) object = s3.buckets['bucket'].objects['path/to/object'] object.url_for(:get, { :expires => 20.minutes.from_now, :secure => true }).to_s This only provides a temporary URL for only that in S3. It will expire after 20 minutes, and you can use it only for that particular object. For more information on these APIs check out this: API docs from Amazon: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html#RESTAuthenticationQueryStringAuth

Related questions

0 votes
    I have a use case where I programmatically bring up an EC2 instance, copy and executable file from S3, run it and ... using the CLI ? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I am migrating my Java,Tomcat, Mysql server to AWS EC2. I have already attached EBS volume for storing MySql ... you guide. Thanks Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I am migrating my Java,Tomcat, Mysql server to AWS EC2. I have already attached EBS volume for storing MySql ... you guide. Thanks Select the correct answer from above options...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    Any easy way to move and custom AMI image between regions? (North Virginia -> Singapore) I know you can mess up with ... way to do it? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I have my instance of the Amazon AWS running, the test page is up. I am trying to SFTP the files to ... move them, permission denied. Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    I'm trying to set up an Amazon Linux AMI(ami-f0091d91) and have a script that runs a copy command to copy ... what is going on? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    I know there are several plugins that do asynchronous processing. Which one is the best one and why? The ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
0 votes
    I have been trying to run the rake db:migrate command but it ain't working. I uninstalled and ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    Is it possible to get the ARN of an S3 bucket via the AWS command line? I have looked through the documentation ... way to do this. Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 28, 2022 in Education by JackTerrance
0 votes
    The Salesforce.com API seems to assume that you will always use the app as an active user. Their ... require user interaction? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    The Salesforce.com API seems to assume that you will always use the app as an active user. Their ... require user interaction? Select the correct answer from above options...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    Friends, I have a contact us/Inquiry form in my website. I want to generate a lead in Sales force CRM on ... any link for API. Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    I'm trying to update a record via the SalesForce API (Enterprise WSDL). The code below executes fine, and the ... updateParticipant }); if (result == null || result.Length...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I am using the aws cli to list the files in an s3 bucket using the following command (documentation): aws s3 ... only the file list? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
...