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

488
Visualizações
How can I import resources to serverless managed project?

I am using serverless to deploy AWS resources. And sometimes I get an error about how there is an existing resources so the deploy failed. This could be caused by another developer in the team deploy the resources which have a conflict name. I wonder how I should handle this in serverless?

I used terraform before and it supports import command which is used to import existing resource to my project. Is there anything similar in serverless? If not, what is the best practise to solve this issue? I don't want to manually delete the resources on AWS.

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

0

Serverless allows you use existing CloudFormation resources. A pre-requisite is that your colleague or at least the CloudFormation stack describes the resource you depend on as "output".

// in your colleagues serverless.yaml to export a VPC
resources:
   // ...
   Outputs:
     StackVPC:
       Description: The ID of the VPC
       Value: !Ref MyVPC
       Export:
         Name: !Sub "${AWS::StackName}-VPCID"

In your serverless.yaml you can import/reference the existing VPC. There are a few ways to import the resource into your stack.

var1: 'Fn::ImportValue': '${refSackName}-VPCID'
var2: ${cf:${refSackName}-VPCID}

For me, I mostly use Fn::ImportValue

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