title: Issues synchronizing log files from Container to S3 bucket
body: <p>I´m having some issues trying to synchronized in my container log file. Inside the container, there is a log file that should be sync into a bucket in S3; however, I´m constantly getting issues that the log file doesn´t exist:</p>
  <p><a href="https://i.stack.imgur.com/JFGLv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JFGLv.png" alt="log error" /></a></p>
  <p>This is my basic <strong>Dockerfile</strong>:</p>
  <pre><code>FROM openjdk:11-jre-slim-buster
  COPY log.txt log.txt
  COPY ./target/AWS-Logger-0.0.1-SNAPSHOT.jar AWS-Logger-0.0.1-SNAPSHOT.jar
  EXPOSE 8080
  ENTRYPOINT [&quot;java&quot;,&quot;-jar&quot;,&quot;AWS-Logger-0.0.1-SNAPSHOT.jar&quot;]
  
  FROM amazon/aws-cli
  
  RUN aws s3 sync data.txt s3://aws-test/logs/data.txt
  </code></pre>
  <p>The log file is generated by the jar while it´s running. Also, regarding the credentials, I´m sharing them via a Docker compose.</p>
  <p>Any idea why the path is not visible? Or any better way to sync the file from the container to the S3 via Docker and Amazon CLI.</p>