Skip to content

Commit

Permalink
Merge pull request #280 from balancer/lambda-runtime-update
Browse files Browse the repository at this point in the history
update to node18
  • Loading branch information
gmbronco authored Jun 7, 2024
2 parents 9f3a12a + 6464645 commit baa6e88
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,25 +252,20 @@ export class BalancerPoolsAPI extends Stack {
*/

const nodeJsFunctionProps: NodejsFunctionProps = {
bundling: {
externalModules: ['aws-sdk'],
},
environment: {
INFURA_PROJECT_ID: INFURA_PROJECT_ID || '',
SUBGRAPH_API_KEY: SUBGRAPH_API_KEY || '',
ALCHEMY_KEY: ALCHEMY_KEY || '',
SENTRY_DSN: SENTRY_DSN || '',
DEBUG: DEBUG || '',
},
runtime: Runtime.NODEJS_16_X,
runtime: Runtime.NODEJS_18_X,
timeout: Duration.seconds(15),
};

const getPoolLambda = new NodejsFunction(this, 'getPoolFunction', {
entry: join(__dirname, 'src', 'lambdas', 'get-pool.ts'),
...nodeJsFunctionProps,
runtime: Runtime.NODEJS_18_X,
bundling: undefined,
});
const getPoolsLambda = new NodejsFunction(this, 'getPoolsFunction', {
entry: join(__dirname, 'src', 'lambdas', 'get-pools.ts'),
Expand Down Expand Up @@ -352,7 +347,7 @@ export class BalancerPoolsAPI extends Stack {
TENDERLY_PROJECT: TENDERLY_PROJECT || '',
TENDERLY_ACCESS_KEY: TENDERLY_ACCESS_KEY || '',
},
runtime: Runtime.NODEJS_16_X,
runtime: Runtime.NODEJS_18_X,
timeout: Duration.seconds(15),
}
);
Expand All @@ -367,7 +362,7 @@ export class BalancerPoolsAPI extends Stack {
TENDERLY_PROJECT: TENDERLY_PROJECT || '',
TENDERLY_ACCESS_KEY: TENDERLY_ACCESS_KEY || '',
},
runtime: Runtime.NODEJS_16_X,
runtime: Runtime.NODEJS_18_X,
timeout: Duration.seconds(15),
}
);
Expand All @@ -378,7 +373,7 @@ export class BalancerPoolsAPI extends Stack {
HYPERNATIVE_EMAIL: HYPERNATIVE_EMAIL || '',
HYPERNATIVE_PASSWORD: HYPERNATIVE_PASSWORD || '',
},
runtime: Runtime.NODEJS_16_X,
runtime: Runtime.NODEJS_18_X,
timeout: Duration.seconds(15),
});

Expand Down

0 comments on commit baa6e88

Please sign in to comment.