Store aws beanstalk symfony and apache logs in cloudwatch logs

Do you have a symfony app deployed with autoscale capabilities in aws beanstalk and you don’t have a central logging server? Then you may find this post especially relevant.

When your app scale up and down your server created and destroyed dynamically. During this process you loose your logs. This logs may be extremely useful if something goes wrong in your system. Moreover it may be required by local legislation to keep a copy of it.

This will be a recipe on how to setup Cloudwatch logs as a central log storage in AWS. The example is based on a symfony app but with minor adjustments it will work for any LAMP project.

Continue reading

AWS S3 & PHP & Gaufrette

When your application is growing there are times in which you have to share your data between more than one App server. There are lots of different tools that allow you to sync or replicate data between multiple servers but nowadays it’s a better choice to save your data outside of your “app server”.

In order to achieve this, you should use a storage service. It can be an FTP or an external service with it’s own API like Amazon Web Service Simple Storage Service (better known as S3), Azure Blob Storage, Rackspace Cloud Files or any of the many other solutions available.

Continue reading