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

0 votes
Hi,

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
531 views

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,890 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: https://aws.amazon.com/premiumsupport/knowledge-center/elastic-beanstalk-s3-bucket-instance/

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
8,966 views
0 votes
1 answer

How to edit files in the AWS S3 bucket from CLI?

Hi@akhtar, According to my knowledge,  you can't edit ...READ MORE

answered Jun 8 in AWS by MD
• 41,020 points
159 views
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
177 views
+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,890 points
310 views
+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,890 points
721 views