Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tsamaya/nlb-alb-ecs
https://github.com/tsamaya/nlb-alb-ecs
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tsamaya/nlb-alb-ecs
- Owner: tsamaya
- License: mit
- Created: 2024-02-27T10:36:45.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-02-27T13:02:17.000Z (9 months ago)
- Last Synced: 2024-05-02T04:34:35.818Z (7 months ago)
- Language: TypeScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Network Load Balancer Ingress for Application Load Balancer fronted AWS Fargate service
Fully inspired by https://containersonaws.com/pattern/nlb-ingress-alb-load-balancer-fargate-service-cdk
### Pre-prequisites
- node (via `nvm use`)
- pnpm (via `corepack enable`)
- awscli (`brew install awscli`)
- docker ?:warning: on MacOS Silicon, docker will build for an ARM and not AMD, then the service will never start properly
### AWS creds
create an AWS account obviously
configure creds, replacing the profile with your chosen profile name
```bash
aws configure --profile tsamaya
```### Get started
clone the repo
```bash
pnpm install# TODO once per account, per region: cdk bootstrap
npx cdk bootstrap aws://ACCOUNT-NUMBER-1/REGION-1 --profile tsamayanpx cdk deploy \
--all \
--require-approval never --profile tsamayaDNS_NAME=$(aws cloudformation describe-stacks --profile tsamaya --stack-name shared-resources --query "Stacks[0].Outputs[?OutputKey=='dns'].OutputValue" --output text) && echo $DNS_NAME
curl $DNS_NAME/
```### cleanup
```bash
npx cdk destroy --all -f --profile tsamaya
```