title: Best secure method to incorporate SSL .pem file for Spring Boot app within Docker container hosted in ECR?
body: <p>I am in need of some help with an assessment.</p>
  <p>I have a Java Spring Boot app that needs to connect to an AWS RDS Postgres database that enforces SSL. We have a .pem file for the purpose of connecting to the database. The Spring Boot app resides in a Bitbucket repo, and pipelines are used to build a Docker image and push it to an AWS ECR. The ECR repo is private, and I would like for it to stay that way. From here the thought process is to run a task as a service in ECS and then route to the service from a load balancer, while applying secure practices at these levels.</p>
  <p>I've seen a lot of forum comments regarding security best practices on where NOT to keep the .pem file and/or how NOT to copy it to the image. Keeping this in mind based on the steps laid out, what is the best method of ensuring the Spring Boot app can connect to the RDS database with SSL connections forced and still be secure?</p>
  <p>Any assistance would be helpful, thanks.</p>