Repository: cdklabs/cdk-monitoring-constructs (language: python)

Issue:
ARM_64 doesn’t work in ca-central-1 for BitmapWidgetRenderingSupport Lambda handler
### Version

v1.22.5

### Steps and/or minimal code example to reproduce

ARM_64 architecture doesn’t work in all regions.

https://github.com/cdklabs/cdk-monitoring-constructs/blob/be364600fb2a96ca9023dc89b3d9e2c315638a86/lib/dashboard/widget/BitmapWidget.ts#L44

The launch post below mentions the regions supported. Ca-central-1 is not part of the launch regions

https://aws.amazon.com/about-aws/whats-new/2021/09/better-price-performance-aws-lambda-functions-aws-graviton2-processor/


### Expected behavior

BitmapWidgetRenderingSupport Lambda handler works in all regions

### Actual behavior

CDK failed to create BitmapWidgetRenderingSupport Lambda in  ca-central-1 region

### Other details

_No response_


Discussion / hints:

Fix patch:
diff --git a/lib/dashboard/widget/BitmapWidget.ts b/lib/dashboard/widget/BitmapWidget.ts
index 2d513ccb..bfc4f65d 100644
--- a/lib/dashboard/widget/BitmapWidget.ts
+++ b/lib/dashboard/widget/BitmapWidget.ts
@@ -3,13 +3,7 @@ import * as path from "path";
 import { Duration, Tags } from "aws-cdk-lib";
 import { IWidget } from "aws-cdk-lib/aws-cloudwatch";
 import { Effect, PolicyStatement } from "aws-cdk-lib/aws-iam";
-import {
-  Architecture,
-  Code,
-  Function,
-  IFunction,
-  Runtime,
-} from "aws-cdk-lib/aws-lambda";
+import { Code, Function, IFunction, Runtime } from "aws-cdk-lib/aws-lambda";
 import { RetentionDays } from "aws-cdk-lib/aws-logs";
 import { Construct } from "constructs";
 
@@ -41,7 +35,6 @@ export class BitmapWidgetRenderingSupport extends Construct {
       handler: "index.handler",
       memorySize: 128,
       runtime: Runtime.NODEJS_14_X,
-      architecture: Architecture.ARM_64,
       timeout: Duration.seconds(60),
       logRetention: RetentionDays.ONE_DAY,
     });
diff --git a/lib/monitoring/aws-secretsmanager/SecretsManagerMetricsPublisher.ts b/lib/monitoring/aws-secretsmanager/SecretsManagerMetricsPublisher.ts
index d3b61a7f..1c3f412d 100644
--- a/lib/monitoring/aws-secretsmanager/SecretsManagerMetricsPublisher.ts
+++ b/lib/monitoring/aws-secretsmanager/SecretsManagerMetricsPublisher.ts
@@ -4,13 +4,7 @@ import { Duration, Names } from "aws-cdk-lib";
 import { Rule, RuleTargetInput, Schedule } from "aws-cdk-lib/aws-events";
 import { LambdaFunction } from "aws-cdk-lib/aws-events-targets";
 import { Effect, PolicyStatement } from "aws-cdk-lib/aws-iam";
-import {
-  Architecture,
-  Code,
-  Function,
-  IFunction,
-  Runtime,
-} from "aws-cdk-lib/aws-lambda";
+import { Code, Function, IFunction, Runtime } from "aws-cdk-lib/aws-lambda";
 import { RetentionDays } from "aws-cdk-lib/aws-logs";
 import { ISecret } from "aws-cdk-lib/aws-secretsmanager";
 import { Construct } from "constructs";
@@ -41,7 +35,6 @@ export class SecretsManagerMetricsPublisher extends Construct {
       handler: "index.handler",
       memorySize: 128,
       runtime: Runtime.NODEJS_14_X,
-      architecture: Architecture.ARM_64,
       timeout: Duration.seconds(60),
       logRetention: RetentionDays.ONE_DAY,
     });


Test patch:
diff --git a/test/dashboard/widget/__snapshots__/BitmapWidget.test.ts.snap b/test/dashboard/widget/__snapshots__/BitmapWidget.test.ts.snap
index 95ab3f38..abba281d 100644
--- a/test/dashboard/widget/__snapshots__/BitmapWidget.test.ts.snap
+++ b/test/dashboard/widget/__snapshots__/BitmapWidget.test.ts.snap
@@ -94,9 +94,6 @@ Object {
         "SupportLambdaServiceRole250832F3",
       ],
       "Properties": Object {
-        "Architectures": Array [
-          "arm64",
-        ],
         "Code": Object {
           "S3Bucket": Object {
             "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
diff --git a/test/facade/__snapshots__/MonitoringAspect.test.ts.snap b/test/facade/__snapshots__/MonitoringAspect.test.ts.snap
index bf1d4143..5b716ba5 100644
--- a/test/facade/__snapshots__/MonitoringAspect.test.ts.snap
+++ b/test/facade/__snapshots__/MonitoringAspect.test.ts.snap
@@ -3309,9 +3309,6 @@ Object {
         "MonitoringFacadeSecretsManagerMetricsPublisherLambdaServiceRole7F0151FB",
       ],
       "Properties": Object {
-        "Architectures": Array [
-          "arm64",
-        ],
         "Code": Object {
           "S3Bucket": Object {
             "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
diff --git a/test/monitoring/aws-secretsmanager/__snapshots__/SecretsManagerSecretMonitoring.test.ts.snap b/test/monitoring/aws-secretsmanager/__snapshots__/SecretsManagerSecretMonitoring.test.ts.snap
index 5e9a0abf..775f1dab 100644
--- a/test/monitoring/aws-secretsmanager/__snapshots__/SecretsManagerSecretMonitoring.test.ts.snap
+++ b/test/monitoring/aws-secretsmanager/__snapshots__/SecretsManagerSecretMonitoring.test.ts.snap
@@ -94,9 +94,6 @@ Object {
         "ScopeSecretsManagerMetricsPublisherLambdaServiceRoleEC4B8B08",
       ],
       "Properties": Object {
-        "Architectures": Array [
-          "arm64",
-        ],
         "Code": Object {
           "S3Bucket": Object {
             "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
@@ -423,9 +420,6 @@ Object {
         "ScopeSecretsManagerMetricsPublisherLambdaServiceRoleEC4B8B08",
       ],
       "Properties": Object {
-        "Architectures": Array [
-          "arm64",
-        ],
         "Code": Object {
           "S3Bucket": Object {
             "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",