Skip to content

Guo-astro/multi-tenant-hub

Repository files navigation

MultiTenantHub

Achieving Operational Success of SaaS Solutions

Cheat Commands

  • pnpx cdk init --language typescript
  • pnpm up -r --workspace
  • brew install aws/tap/aws-sam-cli
  • sam local start-lambda -t ./cdk.out/SaasProviderStack.template.json
  • sam local invoke DynamoLambdaHandlerFB6EB814 --no-event -t ./cdk.out/SaasProviderStack.template.json
  • pnpx aws-sdk-js-codemod -t v2-to-v3 infrastructures/saas_provider/src/services/index.ts
npx cdk bootstrap \
  --cloudformation-execution-policies arn\:aws\:iam::aws\:policy/AdministratorAccess \
  aws://$ACCOUNT_ID/us-east-1 \
  aws://$ACCOUNT_ID/us-east-2

020235202149

Migration

TroubleShooting

States

  • Stack update in progress will fail the infraDeployment mainly by previous deployment. -> retry button or wait for 20 mins

Steps

  1. Set up secret manager for PAT token (Feature: use conection)
  2. Delete all webhook generated from github to prevent push trigger for tenant pipeline(if you are not using connection)

Migration

  1. Cognito
  2. Dynamodb
  3. CfnWebhook

Q&A

Reason: Token authorizer is not working and therafore cannot add context to the lambda request. [ERROR] KeyError: 'authorizer' Traceback (most recent call last):   File "/var/task/aws_lambda_powertools/tracing/tracer.py", line 313, in decorate     response = lambda_handler(event, context, **kwargs)   File "/var/task/order_service.py", line 71, in get_orders     tenantId = event['requestContext']['authorizer']['tenantId']

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors