Skip to content

Commit 1c81d79

Browse files
committed
ci: bump cdk to v2
1 parent 586e96f commit 1c81d79

File tree

6 files changed

+7721
-3329
lines changed

6 files changed

+7721
-3329
lines changed

continous-integration/index.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import * as lambda from '@aws-cdk/aws-lambda';
2-
import { CfnLayerVersion, Code, Runtime } from '@aws-cdk/aws-lambda';
1+
import * as lambda from 'aws-cdk-lib/aws-lambda';
2+
import { CfnLayerVersion, Code, Runtime } from 'aws-cdk-lib/aws-lambda';
33
import * as path from 'path';
4-
import { App, BundlingDockerImage, Duration, Stack } from '@aws-cdk/core';
4+
import { App, DockerImage, Duration, Stack } from 'aws-cdk-lib';
55

66

77
const app = new App();
@@ -13,18 +13,19 @@ const pathToLayerSource = path.resolve(__dirname, '..');
1313
const al2Layer = new lambda.LayerVersion(stack, 'al2-layer', {
1414
code: Code.fromAsset(pathToLayerSource, {
1515
bundling: {
16-
image: BundlingDockerImage.fromAsset(pathToLayerSource, { file: '../Dockerfile.al2' }),
16+
image: DockerImage.fromBuild(pathToLayerSource, { file: 'Dockerfile.al2' }),
1717
command: ['/bin/bash', '-c', 'cp -r /opt/build-dist/. /asset-output/'],
1818
},
1919
}),
2020
description: 'AL2 Tesseract Layer',
2121
});
2222
stack.renameLogicalId(stack.getLogicalId(al2Layer.node.defaultChild as CfnLayerVersion), 'al2layer')
23+
2324
new lambda.Function(stack, 'python3.8', {
24-
code: lambda.Code.fromAsset(path.resolve(__dirname, 'lambda-handlers'),
25+
code: lambda.Code.fromAsset(path.resolve(__dirname, 'lambda-handlers/py38'),
2526
{
2627
bundling: {
27-
image: BundlingDockerImage.fromRegistry('lambci/lambda:build-python3.8'),
28+
image: DockerImage.fromRegistry('lambci/lambda:build-python3.8'),
2829
command: ['/bin/bash', '-c', [
2930
'pip install -r requirements.txt -t /asset-output/',
3031
'cp faust.png /asset-output',
File renamed without changes.
File renamed without changes.

continous-integration/lambda-handlers/requirements.txt renamed to continous-integration/lambda-handlers/py38/requirements.txt

File renamed without changes.

0 commit comments

Comments
 (0)