Skip to content

Commit

Permalink
adjust concurrencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Christos Gkolias committed Feb 5, 2024
1 parent 2c3fae1 commit dbc7e8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class APIPipeline extends Stack {
// Prod us-east-2
const prodUsEast2Stage = new APIStage(this, 'prod-us-east-2', {
env: { account: '830217277613', region: 'us-east-2' },
provisionedConcurrency: 150,
provisionedConcurrency: 70,
internalApiKey: internalApiKey.secretValue.toString(),
chatbotSNSArn: 'arn:aws:sns:us-east-2:644039819003:SlackChatbotTopic',
envVars: {
Expand Down
6 changes: 3 additions & 3 deletions bin/stacks/api-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export class APIStack extends cdk.Stack {
const switchLambdaAlias = new aws_lambda.Alias(this, `SwitchLiveAlias`, {
aliasName: 'live',
version: switchLambda.currentVersion,
provisionedConcurrentExecutions: provisionedConcurrency > 0 ? provisionedConcurrency : undefined,
provisionedConcurrentExecutions: 0,
});

const mockQuoteLambda = new aws_lambda_nodejs.NodejsFunction(this, 'mockQuote', {
Expand Down Expand Up @@ -326,7 +326,7 @@ export class APIStack extends cdk.Stack {
const rfqLambdaAlias = new aws_lambda.Alias(this, `RfqLiveAlias`, {
aliasName: 'live',
version: integrationRfqLambda.currentVersion,
provisionedConcurrentExecutions: provisionedConcurrency > 0 ? provisionedConcurrency : undefined,
provisionedConcurrentExecutions: 0,
});

if (provisionedConcurrency > 0) {
Expand All @@ -341,7 +341,7 @@ export class APIStack extends cdk.Stack {
quoteTarget.node.addDependency(quoteLambdaAlias);

quoteTarget.scaleToTrackMetric('QuoteProvConcTracking', {
targetValue: 0.8,
targetValue: 0.7,
predefinedMetric: aws_asg.PredefinedMetric.LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION,
});
}
Expand Down

0 comments on commit dbc7e8a

Please sign in to comment.