简体   繁体   中英

Create the folder in S3 and use the path of the folder as Environment properties in AWS?

I am new to AWS, My requirement is like, I want to upload the resumes from web application to the specific folder. I am hosting the application in AWS (Elastic Beanstalk). and I have used

     System.getenv("VENDOR_HOME");

in my java code.

for that, I have created the folder in s3 named with "resume_folder", now where can I find the path of that folder? how can I set this folder path to environment properties? (I know where to set the environment properties but I don't what to give in the key and value column).

you can add your bucket's path statically like this

" https://bucketname.s3.ap-south-1.amazonaws.com/foldername/filename.txt "

so the endpoint dose not change , you can append your folder name with it and keep in constants.

you will get this endpoint in the url which you get in response or check in your s3 console.

check out this link to get more information.

you can use " https://bucketname.s3.ap-south-1.amazonaws.com/foldername/ "

as path to upload, and key will be the name in what you want to save file and value will be the file you want to upload.

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