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

617
Visualizações
Terraform: how to access S3 bucket object from EC2 instance?

I have an archive that contains some binary on S3 which I need to put on EC2 during the provisioning. On the moment, I am downloading the archive to the machine(host provisioned) and upload it to the machine which I need to provision.

Or how can I get a link from aws_s3_bucket_object? or is there a way to mount s3 object as file into ec2 instance with terraform?

data "aws_s3_bucket_object" "release" {
  bucket = data.aws_s3_bucket.artifacts.id
  key    = "release.tgz"
}

resource "aws_instance" "engine" {
  ami           = data.aws_ami.server.id
  instance_type = var.aws_instance_type
  ...
}
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Sadly, you can't mount S3 objects as a filesystem to your instance, nor access them directly. They have to be downloaded first.

However, you can use third part tool which make S3 bucket appear to you and your application as a filesystem. One popular tool for that is 3fs-fuse which :

allows Linux and macOS to mount an S3 bucket via FUSE. s3fs preserves the native object format for files, allowing use of other tools like AWS CLI.

For that to work you would have to setup your user_data in your instance to do it automatically during the instance launch.

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