How to exclude specific folders every time I run eb deploy using AWS EB CLI

0 votes

I want to prevent specific folders from being replaced in every deployment? Consider the directory structure below:

-- /.ebextensions
-- /app
-- /database
-- /public

I'm using AWS CodeCommit and EB CLI for my PHP application and every time I run eb deploythese files & directories are being replaced, so I want to exclude the /public/images directory so that the previous images that have been uploaded would still be there after a newer version has been deployed.

I've been digging on their documentation all week, but can't find any possible solution.Is this something possible with Elastic Beanstalk? Or any alternative suggestions for deployment in AWS will be very much appreciated. Thanks in advance!

Oct 24, 2018 in AWS by findingbugs
• 3,260 points
2,125 views

1 answer to this question.

0 votes
If there is not .ebignore file it will use the .gitignore to exclude files from deployment.Create a .ebignore file and list all files and directories there.

I still do not think it will resolve the issue since the images folder will still be deleted. I would suggest that you use S3 bucket and upload/get all images from there so you wont't have issues on deployment.
answered Oct 24, 2018 by Priyaj
• 58,020 points

Related Questions In AWS

0 votes
1 answer

How do I change the Root Volume to persist at launch time using the CLI?

add the following option to your run-instances command: --block-device-mappings file://mapping.json Specify ...READ MORE

answered Oct 21, 2019 in AWS by Pearl
775 views
0 votes
1 answer
0 votes
1 answer
+1 vote
3 answers

How to get ARN for s3 Bucket using aws cli .

An ARN is a non-opaque, constructible identifier, ...READ MORE

answered Aug 16, 2018 in AWS by Priyaj
• 58,020 points
5,678 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP