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,140 points
85 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
• 56,520 points

Related Questions In AWS

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
• 56,520 points
1,120 views
0 votes
1 answer