How to store uploaded files in the S3 bucket when using elastic beanstalk (PHP App)

0 votes

I have setup an environment using devops concept in AWS. Following tools are used for integration and deploy;

AWS codecommit, Elastic Beanstalk (Web App- PHP), rds-mysql and also used a code pipeline, its working fine.

We have an option in the web app to upload photos to there profile (keeps on upload folder in the app root directory ) and use this photo in profile view page.

I want to store and access this uploaded photos in the S3 bucket, how can I do it? Please help us.
Oct 18, 2019 in AWS by anonymous
• 120 points

1 answer to this question.

0 votes
Hey! You can just use S3 are your application's storage. So by default, every image will be saved on that S3 bucket and then you access the S3 bucket objects to access those images.
answered Oct 18, 2019 by Kalgi
• 51,850 points
Thanks for your reply,

how to set s3 bucket as Elastic Beanstalk environment application storage?

I had deployed in following way;

First I created Codecommit repository for developers for pushing code

next created a Elastic Beanstalk PHP environment  and RDS Mysql database.

Then created a CI/CD Pipeline with source 'CodeCommit' and Deploy 'Elastic Beanstalk'

In this case where should I integrate S3 bucket as application storage, Please help us...

Yes! Create an S3 bucket and attach it to your Elastic Beanstalk application. Have a look at this:

Related Questions In AWS

0 votes
1 answer

How to download the latest file in a S3 bucket using AWS CLI?

You can use the below command $ aws ...READ MORE

answered Sep 6, 2018 in AWS by Archana
• 4,150 points
0 votes
2 answers

How to access files in S3 bucket from R?

You can take a look at the ...READ MORE

answered Aug 10, 2018 in AWS by Deepthi
• 300 points
+3 votes
5 answers

How to move files from amazon ec2 to s3 bucket using command line

Hey, 3 ways you can do this: To ...READ MORE

answered Oct 9, 2018 in AWS by Omkar
• 69,040 points
0 votes
2 answers

How to display just the name of files using aws s3 ls command?

aws s3 ls s3://<your_bucket_name>/ | awk '{print ...READ MORE

answered Mar 17, 2019 in AWS by anonymous
0 votes
1 answer

Deploy multiple platforms to Elastic Beanstalk

Solve by using .ebextentions to run pre-install commands in ...READ MORE

answered Nov 28, 2018 in AWS by Archana
• 5,600 points
+2 votes
1 answer

How to make the instance IP static in nature? - AWS

Hey @Laksha! By default, all instances have a ...READ MORE

answered Apr 11, 2019 in AWS by Kalgi
• 51,850 points
+1 vote
1 answer

How to transfer my Amazon S3 Bucket to another region

Hey @Richard, as far as I know, ...READ MORE

answered May 20, 2019 in AWS by Kalgi
• 51,850 points