简体   繁体   中英

How to configure AWS EBS volume to store images?

I am very new to AWS, so I would like for some guidance here.

I currently have an EC2 windows 2012 instance setup and running. It has a default OS EBS volume and I have created a new EBS volume that I would like dedicated to storing image from my application.

My application executes a function to save an image to file:

string originalPath = Path.Combine(HttpRuntime.AppDomainAppPath, "assets/snapshots/originals/" + m_FolderName + "/" + m_FileName + "." + m_FileType);
m_Bitmap.SaveImage(originalPath, m_FileType, m_FileQuality);

I guess I have a few questions.

1) I have the volume initiated, but no drive associated yet. What is the best practice on setting up a separate disk volume in Windows in EC2?

2) How do I configure this so that the web application and load the images from '/assets/snapshots/originals/'?

If this is not a good practice, please advise and let me know how this should be tackled instead.

Thanks in advance,

Rick

Ok, I think I figure it out to at least get it to work. While it may not be a best approach, here is what I did for those also looking for a tutorial. (windows instance)

Goto AWS EC2 dashboard.

  1. Create an EBS volume
  2. Attach it your EC2 instance
  3. RDP into your instance
  4. Run Disk Manager, you'll notice there is an un-initialized disk.
  5. Initialize it Assign drive letter / folder path
  6. Select a folder or create a folder within your domain folder.
  7. Assign the right permissions and you're set to go.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM