Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

202
Visualizações
How is AWS Secrets Manager used in an Elastic Beanstalk application safe if the AWS_SECRET_KEY has to be stored in the EBS environment vars?

I have the following setup:

  • PHP Laravel application
  • AWS Elastic Beanstalk -> EC2 webserver
  • AWS Secret Manager to store the database password
  • Elastic Beanstalk environment variable to store the AWS_SECRET_KEY
  • TappNetwork/laravel-aws-secrets-manager to fetch the secrets

I used to store the database password (and other credentials) in the Beanstalk environment variables, but didn't want to store in plain text anymore.

I now store them in the AWS Secret Manager, but in order for the application to be able to fetch the secrets, the AWS_ACCESS_KEY_ID and AWS_SECRET_KEY need to be available in Laravel, so that they can be used in the communication between AWS SDK and our AWS setup.

This brings me back to square 1, because access to the access key and secret also allows access to the secret manager, if I'm not mistaken.

What am I missing here?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I now store them in the AWS Secret Manager, but in order for the application to be able to fetch the secrets,

You don't have to do this. Just like with regular EC2 instance, in EB you give permissions to SM or other AWS resources using EB instance profile.

This way your ENV is clean of any AWS keys, and AWS SDK automatically will query the profile on the instance to get the temp AWS credentials to access SM. You can also query the metadata yourself if you want to "manually" get these credentails.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda