1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Angular http client not able to call the backend API hosted in aws private subnet

Discussão em 'Angular' iniciado por kumhoe, Setembro 28, 2024 às 01:22.

  1. kumhoe

    kumhoe Guest

    I have launched two EC2 instances in a public and private subnet respectively. I also created a VPC peering between both.

    I also had successfully called the API (from EC2 in public subnet) and getting the response return by API (EC2 in the private subnet).

    [​IMG]

    However, the angular hosted on the public subnet was not able to call the API. Just wonder anyone has encountered this issue previously?

    [​IMG]

    I start the angular via ng serve --host=0.0.0.0 --port=4200

    I also added the INBOUND rule on the security group in private subnet to allowed port 4200 and 3000. But somehow the angular still cannot call the API. [​IMG]

    Continue reading...

Compartilhe esta Página