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

  • SEARCH
  • Home
  • 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 8092249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:14:43+00:00 2026-06-05T20:14:43+00:00

I download an image from a url to an ec2 instance(wget), process it with

  • 0

I download an image from a url to an ec2 instance(wget), process it with imagemagick (convert -actions $savedfilename) and then save it to s3 (with a php api).

  1. Is it possible to process the image on ec2 and save it directly to s3 without writing to the s3 volume?
  2. If this is possible, does it make sense – would it be faster / cheaper?
  3. Is there anything else that can be done to improve the efficiency of the process?
  4. Is there an API to save to s3 directly from the shell?
  • 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-05T20:14:44+00:00Added an answer on June 5, 2026 at 8:14 pm

    I guess you meant “…without writing to the EBS volume” Am I right? You can pipe Wgets output directly to ImageMagicks convert, which looks like this:

    wget -O - 'http://d24w6bsrhbeh9d.cloudfront.net/photo/4498158_700b_v1.jpg' | convert - test.png
    

    Take a look at s3cmd, it will allow you to interact with S3 directly from the command line. Our example workflow will then look like this:

    wget -O - 'http://d24w6bsrhbeh9d.cloudfront.net/photo/4498158_700b_v1.jpg' | convert - test.png && s3cmd put --acl-public --guess-mime-type test.png s3://example.com/images/test.png
    

    This will give you this result, which you can filter using regex to get the public URL:

    File 'test.png' stored as s3://example.com/images/test.png (xxxx bytes)
    Public URL of the object is: http://example.com.s3.amazonaws.com/images/test.png
    

    Get URL from text:

    <?php
      $reg_exUrl = "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/";
      $cmd_output = "File 'test.png' stored as s3://example.com/images/test.png (xxxx bytes) Public URL of the object is: http://example.com.s3.amazonaws.com/images/test.png";
      if(preg_match($reg_exUrl, $cmd_output, $url)) {
        $image_url = $url[0];
      }
      else {
        // no url found …
      }
    ?>
    

    I guess that’s an elegant way of doing your process 🙂 I’m not sure if it will be any faster or cheaper … Maybe a bit because of EBS’ bad disk I/O.

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

Sidebar

Related Questions

How can I use php to download an image from URL (eg: https://www.google.com/images/srpr/logo3w.png )
I am using wget in php script to download images from the url submitted
I have to download an image from a url and then show the downloaded
I'm trying to download an image from a url. The process I wrote works
i can't download more then one image from url function processXML(e:ResultEvent):void { myXML =
I want to download image from url and store in sdcard's folder. If folder
I am trying to download an image from URL. I use the Apache Commons
I need to download an image from some URL to my server. However, my
I'm trying to download an image from a URL, and if it's a gif,
I am trying to download the image from the url http://a3.twimg.com/profile_images/414797877/05052008321_bigger.jpg I am using

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.