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

408
Visualizações
How to run an existing aws amplify project

I have been asked to work on an existing aws amplify reactJs project. Normally I would simply clone the project repo from either github or bitbucket, but this project is am amplify project and requires a whole set of configuration. I have several aws profiles set-up on the cli, and have access to the aws cludservices for this project, but cannot run the app locally because my aws-exports.js file does not have the required auhtentication configurations in it.

According to the amplify cli docs for an existing project, I should just be able to run amplify init --app https://bitbucket.org/brooklynva/brooklyn-ocr-poc.git. However this tried, and thankfully failed, to update the cloudformation stack on aws. It updated the aws-exports.js file but only with this:

// WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten.

const awsmobile = {
    "aws_project_region": "us-east-2"
};


export default awsmobile;

So I then found that running amplify pull --frontend with some other parameters which I put into a bash file would be the equivalent of running git pull. After running that command, still nothing was updated in the config file.

#!/bin/bash
set -e
IFS='|'

REACTCONFIG="{\
\"SourceDir\":\"src\",\
\"DistributionDir\":\"build\",\
\"BuildCommand\":\"npm run-script build\",\
\"StartCommand\":\"npm run-script start\"\
}"
FRONTEND="{\
\"frontend\":\"javascript\",\
\"framework\":\"react\",\
\"config\":$REACTCONFIG\
}"

amplify pull \
--frontend $FRONTEND \
--yes

So my question remains, how do I start an already existing aws amplify app from an existing project and generate the configuration file necessary to run the app locally without having the person who created the app, share that config file with me?

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

0

For me what worked was using the amplify init command passing appId instead of the repo url. E.g. amplify init --appId YOUR_APP_ID

over 4 years ago · Santiago Trujillo Relatório

0

You need to create or use an existing Amplify environment

Check the environments you have available

amplify env list

Similar to git, it will show the list of environments (think about this as branches on git)

Check out one of the existing environment or create a new one for you, Amplify allows you to create an environment, for example, for a specific user, i.e: dev-myuser

amplify env checkout <exising-environment>

or

amplify env add

The add command is interactive and will ask you a few questions to set up your environment

After that, you should have your aws-exports.js set

Then you push your changes

amplify push

More details about Amplify environments: https://read.acloud.guru/multiple-serverless-environments-with-aws-amplify-344759e1be08

From the official documentation: https://aws-amplify.github.io/docs/cli-toolchain/quickstart#environments-and-teams

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