Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8170749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:13:50+00:00 2026-06-06T21:13:50+00:00

Would uploading to S3 using SQS make the process more fault tolerant? If so,

  • 0

Would uploading to S3 using SQS make the process more fault tolerant?

If so, i am having a hard time with syntax, trying to combine creating a queue then uploading to S3.
If my logic is not correct, how would i set up a system using SQS to upload to S3?

if (!class_exists('S3'))require_once('S3.php');

// *these keys are random strings
$AWS_KEY = "6VVWTU4JDAAKHYB1C3ZN";
$AWS_SECRET_KEY = "GMSCUD8C0QA1QLV9Y3RP2IAKDIZSCHRGKEJSXZ4F";

//AWS access info
if (!defined('awsAccessKey')) define('awsAccessKey', $AWS_KEY);
if (!defined('awsSecretKey')) define('awsSecretKey', $AWS_SECRET_KEY);
//instantiate the class
$s3 = new S3(awsAccessKey, awsSecretKey);

//check whether a form was submitted
if(isset($_POST['Submit'])){

    //retreive post variables
    $fileName = $_FILES['theFile']['name'];
    $fileTempName = $_FILES['theFile']['tmp_name'];

    //create a new bucket
    $s3->putBucket("mybucket", S3::ACL_PUBLIC_READ);




    //add the queue
    $sqs = new AmazonSQS(array( "key" => $AWS_KEY, "secret" => $AWS_SECRET_KEY ));
    $response = $sqs->create_queue('test-topic-queue');
    $queue_url = (string) $response->body->CreateQueueResult->QueueUrl;
    $queue_arn = 'arn:aws:sqs:us-east-1:ENCQ8gqrAcXv:test-topic-queue';

    //$queue_url . ?Action=SendMessage&MessageBody=Your%20Message%20Text?&AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE&Version=2011-10-01?&Expires=2008-02-10T12:00:00Z?&Signature=lBP67vCvGlDMBQ1do?fZxg8E8SUEXAMPLE&SignatureVersion=2&SignatureMethod=HmacSHA256


    // HOW DO I INCORPORATE SQS AND S3



    //move the file
    if ($s3->putObjectFile($fileTempName, 
                                "mybucket", 
                                "myFolder/" . $fileName, S3::ACL_PUBLIC_READ, 
                                array(), 
                                $_FILES['theFile']['type']) ) {
        //it works
    }else{
        // error
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:13:52+00:00Added an answer on June 6, 2026 at 9:13 pm

    I’m not exactly understanding the fault tolerance you are requesting. But in terms of using S3 and SQS for scaling, there is an excellent paper on the Amazon AWS website that talks about scaling up and down your infrastructure using SQS and EC2 together, which can of course include processes like uploading to S3 and using SQS to tell the application to process something. You don’t mention whether or not you’re using EC2 or if this is of interest.

    Here is the article: http://aws.amazon.com/articles/1464

    Otherwise, it sounds like your logic may be confused as SQS isn’t an in-between from server to S3, but rather more for application messaging.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am uploading an image to my Imagecollection model in using CarrierWave, and would
I am currently having issues uploading files to amazon S3 while using paperclip. It
I am currently trying to develop an image uploading website by using CodeIgniter. The
I would like to do below validations for single file uploaded using jQuery Uploadify
How would I go about uploading files to S3 from a Google Web Toolkit
Im currently uploading data to MS SQL server via SQLBulkCopy and Transactions. I would
I'm working on a CLI application that deals with uploading of files, and would
So - I've been using this method of file uploading for a bit, but
I am using tiny mce with a script I built for uploading some content
When using the core drupal 'Upload' module, I get a user-friendly way of uploading

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.