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 in AWS by anonymous
• 120 points
49 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 by Kalgi
• 42,410 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,090 points
4,922 views
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
1,340 views
+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
• 67,660 points
3,932 views
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 in AWS by anonymous
4,167 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,560 points
77 views
+1 vote
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 in AWS by Kalgi
• 42,410 points
108 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 in AWS by Kalgi
• 42,410 points
125 views