When you create a deployment, your container is generating logs. You can save these logs to an S3 Bucket of your choice, once you terminate your deployment.
To accomplish this, you will need first to link your App Version to your Endpoint Storage. You will need to go to the App Version details page, under the Container Logs Storage Management section.
Enable the switch box and select your Endpoint Storage in the select box. Be sure to hit the save button. Once you save it, you can press the "Test" button.
It will show the same box as when you test it in the setup of your Endpoint Storage.
That's it; every deployment with this App Version will now store the container logs into your S3 Bucket, if available on its location. The great majority of areas have it, so you will probably not face any issues.
The path in your S3 Bucket will look like this.
- The first part of your client email, most S3 browsers don't like "@"
- The name of your Endpoint Storage
- app / app version / container_log
- The date YYYY-MM-DD
You can create multiple Endpoint Storage with the same S3 Bucket but with a different name. That way, you could have various directories for numerous environments if you wanted.
You can also specify if you want to store your container logs with your Deployment request, even if it is not activated or set up in your App Version. Necessarily, you must have previously created a functional Endpoint Storage.
This functionality can be helpful when testing, and you don't want all of your deployments logs sent to storage. The opposite is also true. If you have enabled log storage from your App Version, you can disable it with your Deployment request.
Another convenient way to use it is when you terminate your deployment. This way, if you have the means to determine that something went wrong inside your container, you can ask to save the container logs. You can use this option with the Deployment stop and Self stop routes.
You can check our API Documentation API Documentation for more detail on the deployment and stop request parameters.