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

448
Visualizações
How secure is using the /tmp directory in an AWS lambda?

I've been looking at implementing the aws_encryption_sdk in a lambda to deal with encrypted files that are uploaded into a s3 bucket.

I have been able to get it to work by downloading the file into the /tmp directory (giving the file a unique name), decrypting the file in the same directory and then uploading the decrypted file back into s3. I am also deleting the files in the system after the operation has completed, but before exiting the lambda

While using the file system is common use case, I have concerns around the use of the /tmp directory and its security.

Can anyone advise whether I should be concerned? How exclusive is the file system when you fire up Lambdas?

Thanks

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

0

It is somewhat safe to use /tmp in Lambda, meaning that your /tmp folder will not be shared with other AWS clients. At the same time:

  1. There is no evidence that any disk space allocated for /tmp is actually wiped. Since AWS Lambda doesn't provide low-level block access to the underlying disk, it's safe enough, but not military-grade. RAM memory is wiped:

Lambda scrubs the memory before assigning it to an execution environment, which effectively guards against memory sharing between functions that belong to the same account and different customer accounts.

So for high-security applications, you might consider keeping your decrypted content in memory.

  1. Keep in mind that /tmp is not recreated/cleared on each Lambda invocation. Quite the opposite, if your Lambda runs several times in a short period of time the invocations will run in the same context and /tmp content will be preserved. That's a feature, not a bug.

After a Lambda function is executed, AWS Lambda maintains the execution context for some time in anticipation of another Lambda function invocation.

Each execution context provides 512 MB of additional disk space in the /tmp directory. The directory content remains when the execution context is frozen, providing transient cache that can be used for multiple invocations. You can add extra code to check if the cache has the data that you stored.

If you really care about the security aspect of Lambda, I suggest you read Security Overview of AWS Lambda: An In-Depth Look at Lambda Security whitepaper.

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