From a8a368601371bdc3aaf2e24c7f978b8b4b2110d6 Mon Sep 17 00:00:00 2001 From: "Pavan Sai Vasireddy (Vasi)" Date: Thu, 17 Aug 2023 22:40:37 -0700 Subject: [PATCH 1/9] Update Constants for the ADOT LAMBDA LAYER --- .../aws-cdk-lib/aws-lambda/lib/adot-layers.ts | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/packages/aws-cdk-lib/aws-lambda/lib/adot-layers.ts b/packages/aws-cdk-lib/aws-lambda/lib/adot-layers.ts index 4587d21117c93..3fa3036113597 100644 --- a/packages/aws-cdk-lib/aws-lambda/lib/adot-layers.ts +++ b/packages/aws-cdk-lib/aws-lambda/lib/adot-layers.ts @@ -220,6 +220,11 @@ export class AdotLambdaLayerJavaSdkVersion extends AdotLambdaLayerVersion { */ public static readonly V1_19_0 = new AdotLambdaLayerJavaSdkVersion('1.19.0'); + /** + * Version 1.28.1 + */ + public static readonly V1_28_1 = new AdotLambdaLayerJavaSdkVersion('1.28.1'); + private constructor(protected readonly layerVersion: string) { super(AdotLambdaLayerType.JAVA_SDK, layerVersion); } @@ -240,6 +245,11 @@ export class AdotLambdaLayerJavaAutoInstrumentationVersion extends AdotLambdaLay */ public static readonly V1_19_2 = new AdotLambdaLayerJavaAutoInstrumentationVersion('1.19.2'); + /** + * Version 1.28.1 + */ + public static readonly V1_28_1 = new AdotLambdaLayerJavaAutoInstrumentationVersion('1.28.1'); + private constructor(protected readonly layerVersion: string) { super(AdotLambdaLayerType.JAVA_AUTO_INSTRUMENTATION, layerVersion); } @@ -255,6 +265,11 @@ export class AdotLambdaLayerPythonSdkVersion extends AdotLambdaLayerVersion { */ public static readonly LATEST = new AdotLambdaLayerPythonSdkVersion('1.18.0'); + /** + * Version 1.19.0 + */ + public static readonly V1_19_0_1 = new AdotLambdaLayerPythonSdkVersion('1.19.0-1'); + /** * Version 1.18.0 */ @@ -305,6 +320,11 @@ export class AdotLambdaLayerJavaScriptSdkVersion extends AdotLambdaLayerVersion */ public static readonly V1_7_0 = new AdotLambdaLayerJavaScriptSdkVersion('1.7.0'); + /** + * Version 1.15.0 + */ + public static readonly V1_15_0_1 = new AdotLambdaLayerJavaScriptSdkVersion('1.15.0-1'); + private constructor(protected readonly layerVersion: string) { super(AdotLambdaLayerType.JAVASCRIPT_SDK, layerVersion); } @@ -325,6 +345,11 @@ export class AdotLambdaLayerGenericVersion extends AdotLambdaLayerVersion { */ public static readonly V0_62_1 = new AdotLambdaLayerGenericVersion('0.62.1'); + /** + * Version 0.82.0 + */ + public static readonly V0_82_0 = new AdotLambdaLayerGenericVersion('0.82.0'); + private constructor(protected readonly layerVersion: string) { super(AdotLambdaLayerType.GENERIC, layerVersion); } From 9097d7889ba2ae6f220071e3810fe2416644b949 Mon Sep 17 00:00:00 2001 From: "Pavan Sai Vasireddy (Vasi)" Date: Fri, 18 Aug 2023 07:15:55 -0700 Subject: [PATCH 2/9] Fix lint --- packages/aws-cdk-lib/aws-lambda/lib/adot-layers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-lambda/lib/adot-layers.ts b/packages/aws-cdk-lib/aws-lambda/lib/adot-layers.ts index 3fa3036113597..b326f94f1b3b0 100644 --- a/packages/aws-cdk-lib/aws-lambda/lib/adot-layers.ts +++ b/packages/aws-cdk-lib/aws-lambda/lib/adot-layers.ts @@ -245,7 +245,7 @@ export class AdotLambdaLayerJavaAutoInstrumentationVersion extends AdotLambdaLay */ public static readonly V1_19_2 = new AdotLambdaLayerJavaAutoInstrumentationVersion('1.19.2'); - /** + /** * Version 1.28.1 */ public static readonly V1_28_1 = new AdotLambdaLayerJavaAutoInstrumentationVersion('1.28.1'); From 086330854e3a97c58a0dba0769672eaf92c95d04 Mon Sep 17 00:00:00 2001 From: "Pavan Sai Vasireddy (Vasi)" Date: Mon, 21 Aug 2023 08:19:35 -0700 Subject: [PATCH 3/9] Update latest --- .../aws-cdk-lib/aws-lambda/lib/adot-layers.ts | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/aws-cdk-lib/aws-lambda/lib/adot-layers.ts b/packages/aws-cdk-lib/aws-lambda/lib/adot-layers.ts index b326f94f1b3b0..2a8957fbc2b60 100644 --- a/packages/aws-cdk-lib/aws-lambda/lib/adot-layers.ts +++ b/packages/aws-cdk-lib/aws-lambda/lib/adot-layers.ts @@ -213,17 +213,17 @@ export class AdotLambdaLayerJavaSdkVersion extends AdotLambdaLayerVersion { * The latest layer version available in this CDK version. New versions could * introduce incompatible changes. Make sure to test them before deploying to production. */ - public static readonly LATEST = new AdotLambdaLayerJavaSdkVersion('1.19.0'); + public static readonly LATEST = new AdotLambdaLayerJavaSdkVersion('1.28.1'); /** - * Version 1.19.0 + * Version 1.28.1 */ - public static readonly V1_19_0 = new AdotLambdaLayerJavaSdkVersion('1.19.0'); + public static readonly V1_28_1 = new AdotLambdaLayerJavaSdkVersion('1.28.1'); /** - * Version 1.28.1 + * Version 1.19.0 */ - public static readonly V1_28_1 = new AdotLambdaLayerJavaSdkVersion('1.28.1'); + public static readonly V1_19_0 = new AdotLambdaLayerJavaSdkVersion('1.19.0'); private constructor(protected readonly layerVersion: string) { super(AdotLambdaLayerType.JAVA_SDK, layerVersion); @@ -238,17 +238,17 @@ export class AdotLambdaLayerJavaAutoInstrumentationVersion extends AdotLambdaLay * The latest layer version available in this CDK version. New versions could * introduce incompatible changes. Make sure to test them before deploying to production. */ - public static readonly LATEST = new AdotLambdaLayerJavaAutoInstrumentationVersion('1.19.2'); + public static readonly LATEST = new AdotLambdaLayerJavaAutoInstrumentationVersion('1.28.1'); /** - * Version 1.19.2 + * Version 1.28.1 */ - public static readonly V1_19_2 = new AdotLambdaLayerJavaAutoInstrumentationVersion('1.19.2'); + public static readonly V1_28_1 = new AdotLambdaLayerJavaAutoInstrumentationVersion('1.28.1'); /** - * Version 1.28.1 + * Version 1.19.2 */ - public static readonly V1_28_1 = new AdotLambdaLayerJavaAutoInstrumentationVersion('1.28.1'); + public static readonly V1_19_2 = new AdotLambdaLayerJavaAutoInstrumentationVersion('1.19.2'); private constructor(protected readonly layerVersion: string) { super(AdotLambdaLayerType.JAVA_AUTO_INSTRUMENTATION, layerVersion); @@ -263,7 +263,7 @@ export class AdotLambdaLayerPythonSdkVersion extends AdotLambdaLayerVersion { * The latest layer version available in this CDK version. New versions could * introduce incompatible changes. Make sure to test them before deploying to production. */ - public static readonly LATEST = new AdotLambdaLayerPythonSdkVersion('1.18.0'); + public static readonly LATEST = new AdotLambdaLayerPythonSdkVersion('1.19.0-1'); /** * Version 1.19.0 @@ -313,17 +313,17 @@ export class AdotLambdaLayerJavaScriptSdkVersion extends AdotLambdaLayerVersion * The latest layer version available in this CDK version. New versions could * introduce incompatible changes. Make sure to test them before deploying to production. */ - public static readonly LATEST = new AdotLambdaLayerJavaScriptSdkVersion('1.7.0'); + public static readonly LATEST = new AdotLambdaLayerJavaScriptSdkVersion('1.15.0-1'); /** - * Version 1.7.0 + * Version 1.15.0 */ - public static readonly V1_7_0 = new AdotLambdaLayerJavaScriptSdkVersion('1.7.0'); + public static readonly V1_15_0_1 = new AdotLambdaLayerJavaScriptSdkVersion('1.15.0-1'); /** - * Version 1.15.0 + * Version 1.7.0 */ - public static readonly V1_15_0_1 = new AdotLambdaLayerJavaScriptSdkVersion('1.15.0-1'); + public static readonly V1_7_0 = new AdotLambdaLayerJavaScriptSdkVersion('1.7.0'); private constructor(protected readonly layerVersion: string) { super(AdotLambdaLayerType.JAVASCRIPT_SDK, layerVersion); @@ -338,17 +338,17 @@ export class AdotLambdaLayerGenericVersion extends AdotLambdaLayerVersion { * The latest layer version available in this CDK version. New versions could * introduce incompatible changes. Make sure to test them before deploying to production. */ - public static readonly LATEST = new AdotLambdaLayerGenericVersion('0.62.1'); + public static readonly LATEST = new AdotLambdaLayerGenericVersion('0.82.0'); /** - * Version 0.62.1 + * Version 0.82.0 */ - public static readonly V0_62_1 = new AdotLambdaLayerGenericVersion('0.62.1'); + public static readonly V0_82_0 = new AdotLambdaLayerGenericVersion('0.82.0'); /** - * Version 0.82.0 + * Version 0.62.1 */ - public static readonly V0_82_0 = new AdotLambdaLayerGenericVersion('0.82.0'); + public static readonly V0_62_1 = new AdotLambdaLayerGenericVersion('0.62.1'); private constructor(protected readonly layerVersion: string) { super(AdotLambdaLayerType.GENERIC, layerVersion); From 282d218bc9317a3ff92cac25bce7c42100c5061b Mon Sep 17 00:00:00 2001 From: "Pavan Sai Vasireddy (Vasi)" Date: Mon, 21 Aug 2023 09:08:04 -0700 Subject: [PATCH 4/9] Update Tests --- packages/aws-cdk-lib/aws-lambda/test/adot.test.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/aws-cdk-lib/aws-lambda/test/adot.test.ts b/packages/aws-cdk-lib/aws-lambda/test/adot.test.ts index 1cf54eaa83856..1a340ab093199 100644 --- a/packages/aws-cdk-lib/aws-lambda/test/adot.test.ts +++ b/packages/aws-cdk-lib/aws-lambda/test/adot.test.ts @@ -21,10 +21,10 @@ describe('ADOT Lambda Layer', () => { }); test('is added properly when the region information is available at synthesis time', () => { - const layerArn = lambda.AdotLambdaLayerJavaSdkVersion.V1_19_0.layerArn(fn.stack, fn.architecture); + const layerArn = lambda.AdotLambdaLayerJavaSdkVersion.V1_28_1.layerArn(fn.stack, fn.architecture); expect(layerArn).toEqual( - 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-19-0:1', + 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-28-1:1', ); }); @@ -32,7 +32,7 @@ describe('ADOT Lambda Layer', () => { const layerArn = lambda.AdotLambdaLayerJavaSdkVersion.LATEST.layerArn(fn.stack, fn.architecture); expect(layerArn).toEqual( - 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-19-0:1', + 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-28-1:1', ); }); }); @@ -53,10 +53,10 @@ describe('ADOT Lambda Layer', () => { }); test('is added properly when the region information is available at synthesis time', () => { - const layerArn = lambda.AdotLambdaLayerPythonSdkVersion.V1_18_0.layerArn(fn.stack, fn.architecture); + const layerArn = lambda.AdotLambdaLayerPythonSdkVersion.V1_19_0_1.layerArn(fn.stack, fn.architecture); expect(layerArn).toEqual( - 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-18-0:2', + 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-19-0:2', ); }); @@ -64,7 +64,7 @@ describe('ADOT Lambda Layer', () => { const layerArn = lambda.AdotLambdaLayerPythonSdkVersion.LATEST.layerArn(fn.stack, fn.architecture); expect(layerArn).toEqual( - 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-18-0:2', + 'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-19-0:2', ); }); }); @@ -112,7 +112,7 @@ describe('ADOT Lambda Layer', () => { { Ref: 'AWS::Region', }, - 'JAVAxSDKx1x19x0xarm64', + 'JAVAxSDKx1x28x1xarm64', ], }, }); From 8c59b3d428ffbc4775a3d469f145de84a00cb113 Mon Sep 17 00:00:00 2001 From: "Pavan Sai Vasireddy (Vasi)" Date: Mon, 21 Aug 2023 15:20:16 -0700 Subject: [PATCH 5/9] Update functions --- .../aws-cdk-lib/aws-lambda/test/function.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/aws-cdk-lib/aws-lambda/test/function.test.ts b/packages/aws-cdk-lib/aws-lambda/test/function.test.ts index 167b9fc5e3dd5..c3ee0e9a4e6a2 100644 --- a/packages/aws-cdk-lib/aws-lambda/test/function.test.ts +++ b/packages/aws-cdk-lib/aws-lambda/test/function.test.ts @@ -3061,14 +3061,14 @@ describe('function', () => { handler: 'index.handler', runtime: lambda.Runtime.NODEJS_14_X, adotInstrumentation: { - layerVersion: lambda.AdotLayerVersion.fromJavaSdkLayerVersion(AdotLambdaLayerJavaSdkVersion.V1_19_0), + layerVersion: lambda.AdotLayerVersion.fromJavaSdkLayerVersion(AdotLambdaLayerJavaSdkVersion.V1_28_1), execWrapper: lambda.AdotLambdaExecWrapper.REGULAR_HANDLER, }, }); // THEN Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', { - Layers: ['arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-19-0:1'], + Layers: ['arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-28-1:1'], Environment: { Variables: { AWS_LAMBDA_EXEC_WRAPPER: '/opt/otel-handler', @@ -3090,14 +3090,14 @@ describe('function', () => { handler: 'index.handler', runtime: lambda.Runtime.PYTHON_3_9, adotInstrumentation: { - layerVersion: lambda.AdotLayerVersion.fromPythonSdkLayerVersion(lambda.AdotLambdaLayerPythonSdkVersion.V1_13_0), + layerVersion: lambda.AdotLayerVersion.fromPythonSdkLayerVersion(lambda.AdotLambdaLayerPythonSdkVersion.V1_19_0_1), execWrapper: lambda.AdotLambdaExecWrapper.INSTRUMENT_HANDLER, }, }); // THEN Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', { - Layers: ['arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-13-0:1'], + Layers: ['arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-19-0:2'], Environment: { Variables: { AWS_LAMBDA_EXEC_WRAPPER: '/opt/otel-instrument', @@ -3114,7 +3114,7 @@ describe('function', () => { handler: 'index.handler', runtime: lambda.Runtime.PYTHON_3_10, adotInstrumentation: { - layerVersion: lambda.AdotLayerVersion.fromPythonSdkLayerVersion(lambda.AdotLambdaLayerPythonSdkVersion.V1_13_0), + layerVersion: lambda.AdotLayerVersion.fromPythonSdkLayerVersion(lambda.AdotLambdaLayerPythonSdkVersion.V1_19_0_1), execWrapper: lambda.AdotLambdaExecWrapper.REGULAR_HANDLER, }, })).toThrow(/Python Adot Lambda layer requires AdotLambdaExecWrapper.INSTRUMENT_HANDLER/); @@ -3133,7 +3133,7 @@ describe('function', () => { new lambda.DockerImageFunction(stack, 'MyLambda', { code: lambda.DockerImageCode.fromImageAsset(dockerLambdaHandlerPath), adotInstrumentation: { - layerVersion: lambda.AdotLayerVersion.fromJavaSdkLayerVersion(AdotLambdaLayerJavaSdkVersion.V1_19_0), + layerVersion: lambda.AdotLayerVersion.fromJavaSdkLayerVersion(AdotLambdaLayerJavaSdkVersion.V1_28_1), execWrapper: lambda.AdotLambdaExecWrapper.REGULAR_HANDLER, }, }), From 9a28b5b762096bb9a5c4b427223059d6abaa9655 Mon Sep 17 00:00:00 2001 From: "Pavan Sai Vasireddy (Vasi)" Date: Tue, 22 Aug 2023 10:31:29 -0700 Subject: [PATCH 6/9] Update integ tests --- .../test/aws-lambda/test/integ.lambda-adot.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.ts index 07c6e6f1e74f2..717ffb123f421 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.ts @@ -32,7 +32,7 @@ class StackUnderTest extends Stack { code: Code.fromInline(`exports.handler = ${handler.toString()}`), architecture: props.architecture, adotInstrumentation: { - layerVersion: AdotLayerVersion.fromJavaScriptSdkLayerVersion(AdotLambdaLayerJavaScriptSdkVersion.LATEST), + layerVersion: AdotLayerVersion.fromJavaScriptSdkLayerVersion(AdotLambdaLayerJavaScriptSdkVersion.V1_15_0_1), execWrapper: AdotLambdaExecWrapper.REGULAR_HANDLER, }, }); @@ -42,7 +42,7 @@ class StackUnderTest extends Stack { handler: 'index.handler', code: Code.fromInline('def handler(event, context): pass'), adotInstrumentation: { - layerVersion: AdotLayerVersion.fromPythonSdkLayerVersion(AdotLambdaLayerPythonSdkVersion.LATEST), + layerVersion: AdotLayerVersion.fromPythonSdkLayerVersion(AdotLambdaLayerPythonSdkVersion.V1_19_0_1), execWrapper: AdotLambdaExecWrapper.INSTRUMENT_HANDLER, }, }); @@ -52,7 +52,7 @@ class StackUnderTest extends Stack { handler: 'index.handler', code: Code.fromInline('def handler(event, context): pass'), adotInstrumentation: { - layerVersion: AdotLayerVersion.fromJavaSdkLayerVersion(AdotLambdaLayerJavaSdkVersion.LATEST), + layerVersion: AdotLayerVersion.fromJavaSdkLayerVersion(AdotLambdaLayerJavaSdkVersion.V1_28_1), execWrapper: AdotLambdaExecWrapper.INSTRUMENT_HANDLER, }, }); @@ -62,7 +62,7 @@ class StackUnderTest extends Stack { handler: 'index.handler', code: Code.fromInline('def handler(event, context): pass'), adotInstrumentation: { - layerVersion: AdotLayerVersion.fromJavaAutoInstrumentationLayerVersion(AdotLambdaLayerJavaAutoInstrumentationVersion.LATEST), + layerVersion: AdotLayerVersion.fromJavaAutoInstrumentationLayerVersion(AdotLambdaLayerJavaAutoInstrumentationVersion.V1_28_1), execWrapper: AdotLambdaExecWrapper.INSTRUMENT_HANDLER, }, }); @@ -72,7 +72,7 @@ class StackUnderTest extends Stack { handler: 'index.handler', code: Code.fromInline('def handler(event, context): pass'), adotInstrumentation: { - layerVersion: AdotLayerVersion.fromGenericLayerVersion(AdotLambdaLayerGenericVersion.LATEST), + layerVersion: AdotLayerVersion.fromGenericLayerVersion(AdotLambdaLayerGenericVersion.V0_82_0), execWrapper: AdotLambdaExecWrapper.INSTRUMENT_HANDLER, }, }); From fa8f988aaf15b2a212346b2cb4bf4cc44bc588e9 Mon Sep 17 00:00:00 2001 From: "Pavan Sai Vasireddy (Vasi)" Date: Wed, 23 Aug 2023 11:07:02 -0700 Subject: [PATCH 7/9] Update snapshots --- ...efaultTestDeployAssertE3E7D2A4.assets.json | 2 +- .../Stack1.assets.json | 6 +- .../Stack1.template.json | 141 +++++--------- .../Stack2.assets.json | 6 +- .../Stack2.template.json | 76 ++++---- .../integ.lambda-adot.js.snapshot/cdk.out | 2 +- .../integ.lambda-adot.js.snapshot/integ.json | 2 +- .../manifest.json | 12 +- .../integ.lambda-adot.js.snapshot/tree.json | 177 +++++++++--------- 9 files changed, 182 insertions(+), 242 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json index 1e34ca625f5ac..d48f521ed445d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "33.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack1.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack1.assets.json index c02b32ab9a840..f245f57c4b8fc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack1.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack1.assets.json @@ -1,7 +1,7 @@ { - "version": "32.0.0", + "version": "33.0.0", "files": { - "1e011d502b5efbd34b58f00a70ccf34fb812c6af28ee32ffe796b007503169f1": { + "0a057723ee23dd83fb3c1e47ef1ceee53b1aeb809908b5e428c6081b212a6ada": { "source": { "path": "Stack1.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "1e011d502b5efbd34b58f00a70ccf34fb812c6af28ee32ffe796b007503169f1.json", + "objectKey": "0a057723ee23dd83fb3c1e47ef1ceee53b1aeb809908b5e428c6081b212a6ada.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack1.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack1.template.json index e4cdf818a89a7..1ab0e04b8a60f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack1.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack1.template.json @@ -58,18 +58,12 @@ "MyFunc11BE70A62": { "Type": "AWS::Lambda::Function", "Properties": { - "Code": { - "ZipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" - }, - "Role": { - "Fn::GetAtt": [ - "MyFunc1ServiceRoleF96C5B5C", - "Arn" - ] - }, "Architectures": [ "arm64" ], + "Code": { + "ZipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" + }, "Environment": { "Variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-handler" @@ -78,15 +72,24 @@ "Handler": "index.handler", "Layers": [ { - "Fn::FindInMap": [ - "AdotlambdalayerMap", - { - "Ref": "AWS::Region" - }, - "JAVASCRIPTxSDKx1x7x0xarm64" + "Fn::Join": [ + "", + [ + "arn:aws:lambda:", + { + "Ref": "AWS::Region" + }, + ":901920570463:layer:aws-otel-nodejs-arm64-ver-1-15-0:2" + ] ] } ], + "Role": { + "Fn::GetAtt": [ + "MyFunc1ServiceRoleF96C5B5C", + "Arn" + ] + }, "Runtime": "nodejs14.x", "TracingConfig": { "Mode": "Active" @@ -158,12 +161,6 @@ "Code": { "ZipFile": "def handler(event, context): pass" }, - "Role": { - "Fn::GetAtt": [ - "MyFunc2ServiceRole68E50443", - "Arn" - ] - }, "Environment": { "Variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -179,11 +176,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-python-amd64-ver-1-18-0:2" + ":901920570463:layer:aws-otel-python-amd64-ver-1-19-0:2" ] ] } ], + "Role": { + "Fn::GetAtt": [ + "MyFunc2ServiceRole68E50443", + "Arn" + ] + }, "Runtime": "python3.9", "TracingConfig": { "Mode": "Active" @@ -255,12 +258,6 @@ "Code": { "ZipFile": "def handler(event, context): pass" }, - "Role": { - "Fn::GetAtt": [ - "MyFunc3ServiceRoleA69795ED", - "Arn" - ] - }, "Environment": { "Variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -276,11 +273,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-19-0:1" + ":901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-28-1:1" ] ] } ], + "Role": { + "Fn::GetAtt": [ + "MyFunc3ServiceRoleA69795ED", + "Arn" + ] + }, "Runtime": "python3.9", "TracingConfig": { "Mode": "Active" @@ -352,12 +355,6 @@ "Code": { "ZipFile": "def handler(event, context): pass" }, - "Role": { - "Fn::GetAtt": [ - "MyFunc4ServiceRole93C4DEFF", - "Arn" - ] - }, "Environment": { "Variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -373,11 +370,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-java-agent-amd64-ver-1-19-2:1" + ":901920570463:layer:aws-otel-java-agent-amd64-ver-1-28-1:1" ] ] } ], + "Role": { + "Fn::GetAtt": [ + "MyFunc4ServiceRole93C4DEFF", + "Arn" + ] + }, "Runtime": "python3.9", "TracingConfig": { "Mode": "Active" @@ -449,12 +452,6 @@ "Code": { "ZipFile": "def handler(event, context): pass" }, - "Role": { - "Fn::GetAtt": [ - "MyFunc5ServiceRoleFE4CE92B", - "Arn" - ] - }, "Environment": { "Variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -470,11 +467,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-collector-amd64-ver-0-62-1:1" + ":901920570463:layer:aws-otel-collector-amd64-ver-0-82-0:1" ] ] } ], + "Role": { + "Fn::GetAtt": [ + "MyFunc5ServiceRoleFE4CE92B", + "Arn" + ] + }, "Runtime": "python3.9", "TracingConfig": { "Mode": "Active" @@ -486,58 +489,6 @@ ] } }, - "Mappings": { - "AdotlambdalayerMap": { - "ap-northeast-1": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:ap-northeast-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:2" - }, - "ap-northeast-2": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:ap-northeast-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:1" - }, - "ap-south-1": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:ap-south-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:2" - }, - "ap-southeast-1": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:ap-southeast-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:2" - }, - "ap-southeast-2": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:ap-southeast-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:2" - }, - "ca-central-1": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:ca-central-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:1" - }, - "eu-central-1": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:eu-central-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:2" - }, - "eu-north-1": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:eu-north-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:1" - }, - "eu-west-1": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:2" - }, - "eu-west-2": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:eu-west-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:2" - }, - "eu-west-3": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:eu-west-3:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:1" - }, - "sa-east-1": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:sa-east-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:1" - }, - "us-east-1": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:2" - }, - "us-east-2": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:us-east-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:2" - }, - "us-west-1": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:us-west-1:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:1" - }, - "us-west-2": { - "JAVASCRIPTxSDKx1x7x0xarm64": "arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-nodejs-arm64-ver-1-7-0:2" - } - } - }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack2.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack2.assets.json index 359267ab7abf7..15522d1f2a230 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack2.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack2.assets.json @@ -1,7 +1,7 @@ { - "version": "32.0.0", + "version": "33.0.0", "files": { - "45de98e0bad004888e2b3a349cf7b69b966cff9ba6effb99b03e462c69adae21": { + "5f65e129af8492d163c28dcb80d294d6b4b93120afa30f095a40a2a5ea5f6296": { "source": { "path": "Stack2.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "45de98e0bad004888e2b3a349cf7b69b966cff9ba6effb99b03e462c69adae21.json", + "objectKey": "5f65e129af8492d163c28dcb80d294d6b4b93120afa30f095a40a2a5ea5f6296.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack2.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack2.template.json index a2f2184183646..9a9a84e013628 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack2.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack2.template.json @@ -58,18 +58,12 @@ "MyFunc11BE70A62": { "Type": "AWS::Lambda::Function", "Properties": { - "Code": { - "ZipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" - }, - "Role": { - "Fn::GetAtt": [ - "MyFunc1ServiceRoleF96C5B5C", - "Arn" - ] - }, "Architectures": [ "x86_64" ], + "Code": { + "ZipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" + }, "Environment": { "Variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-handler" @@ -85,11 +79,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-nodejs-amd64-ver-1-7-0:2" + ":901920570463:layer:aws-otel-nodejs-amd64-ver-1-15-0:2" ] ] } ], + "Role": { + "Fn::GetAtt": [ + "MyFunc1ServiceRoleF96C5B5C", + "Arn" + ] + }, "Runtime": "nodejs14.x", "TracingConfig": { "Mode": "Active" @@ -161,12 +161,6 @@ "Code": { "ZipFile": "def handler(event, context): pass" }, - "Role": { - "Fn::GetAtt": [ - "MyFunc2ServiceRole68E50443", - "Arn" - ] - }, "Environment": { "Variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -182,11 +176,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-python-amd64-ver-1-18-0:2" + ":901920570463:layer:aws-otel-python-amd64-ver-1-19-0:2" ] ] } ], + "Role": { + "Fn::GetAtt": [ + "MyFunc2ServiceRole68E50443", + "Arn" + ] + }, "Runtime": "python3.9", "TracingConfig": { "Mode": "Active" @@ -258,12 +258,6 @@ "Code": { "ZipFile": "def handler(event, context): pass" }, - "Role": { - "Fn::GetAtt": [ - "MyFunc3ServiceRoleA69795ED", - "Arn" - ] - }, "Environment": { "Variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -279,11 +273,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-19-0:1" + ":901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-28-1:1" ] ] } ], + "Role": { + "Fn::GetAtt": [ + "MyFunc3ServiceRoleA69795ED", + "Arn" + ] + }, "Runtime": "python3.9", "TracingConfig": { "Mode": "Active" @@ -355,12 +355,6 @@ "Code": { "ZipFile": "def handler(event, context): pass" }, - "Role": { - "Fn::GetAtt": [ - "MyFunc4ServiceRole93C4DEFF", - "Arn" - ] - }, "Environment": { "Variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -376,11 +370,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-java-agent-amd64-ver-1-19-2:1" + ":901920570463:layer:aws-otel-java-agent-amd64-ver-1-28-1:1" ] ] } ], + "Role": { + "Fn::GetAtt": [ + "MyFunc4ServiceRole93C4DEFF", + "Arn" + ] + }, "Runtime": "python3.9", "TracingConfig": { "Mode": "Active" @@ -452,12 +452,6 @@ "Code": { "ZipFile": "def handler(event, context): pass" }, - "Role": { - "Fn::GetAtt": [ - "MyFunc5ServiceRoleFE4CE92B", - "Arn" - ] - }, "Environment": { "Variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -473,11 +467,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-collector-amd64-ver-0-62-1:1" + ":901920570463:layer:aws-otel-collector-amd64-ver-0-82-0:1" ] ] } ], + "Role": { + "Fn::GetAtt": [ + "MyFunc5ServiceRoleFE4CE92B", + "Arn" + ] + }, "Runtime": "python3.9", "TracingConfig": { "Mode": "Active" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/cdk.out index f0b901e7c06e5..560dae10d018f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"32.0.0"} \ No newline at end of file +{"version":"33.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/integ.json index 263e489ed7e1c..e78aad4885bfa 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "33.0.0", "testCases": { "IntegTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/manifest.json index 1de152555a3ca..0c44d10e95412 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "33.0.0", "artifacts": { "Stack1.assets": { "type": "cdk:asset-manifest", @@ -17,7 +17,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1e011d502b5efbd34b58f00a70ccf34fb812c6af28ee32ffe796b007503169f1.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0a057723ee23dd83fb3c1e47ef1ceee53b1aeb809908b5e428c6081b212a6ada.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -51,12 +51,6 @@ "data": "MyFunc11BE70A62" } ], - "/Stack1/Adot-lambda-layerMap": [ - { - "type": "aws:cdk:logicalId", - "data": "AdotlambdalayerMap" - } - ], "/Stack1/MyFunc2/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", @@ -160,7 +154,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/45de98e0bad004888e2b3a349cf7b69b966cff9ba6effb99b03e462c69adae21.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5f65e129af8492d163c28dcb80d294d6b4b93120afa30f095a40a2a5ea5f6296.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/tree.json index 1aace82f92764..833ab4629374f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/tree.json @@ -117,18 +117,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::Lambda::Function", "aws:cdk:cloudformation:props": { - "code": { - "zipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" - }, - "role": { - "Fn::GetAtt": [ - "MyFunc1ServiceRoleF96C5B5C", - "Arn" - ] - }, "architectures": [ "arm64" ], + "code": { + "zipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" + }, "environment": { "variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-handler" @@ -137,15 +131,24 @@ "handler": "index.handler", "layers": [ { - "Fn::FindInMap": [ - "AdotlambdalayerMap", - { - "Ref": "AWS::Region" - }, - "JAVASCRIPTxSDKx1x7x0xarm64" + "Fn::Join": [ + "", + [ + "arn:aws:lambda:", + { + "Ref": "AWS::Region" + }, + ":901920570463:layer:aws-otel-nodejs-arm64-ver-1-15-0:2" + ] ] } ], + "role": { + "Fn::GetAtt": [ + "MyFunc1ServiceRoleF96C5B5C", + "Arn" + ] + }, "runtime": "nodejs14.x", "tracingConfig": { "mode": "Active" @@ -171,14 +174,6 @@ "version": "0.0.0" } }, - "Adot-lambda-layerMap": { - "id": "Adot-lambda-layerMap", - "path": "Stack1/Adot-lambda-layerMap", - "constructInfo": { - "fqn": "aws-cdk-lib.CfnMapping", - "version": "0.0.0" - } - }, "MyFunc2": { "id": "MyFunc2", "path": "Stack1/MyFunc2", @@ -291,12 +286,6 @@ "code": { "zipFile": "def handler(event, context): pass" }, - "role": { - "Fn::GetAtt": [ - "MyFunc2ServiceRole68E50443", - "Arn" - ] - }, "environment": { "variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -312,11 +301,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-python-amd64-ver-1-18-0:2" + ":901920570463:layer:aws-otel-python-amd64-ver-1-19-0:2" ] ] } ], + "role": { + "Fn::GetAtt": [ + "MyFunc2ServiceRole68E50443", + "Arn" + ] + }, "runtime": "python3.9", "tracingConfig": { "mode": "Active" @@ -454,12 +449,6 @@ "code": { "zipFile": "def handler(event, context): pass" }, - "role": { - "Fn::GetAtt": [ - "MyFunc3ServiceRoleA69795ED", - "Arn" - ] - }, "environment": { "variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -475,11 +464,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-19-0:1" + ":901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-28-1:1" ] ] } ], + "role": { + "Fn::GetAtt": [ + "MyFunc3ServiceRoleA69795ED", + "Arn" + ] + }, "runtime": "python3.9", "tracingConfig": { "mode": "Active" @@ -617,12 +612,6 @@ "code": { "zipFile": "def handler(event, context): pass" }, - "role": { - "Fn::GetAtt": [ - "MyFunc4ServiceRole93C4DEFF", - "Arn" - ] - }, "environment": { "variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -638,11 +627,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-java-agent-amd64-ver-1-19-2:1" + ":901920570463:layer:aws-otel-java-agent-amd64-ver-1-28-1:1" ] ] } ], + "role": { + "Fn::GetAtt": [ + "MyFunc4ServiceRole93C4DEFF", + "Arn" + ] + }, "runtime": "python3.9", "tracingConfig": { "mode": "Active" @@ -780,12 +775,6 @@ "code": { "zipFile": "def handler(event, context): pass" }, - "role": { - "Fn::GetAtt": [ - "MyFunc5ServiceRoleFE4CE92B", - "Arn" - ] - }, "environment": { "variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -801,11 +790,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-collector-amd64-ver-0-62-1:1" + ":901920570463:layer:aws-otel-collector-amd64-ver-0-82-0:1" ] ] } ], + "role": { + "Fn::GetAtt": [ + "MyFunc5ServiceRoleFE4CE92B", + "Arn" + ] + }, "runtime": "python3.9", "tracingConfig": { "mode": "Active" @@ -966,18 +961,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::Lambda::Function", "aws:cdk:cloudformation:props": { - "code": { - "zipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" - }, - "role": { - "Fn::GetAtt": [ - "MyFunc1ServiceRoleF96C5B5C", - "Arn" - ] - }, "architectures": [ "x86_64" ], + "code": { + "zipFile": "exports.handler = function handler(event, _context, callback) {\n console.log(JSON.stringify(event, undefined, 2));\n return callback();\n}" + }, "environment": { "variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-handler" @@ -993,11 +982,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-nodejs-amd64-ver-1-7-0:2" + ":901920570463:layer:aws-otel-nodejs-amd64-ver-1-15-0:2" ] ] } ], + "role": { + "Fn::GetAtt": [ + "MyFunc1ServiceRoleF96C5B5C", + "Arn" + ] + }, "runtime": "nodejs14.x", "tracingConfig": { "mode": "Active" @@ -1135,12 +1130,6 @@ "code": { "zipFile": "def handler(event, context): pass" }, - "role": { - "Fn::GetAtt": [ - "MyFunc2ServiceRole68E50443", - "Arn" - ] - }, "environment": { "variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -1156,11 +1145,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-python-amd64-ver-1-18-0:2" + ":901920570463:layer:aws-otel-python-amd64-ver-1-19-0:2" ] ] } ], + "role": { + "Fn::GetAtt": [ + "MyFunc2ServiceRole68E50443", + "Arn" + ] + }, "runtime": "python3.9", "tracingConfig": { "mode": "Active" @@ -1298,12 +1293,6 @@ "code": { "zipFile": "def handler(event, context): pass" }, - "role": { - "Fn::GetAtt": [ - "MyFunc3ServiceRoleA69795ED", - "Arn" - ] - }, "environment": { "variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -1319,11 +1308,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-19-0:1" + ":901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-28-1:1" ] ] } ], + "role": { + "Fn::GetAtt": [ + "MyFunc3ServiceRoleA69795ED", + "Arn" + ] + }, "runtime": "python3.9", "tracingConfig": { "mode": "Active" @@ -1461,12 +1456,6 @@ "code": { "zipFile": "def handler(event, context): pass" }, - "role": { - "Fn::GetAtt": [ - "MyFunc4ServiceRole93C4DEFF", - "Arn" - ] - }, "environment": { "variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -1482,11 +1471,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-java-agent-amd64-ver-1-19-2:1" + ":901920570463:layer:aws-otel-java-agent-amd64-ver-1-28-1:1" ] ] } ], + "role": { + "Fn::GetAtt": [ + "MyFunc4ServiceRole93C4DEFF", + "Arn" + ] + }, "runtime": "python3.9", "tracingConfig": { "mode": "Active" @@ -1624,12 +1619,6 @@ "code": { "zipFile": "def handler(event, context): pass" }, - "role": { - "Fn::GetAtt": [ - "MyFunc5ServiceRoleFE4CE92B", - "Arn" - ] - }, "environment": { "variables": { "AWS_LAMBDA_EXEC_WRAPPER": "/opt/otel-instrument" @@ -1645,11 +1634,17 @@ { "Ref": "AWS::Region" }, - ":901920570463:layer:aws-otel-collector-amd64-ver-0-62-1:1" + ":901920570463:layer:aws-otel-collector-amd64-ver-0-82-0:1" ] ] } ], + "role": { + "Fn::GetAtt": [ + "MyFunc5ServiceRoleFE4CE92B", + "Arn" + ] + }, "runtime": "python3.9", "tracingConfig": { "mode": "Active" @@ -1710,7 +1705,7 @@ "path": "IntegTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.2.69" } }, "DeployAssert": { @@ -1756,7 +1751,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.2.69" } } }, From c8069a2fa8ea94a2d4e608fbc6efc064bfbc2eff Mon Sep 17 00:00:00 2001 From: "Pavan Sai Vasireddy (Vasi)" Date: Thu, 24 Aug 2023 00:49:10 -0700 Subject: [PATCH 8/9] Use import { Template } from '../../assertions'; --- packages/aws-cdk-lib/aws-lambda/test/adot.test.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/aws-cdk-lib/aws-lambda/test/adot.test.ts b/packages/aws-cdk-lib/aws-lambda/test/adot.test.ts index 1a340ab093199..5c6433e413dfb 100644 --- a/packages/aws-cdk-lib/aws-lambda/test/adot.test.ts +++ b/packages/aws-cdk-lib/aws-lambda/test/adot.test.ts @@ -107,12 +107,15 @@ describe('ADOT Lambda Layer', () => { // THEN Template.fromStack(fn.stack).hasOutput('ExportLayerArn', { Value: { - 'Fn::FindInMap': [ - 'AdotlambdalayerMap', - { - Ref: 'AWS::Region', - }, - 'JAVAxSDKx1x28x1xarm64', + 'Fn::Join': [ + '', + [ + 'arn:aws:lambda:', + { + Ref: 'AWS::Region', + }, + ':901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-28-1:1', + ], ], }, }); From c43372882873b2b6c798873b4bd233fcfee16a99 Mon Sep 17 00:00:00 2001 From: "Pavan Sai Vasireddy (Vasi)" Date: Thu, 24 Aug 2023 00:59:00 -0700 Subject: [PATCH 9/9] Update main and use arm64 --- packages/aws-cdk-lib/aws-lambda/test/adot.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-lambda/test/adot.test.ts b/packages/aws-cdk-lib/aws-lambda/test/adot.test.ts index 5c6433e413dfb..a0eb210538463 100644 --- a/packages/aws-cdk-lib/aws-lambda/test/adot.test.ts +++ b/packages/aws-cdk-lib/aws-lambda/test/adot.test.ts @@ -114,7 +114,7 @@ describe('ADOT Lambda Layer', () => { { Ref: 'AWS::Region', }, - ':901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-28-1:1', + ':901920570463:layer:aws-otel-java-wrapper-arm64-ver-1-28-1:1', ], ], },