diff --git a/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts b/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts index f5bd9a6d4b976..945050af0b48d 100644 --- a/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts +++ b/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts @@ -9,7 +9,6 @@ import { ISubnet, IVpc, SubnetSelection } from './vpc'; import * as iam from '../../aws-iam'; import * as cxschema from '../../cloud-assembly-schema'; import { Aws, ContextProvider, IResource, Lazy, Resource, Stack, Token } from '../../core'; -import { PARTITION_MAP } from '../../region-info/build-tools/fact-tables'; /** * A VPC endpoint. @@ -670,21 +669,8 @@ export class InterfaceVpcEndpointAwsService implements IInterfaceVpcEndpointServ 'redshift', 'redshift-data', 's3', 'sagemaker.api', 'sagemaker.featurestore-runtime', 'sagemaker.runtime', 'securityhub', 'servicecatalog', 'sms', 'sqs', 'states', 'sts', 'sync-states', 'synthetics', 'transcribe', 'transcribestreaming', 'transfer', 'workspaces', 'xray'], - 'us-isof-': ['ecr.api', 'ecr.dkr'], - 'eu-isoe-': ['ecr.api', 'ecr.dkr'], }; - - const regionPartition = region.split('-').slice(0, 2).join('-'); - const partitionDetails = PARTITION_MAP[`${regionPartition}-`]; - - // Check for specific service name under isolated region prefix - const serviceInExceptions = VPC_ENDPOINT_SERVICE_EXCEPTIONS[`${regionPartition}-`]?.includes(name); - - if (serviceInExceptions) { - // Endpoints generated in reverse of domain suffix for the services mentioned in map - const reverseString = partitionDetails.domainSuffix.split('.').reverse().join('.'); - return reverseString; - } else if (VPC_ENDPOINT_SERVICE_EXCEPTIONS[region]?.includes(name)) { + if (VPC_ENDPOINT_SERVICE_EXCEPTIONS[region]?.includes(name)) { return 'cn.com.amazonaws'; } else { return 'com.amazonaws'; diff --git a/packages/aws-cdk-lib/aws-ec2/test/vpc-endpoint.test.ts b/packages/aws-cdk-lib/aws-ec2/test/vpc-endpoint.test.ts index 2e9ae880d7147..3c1c05ba8dfa8 100644 --- a/packages/aws-cdk-lib/aws-ec2/test/vpc-endpoint.test.ts +++ b/packages/aws-cdk-lib/aws-ec2/test/vpc-endpoint.test.ts @@ -694,37 +694,6 @@ describe('vpc endpoint', () => { }); }); - - test.each([ - ['us-isof-test-1', 'gov.ic.hci.csp'], - ['eu-isoe-test-1', 'uk.adc-e.cloud'], - ['us-east-1', 'com.amazonaws'], - ['us-gov-west-1', 'com.amazonaws'], - ['cn-northwest-1', 'cn.com.amazonaws'], - ['cn-north-1', 'cn.com.amazonaws'], - ])('test vpc interface endpoint for ECR can be created correctly in all regions', (region : string, domain: string) => { - //GIVEN - const stack = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: region } }); - const vpc = new Vpc(stack, 'VPC'); - - //WHEN - vpc.addInterfaceEndpoint('ECR Endpoint', { - service: InterfaceVpcEndpointAwsService.ECR, - }); - - vpc.addInterfaceEndpoint('ECR Docker Endpoint', { - service: InterfaceVpcEndpointAwsService.ECR_DOCKER, - }); - - //THEN - Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', { - ServiceName: `${domain}.${region}.ecr.api`, - }); - Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', { - ServiceName: `${domain}.${region}.ecr.dkr`, - }); - }); - test.each([ ['transcribe', InterfaceVpcEndpointAwsService.TRANSCRIBE], ])('test vpc interface endpoint with .cn suffix for %s can be created correctly in China regions', (name: string, given: InterfaceVpcEndpointAwsService) => { diff --git a/packages/aws-cdk-lib/aws-lambda/README.md b/packages/aws-cdk-lib/aws-lambda/README.md index 403460f8ed1b0..1b34ddd81bb25 100644 --- a/packages/aws-cdk-lib/aws-lambda/README.md +++ b/packages/aws-cdk-lib/aws-lambda/README.md @@ -1326,6 +1326,8 @@ When enabled, AWS Lambda checks every code deployment and verifies that the code For more information, see [Configuring code signing for AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html). The following code configures a function with code signing. +Please note the code will not be automatically signed before deployment. To ensure your code is properly signed, you'll need to conduct the code signing process either through the AWS CLI (Command Line Interface) [start-signing-job](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/signer/start-signing-job.html) or by accessing the AWS Signer console. + ```ts import * as signer from 'aws-cdk-lib/aws-signer';