regions=("us-east-1" "us-east-2" "us-west-1" "us-west-2" "af-south-1" "ap-east-1" "ap-south-2" "ap-southeast-3" "ap-southeast-4" "ap-southeast-1" "ap-southeast-2" "ap-south-1" "ap-northeast-3" "ap-northeast-2" "ap-northeast-1" "ca-central-1" "eu-central-1" "eu-west-1" "eu-west-2" "eu-west-3" "eu-south-1" "eu-north-1" "eu-south-2" "eu-central-2" "me-south-1" "me-central-1" "sa-east-1")
for region in "${regions[@]}"
do
echo "$region"
AWS_PAGER="" aws lambda get-account-settings --query 'AccountLimit.ConcurrentExecutions' --profile vlad --region "$region"
done
yarn build
rm artifact.zip
zip --quiet -r artifact.zip lib
First, enable all the AWS regions here: https://console.aws.amazon.com/billing/home?#/account
cd infra
Create a local.auto.tfvars
file inside the infra
folder like this:
access_key = "xxx"
secret_key = "yyy"
And finally deploy:
export GODEBUG=asyncpreemptoff=1;
terraform init
terraform apply
Modify the target URL and number of requests in the ops-scripts/sqs-dispatch.ts
file. Then:
export AWS_ACCESS_KEY_ID=xxx
export AWS_SECRET_ACCESS_KEY=yyy
export AWS_ACC_ID=111
ts-node ops-scripts/sqs-dispatch.ts
Shows how many requests are still in flight.
export AWS_ACCESS_KEY_ID=xxx
export AWS_SECRET_ACCESS_KEY=yyy
export AWS_ACC_ID=111
ts-node ops-scripts/sqs-stats.ts
Emergency script to purge all SQS queues to stop Lambdas running.
export AWS_ACCESS_KEY_ID=xxx
export AWS_SECRET_ACCESS_KEY=yyy
export AWS_ACC_ID=111
ts-node ops-scripts/sqs-purge.ts
- Repeat steps in
Create artifact.zip
- Repeat steps in
Deploy