Skip to content

ECS service-to-service communication

Posted on:August 18, 2024ย atย 03:57 PM

image

Abstract

Table Of Contents

Open Table Of Contents

๐Ÿš€ Amazon ECS Service Connect

๐Ÿš€ AWS ECS Service Connect vs Service Discovery

๐Ÿš€ Deploying Sample Yelb Application for service connect with Amazon ECS and AWS CDK Typescript

๐Ÿš€ Walkthrough

  1. Initial setup
# Clone project sample
git clone git@github.com:vumdao/ecs-service-connect-cdk.git && cd ecs-service-connect-cdk

# Install node modules
pnpm install

# Update your AWS account in `src/lib/shared/constants.ts` at `CDK_DEFAULT_ACCOUNT` and target region in `src/lib/shared/environment.ts` at `devEnv`
sed -i 's/123456789012/234567890123/g' src/lib/shared/constants.ts
sed -i 's/region: .*,/region: "us-west-2",/g' src/lib/shared/environment.ts

# Update Hosted zone name and zone ID in `src/lib/shared/constants.ts` with yours AWS hosted zone to create domain for yelb application eg. yelb.simflexcloud.com
# export const SIMFLEXCLOUD_ZONE_NAME = 'simflexcloud.com';
# export const SIMFLEXCLOUD_ZONE_ID = 'ZZZZZZZSSSSSSAAAA';

# Get CDK stack
cdk ls

# Deploy CDK
cdk deploy EcsBlueprintsStack --require-approval never
  1. Explore created resources

๐Ÿš€ Cleaning up

๐Ÿš€ Conclusion


References