简体   繁体   中英

Amazon AWS Amplify NestJs - host own frontend and backend

This is my first Question here. I develop a fullstack nestJS app with Angular and want to host it on aws now. After i read the manual, they just always talk about "fullstack" in combination with multiple frontends. The Backend Environment from AWS doesnt help me anything, because i wrote my own backend.

So, can someone tell me, who i can deploy frontend and backend on aws and connect them with a rds? Frontend works and i try something like that with the build file:

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - npm ci
    build:
      commands:
        - npm run build
  artifacts:
    baseDirectory: dist/apps/frontend-app
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*
backend:
  phases:
    preBuild:
      commands:
        - npm ci
    build:
      commands:
        - npm run build-backend
  artifacts:
    baseDirectory: dist/apps/api
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

Thanks and stay healthy

If you have custom applications you can deploy them classically on a virtual machine, in AWS it is, for example, an EC2 instance. You can also deploy the dockerized applications on ECS

You can connect your backend to a RDS via environment variables such as host, password, port... documented here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM