# Container-logs to s3

**URL:** <https://support.openanalytics.eu/t/container-logs-to-s3/2374>\
**Category:** ShinyProxy\
**Created:** [October 7, 2022, 5:54pm UTC](https://support.openanalytics.eu/t/container-logs-to-s3/2374 "2022-10-07T17:54:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Devin\_Leopold](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/devin_leopold/32/751_2.png) [@Devin\_Leopold](https://support.openanalytics.eu/u/Devin_Leopold)\
**Post date:** [October 7, 2022, 5:54pm UTC](https://support.openanalytics.eu/t/container-logs-to-s3/2374/1 "2022-10-07T17:54:37Z")

</div>

I have multiple apps running in shinyproxy on an EC2instance. I am using an IAM role to give my apps access to other AWS resources (e.g. s3, dynamodb, etc.) with no problems. However, I would like to write my container logs to a s3 bucket but can not seem to get it working. Following the shinyproxy configuration docs I have added the following to my application.yml file:

container-log-path: s3://my-bucket/shinyproxy-logs  
container-log-s3-access-key: _ **mykey** _  
container-log-s3-access-secret: _ **my\_secret** _  
container-log-s3-endpoint: [https://s3-us-east-1.amazonaws.com](https://s3-us-east-1.amazonaws.com)

For good measure I have also give access to the bucket to the host EC2 instance. But, while shinyproxy is working fine with these settings, nothing shows up in the s3 bucket. If I remove those settings and replace them with:

container-log-path: /etc/shinyproxy/container-logs

the logs do show up there. Am I missing something to get them to write to the s3 bucket?

---

<div class="post-metadata">

**Author:** ![Devin\_Leopold](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/devin_leopold/32/751_2.png) [@Devin\_Leopold](https://support.openanalytics.eu/u/Devin_Leopold)\
**Post date:** [October 17, 2022, 4:36pm UTC](https://support.openanalytics.eu/t/container-logs-to-s3/2374/2 "2022-10-17T16:36:20Z")

</div>

I just wanted to bump this question again. Has anyone on here successfully set up per-container logging to s3? The documentation on how to do it is very clear and simple, but it does not work for me.

---

<div class="post-metadata">

**Author:** ![igfaria](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/igfaria/32/908_2.png) [@igfaria](https://support.openanalytics.eu/u/igfaria)\
**Post date:** [October 19, 2023, 6:24pm UTC](https://support.openanalytics.eu/t/container-logs-to-s3/2374/3 "2023-10-19T18:24:06Z")

</div>

Here is my successful configuration:

```
proxy: # acording documentation: https://www.shinyproxy.io/documentation/configuration/#local-file-back-end
  container-log-path: s3://my-bucket/my-prefix
  container-log-s3-sse: true # !!important: S3 by default uses SSE - https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingServerSideEncryption.html
  container-log-s3-endpoint: https://s3.us-east-1.amazonaws.com #S3 endpoints to all regions is here: https://docs.aws.amazon.com/general/latest/gr/s3.html
  container-log-s3-access-key: AKIAMYAWSIAMUSERTOS3
  container-log-s3-access-secret: 1TdISc8rzjE0YPTiSSpKzTu8UiGpKL88DwByQWNU

```

👉 It seems your s3 endpoint is invalid.

The documents on AWS revealed two important pieces of information:  
1 - S3 endpoints: [https://docs.aws.amazon.com/general/latest/gr/s3.html](https://docs.aws.amazon.com/general/latest/gr/s3.html)  
2 - S3 SSE: [https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingServerSideEncryption.html](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingServerSideEncryption.html)

I hope this helps you.
