From 953afa90e3e331909772e8146760e1de1cf59a59 Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Fri, 27 May 2022 02:47:09 -0700 Subject: [PATCH 01/23] docs(cfnspec): update CloudFormation documentation (#20519) --- .../spec-source/cfn-docs/cfn-docs.json | 101 +++++++++++++++++- 1 file changed, 100 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/cfnspec/spec-source/cfn-docs/cfn-docs.json b/packages/@aws-cdk/cfnspec/spec-source/cfn-docs/cfn-docs.json index 1cee622dab798..c99e5a9c1f3a7 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/cfn-docs/cfn-docs.json +++ b/packages/@aws-cdk/cfnspec/spec-source/cfn-docs/cfn-docs.json @@ -9109,6 +9109,7 @@ "SmsAuthenticationMessage": "A string representing the SMS authentication message.", "SmsConfiguration": "The SMS configuration with the settings that your Amazon Cognito user pool must use to send an SMS message from your AWS account through Amazon Simple Notification Service. To send SMS messages with Amazon SNS in the AWS Region that you want, the Amazon Cognito user pool uses an AWS Identity and Access Management (IAM) role in your AWS account .", "SmsVerificationMessage": "A string representing the SMS verification message.", + "UserAttributeUpdateSettings": "The settings for updates to user attributes. These settings include the property `AttributesRequireVerificationBeforeUpdate` ,\na user-pool setting that tells Amazon Cognito how to handle changes to the value of your users' email address and phone number attributes. For\nmore information, see [Verifying updates to to email addresses and phone numbers](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-email-phone-verification.html#user-pool-settings-verifications-verify-attribute-updates) .", "UserPoolAddOns": "Enables advanced security risk detection. Set the key `AdvancedSecurityMode` to the value \"AUDIT\".", "UserPoolName": "A string used to name the user pool.", "UserPoolTags": "The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.", @@ -9261,6 +9262,13 @@ "MinLength": "The minimum length." } }, + "AWS::Cognito::UserPool.UserAttributeUpdateSettings": { + "attributes": {}, + "description": "The settings for updates to user attributes. These settings include the property `AttributesRequireVerificationBeforeUpdate` ,\na user-pool setting that tells Amazon Cognito how to handle changes to the value of your users' email address and phone number attributes. For\nmore information, see [Verifying updates to to email addresses and phone numbers](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-email-phone-verification.html#user-pool-settings-verifications-verify-attribute-updates) .", + "properties": { + "AttributesRequireVerificationBeforeUpdate": "Requires that your user verifies their email address, phone number, or both before Amazon Cognito updates the value of that attribute. When you update a user attribute that has this option activated, Amazon Cognito sends a verification message to the new phone number or email address. Amazon Cognito doesn\u2019t change the value of the attribute until your user responds to the verification message and confirms the new value.\n\nYou can verify an updated email address or phone number with a [VerifyUserAttribute](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_VerifyUserAttribute.html) API request. You can also call the [UpdateUserAttributes](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_UpdateUserAttributes.html) or [AdminUpdateUserAttributes](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminUpdateUserAttributes.html) API and set `email_verified` or `phone_number_verified` to true.\n\nWhen `AttributesRequireVerificationBeforeUpdate` is false, your user pool doesn't require that your users verify attribute changes before Amazon Cognito updates them. In a user pool where `AttributesRequireVerificationBeforeUpdate` is false, API operations that change attribute values can immediately update a user\u2019s `email` or `phone_number` attribute." + } + }, "AWS::Cognito::UserPool.UserPoolAddOns": { "attributes": {}, "description": "The user pool add-ons type.", @@ -16876,6 +16884,82 @@ "Namespace": "The namespaces of the EKS cluster.\n\n*Minimum* : 1\n\n*Maximum* : 63\n\n*Pattern* : `[a-z0-9]([-a-z0-9]*[a-z0-9])?`" } }, + "AWS::EMRServerless::Application": { + "attributes": { + "ApplicationId": "The ID of the application, such as `ab4rp1abcs8xz47n3x0example` .", + "Arn": "The Amazon Resource Name (ARN) of the project.", + "Ref": "When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the application.\n\nFor more information about using the `Ref` function, see [`Ref`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html) ." + }, + "description": "The `AWS::EMRServerless::Application` resource specifies an EMR Serverless application. An application uses open source analytics frameworks to run jobs that process data. To create an application, you must specify the release version for the open source framework version you want to use and the type of application you want, such as Apache Spark or Apache Hive. After you create an application, you can submit data processing jobs or interactive requests to it.", + "properties": { + "AutoStartConfiguration": "The configuration for an application to automatically start on job submission.", + "AutoStopConfiguration": "The configuration for an application to automatically stop after a certain amount of time being idle.", + "InitialCapacity": "The initial capacity of the application.", + "MaximumCapacity": "The maximum capacity of the application. This is cumulative across all workers at any given point in time during the lifespan of the application is created. No new resources will be created once any one of the defined limits is hit.", + "Name": "The name of the application.\n\n*Minimum* : 1\n\n*Maximum* : 64\n\n*Pattern* : `^[A-Za-z0-9._\\\\/#-]+$`", + "NetworkConfiguration": "The network configuration for customer VPC connectivity for the application.", + "ReleaseLabel": "The EMR release version associated with the application.\n\n*Minimum* : 1\n\n*Maximum* : 64\n\n*Pattern* : `^[A-Za-z0-9._/-]+$`", + "Tags": "The tags assigned to the application.", + "Type": "The type of application, such as Spark or Hive." + } + }, + "AWS::EMRServerless::Application.AutoStartConfiguration": { + "attributes": {}, + "description": "The con\ufb01guration for an application to automatically start on job submission.", + "properties": { + "Enabled": "Enables the application to automatically start on job submission. Defaults to true." + } + }, + "AWS::EMRServerless::Application.AutoStopConfiguration": { + "attributes": {}, + "description": "The con\ufb01guration for an application to automatically stop after a certain amount of time being idle.", + "properties": { + "Enabled": "Enables the application to automatically stop after a certain amount of time being idle. Defaults to true.", + "IdleTimeoutMinutes": "The amount of idle time in minutes after which your application will automatically stop. Defaults to 15 minutes.\n\n*Minimum* : 1\n\n*Maximum* : 10080" + } + }, + "AWS::EMRServerless::Application.InitialCapacityConfig": { + "attributes": {}, + "description": "The initial capacity configuration per worker.", + "properties": { + "WorkerConfiguration": "The resource configuration of the initial capacity configuration.", + "WorkerCount": "The number of workers in the initial capacity configuration.\n\n*Minimum* : 1\n\n*Maximum* : 1000000" + } + }, + "AWS::EMRServerless::Application.InitialCapacityConfigKeyValuePair": { + "attributes": {}, + "description": "The initial capacity configuration per worker.", + "properties": { + "Key": "The worker type for an analytics framework. For Spark applications, the key can either be set to `Driver` or `Executor` . For Hive applications, it can be set to `HiveDriver` or `TezTask` .\n\n*Minimum* : 1\n\n*Maximum* : 50\n\n*Pattern* : `^[a-zA-Z]+[-_]*[a-zA-Z]+$`", + "Value": "The value for the initial capacity configuration per worker." + } + }, + "AWS::EMRServerless::Application.MaximumAllowedResources": { + "attributes": {}, + "description": "The maximum allowed cumulative resources for an application. No new resources will be created once the limit is hit.", + "properties": { + "Cpu": "The maximum allowed CPU for an application.\n\n*Minimum* : 1\n\n*Maximum* : 15\n\n*Pattern* : `^[1-9][0-9]*(\\\\s)?(vCPU|vcpu|VCPU)?$`", + "Disk": "The maximum allowed disk for an application.\n\n*Minimum* : 1\n\n*Maximum* : 15\n\n*Pattern* : `^[1-9][0-9]*(\\\\s)?(GB|gb|gB|Gb)$\"`", + "Memory": "The maximum allowed resources for an application.\n\n*Minimum* : 1\n\n*Maximum* : 15\n\n*Pattern* : `^[1-9][0-9]*(\\\\s)?(GB|gb|gB|Gb)?$`" + } + }, + "AWS::EMRServerless::Application.NetworkConfiguration": { + "attributes": {}, + "description": "The network configuration for customer VPC connectivity.", + "properties": { + "SecurityGroupIds": "The array of security group Ids for customer VPC connectivity.\n\n*Minimum* : 1\n\n*Maximum* : 32\n\n*Pattern* : `^[-0-9a-zA-Z]+`", + "SubnetIds": "The array of subnet Ids for customer VPC connectivity.\n\n*Minimum* : 1\n\n*Maximum* : 32\n\n*Pattern* : `^[-0-9a-zA-Z]+`" + } + }, + "AWS::EMRServerless::Application.WorkerConfiguration": { + "attributes": {}, + "description": "The resource configuration of the initial capacity configuration.", + "properties": { + "Cpu": "*Minimum* : 1\n\n*Maximum* : 15\n\n*Pattern* : `^[1-9][0-9]*(\\\\s)?(vCPU|vcpu|VCPU)?$`", + "Disk": "*Minimum* : 1\n\n*Maximum* : 15\n\n*Pattern* : `^[1-9][0-9]*(\\\\s)?(GB|gb|gB|Gb)$\"`", + "Memory": "*Minimum* : 1\n\n*Maximum* : 15\n\n*Pattern* : `^[1-9][0-9]*(\\\\s)?(GB|gb|gB|Gb)?$`" + } + }, "AWS::ElastiCache::CacheCluster": { "attributes": { "ConfigurationEndpoint.Address": "The DNS hostname of the cache node.\n\n> Redis (cluster mode disabled) replication groups don't have this attribute. Therefore, `Fn::GetAtt` returns a value for this attribute only if the replication group is clustered. Otherwise, `Fn::GetAtt` fails.", @@ -24955,6 +25039,21 @@ "RfRegion": "The frequency band (RFRegion) value." } }, + "AWS::IoTWireless::NetworkAnalyzerConfiguration": { + "attributes": { + "Arn": "", + "Ref": "" + }, + "description": "", + "properties": { + "Description": "", + "Name": "", + "Tags": "", + "TraceContent": "", + "WirelessDevices": "", + "WirelessGateways": "" + } + }, "AWS::IoTWireless::PartnerAccount": { "attributes": { "Arn": "The Amazon Resource Name (ARN) of the resource.", @@ -38532,7 +38631,7 @@ "Tags": "AWS CloudFormation resource tags to apply to the document. Use tags to help you identify and categorize resources.", "TargetType": "Specify a target type to define the kinds of resources the document can run on. For example, to run a document on EC2 instances, specify the following value: `/AWS::EC2::Instance` . If you specify a value of '/' the document can run on all types of resources. If you don't specify a value, the document can't run on any resources. For a list of valid resource types, see [AWS resource and property types reference](https://docs.aws.amazon.com//AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) in the *AWS CloudFormation User Guide* .", "UpdateMethod": "If the document resource you specify in your template already exists, this parameter determines whether a new version of the existing document is created, or the existing document is replaced. `Replace` is the default method. If you specify `NewVersion` for the `UpdateMethod` parameter, and the `Name` of the document does not match an existing resource, a new document is created. When you specify `NewVersion` , the default version of the document is changed to the newly created version.", - "VersionName": "An optional field specifying the version of the artifact you are creating with the document. For example, \"Release 12, Update 6\". This value is unique across all versions of a document, and can't be changed." + "VersionName": "An optional field specifying the version of the artifact you are creating with the document. For example, `Release12.1` . This value is unique across all versions of a document, and can't be changed." } }, "AWS::SSM::Document.AttachmentsSource": { From 777953106ac550b058fdaa3ccde25b62be07defa Mon Sep 17 00:00:00 2001 From: Cory Hall <43035978+corymhall@users.noreply.github.com> Date: Fri, 27 May 2022 08:46:36 -0400 Subject: [PATCH 02/23] feat(integ-runner): publish integ-runner cli (#20477) This PR switches the `integ-runner` package from private to public. ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/integ-runner/README.md | 7 ++++++ .../integ-runner/lib/runner/runner-base.ts | 4 ---- packages/@aws-cdk/integ-runner/package.json | 2 +- packages/cdk-cli-wrapper/lib/cdk-wrapper.ts | 4 ++-- .../cdk-cli-wrapper/test/cdk-wrapper.test.ts | 24 +++++++++---------- 5 files changed, 22 insertions(+), 19 deletions(-) diff --git a/packages/@aws-cdk/integ-runner/README.md b/packages/@aws-cdk/integ-runner/README.md index 3f983273a4a1e..db79cf866b9ca 100644 --- a/packages/@aws-cdk/integ-runner/README.md +++ b/packages/@aws-cdk/integ-runner/README.md @@ -19,6 +19,13 @@ ## Overview +This tool has been created to be used initially by this repo (aws/aws-cdk). Long term the goal is +for this tool to be a general tool that can be used for running CDK integration tests. We are +publishing this tool so that it can be used by the community and we would love to receive feedback +on use cases that the tool should support, or issues that prevent the tool from being used in your +library. + +This tool is meant to be used with the [integ-tests](https://github.com/aws/aws-cdk/tree/master/packages/%40aws-cdk/integ-tests) library. ## Usage diff --git a/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts b/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts index 18b8a3c6e9f64..6ebdce2eea40c 100644 --- a/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts +++ b/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts @@ -129,8 +129,6 @@ export abstract class IntegRunner { protected readonly profile?: string; - protected readonly cdkExecutable: string; - protected _destructiveChanges?: DestructiveChange[]; private legacyContext?: Record; @@ -153,9 +151,7 @@ export abstract class IntegRunner { this.sourceFilePath = path.join(this.directory, parsed.base); this.cdkContextPath = path.join(this.directory, 'cdk.context.json'); - this.cdkExecutable = require.resolve('aws-cdk/bin/cdk'); this.cdk = options.cdk ?? new CdkCliWrapper({ - cdkExecutable: this.cdkExecutable, directory: this.directory, env: { ...options.env, diff --git a/packages/@aws-cdk/integ-runner/package.json b/packages/@aws-cdk/integ-runner/package.json index 5f08391b5bf08..fdf44c3311b9a 100644 --- a/packages/@aws-cdk/integ-runner/package.json +++ b/packages/@aws-cdk/integ-runner/package.json @@ -2,7 +2,7 @@ "name": "@aws-cdk/integ-runner", "description": "CDK Integration Testing Tool", "version": "0.0.0", - "private": true, + "private": false, "main": "lib/index.js", "types": "lib/index.d.ts", "bin": { diff --git a/packages/cdk-cli-wrapper/lib/cdk-wrapper.ts b/packages/cdk-cli-wrapper/lib/cdk-wrapper.ts index fd45c4ae0c07b..069673582f195 100644 --- a/packages/cdk-cli-wrapper/lib/cdk-wrapper.ts +++ b/packages/cdk-cli-wrapper/lib/cdk-wrapper.ts @@ -109,9 +109,9 @@ export class CdkCliWrapper implements ICdk { this.directory = options.directory; this.env = options.env; try { - this.cdk = options.cdkExecutable ?? require.resolve('aws-cdk/bin/cdk'); + this.cdk = options.cdkExecutable ?? 'cdk'; } catch (e) { - throw new Error(`could not resolve path to cdk executable: "${options.cdkExecutable}"`); + throw new Error(`could not resolve path to cdk executable: "${options.cdkExecutable ?? 'cdk'}"`); } } diff --git a/packages/cdk-cli-wrapper/test/cdk-wrapper.test.ts b/packages/cdk-cli-wrapper/test/cdk-wrapper.test.ts index c0d8f75195ea9..0a9d370426aae 100644 --- a/packages/cdk-cli-wrapper/test/cdk-wrapper.test.ts +++ b/packages/cdk-cli-wrapper/test/cdk-wrapper.test.ts @@ -32,7 +32,7 @@ test('default deploy', () => { // THEN expect(spawnSyncMock).toHaveBeenCalledWith( - expect.stringMatching(/aws-cdk\/bin\/cdk/), + expect.stringMatching(/cdk/), ['deploy', '--app', 'node bin/my-app.js', 'test-stack1'], expect.objectContaining({ env: expect.anything(), @@ -86,7 +86,7 @@ test('deploy with all arguments', () => { // THEN expect(spawnSyncMock).toHaveBeenCalledWith( - expect.stringMatching(/aws-cdk\/bin\/cdk/), + expect.stringMatching(/cdk/), expect.arrayContaining([ 'deploy', '--no-strict', @@ -146,7 +146,7 @@ test('can parse boolean arguments', () => { // THEN expect(spawnSyncMock).toHaveBeenCalledWith( - expect.stringMatching(/aws-cdk\/bin\/cdk/), + expect.stringMatching(/cdk/), [ 'deploy', '--app', @@ -179,7 +179,7 @@ test('can parse parameters', () => { // THEN expect(spawnSyncMock).toHaveBeenCalledWith( - expect.stringMatching(/aws-cdk\/bin\/cdk/), + expect.stringMatching(/cdk/), [ 'deploy', '--parameters', 'myparam=test', @@ -211,7 +211,7 @@ test('can parse context', () => { // THEN expect(spawnSyncMock).toHaveBeenCalledWith( - expect.stringMatching(/aws-cdk\/bin\/cdk/), + expect.stringMatching(/cdk/), [ 'deploy', '--app', @@ -243,7 +243,7 @@ test('can parse array arguments', () => { // THEN expect(spawnSyncMock).toHaveBeenCalledWith( - expect.stringMatching(/aws-cdk\/bin\/cdk/), + expect.stringMatching(/cdk/), [ 'deploy', '--notification-arns', 'arn:aws:us-east-1:1111111111:some:resource', @@ -274,7 +274,7 @@ test('can provide additional environment', () => { // THEN expect(spawnSyncMock).toHaveBeenCalledWith( - expect.stringMatching(/aws-cdk\/bin\/cdk/), + expect.stringMatching(/cdk/), ['deploy', '--app', 'node bin/my-app.js', 'test-stack1'], expect.objectContaining({ env: expect.objectContaining({ @@ -300,7 +300,7 @@ test('default synth', () => { // THEN expect(spawnSyncMock).toHaveBeenCalledWith( - expect.stringMatching(/aws-cdk\/bin\/cdk/), + expect.stringMatching(/cdk/), ['synth', '--app', 'node bin/my-app.js', 'test-stack1'], expect.objectContaining({ env: expect.objectContaining({ @@ -326,7 +326,7 @@ test('synth arguments', () => { // THEN expect(spawnSyncMock).toHaveBeenCalledWith( - expect.stringMatching(/aws-cdk\/bin\/cdk/), + expect.stringMatching(/cdk/), ['destroy', '--app', 'node bin/my-app.js', 'test-stack1'], expect.objectContaining({ env: expect.objectContaining({ @@ -354,7 +354,7 @@ test('destroy arguments', () => { // THEN expect(spawnSyncMock).toHaveBeenCalledWith( - expect.stringMatching(/aws-cdk\/bin\/cdk/), + expect.stringMatching(/cdk/), ['destroy', '--force', '--no-exclusively', '--app', 'node bin/my-app.js', 'test-stack1'], expect.objectContaining({ env: expect.objectContaining({ @@ -380,7 +380,7 @@ test('default ls', () => { // THEN expect(spawnSyncMock).toHaveBeenCalledWith( - expect.stringMatching(/aws-cdk\/bin\/cdk/), + expect.stringMatching(/cdk/), ['ls', '--app', 'node bin/my-app.js', '*'], expect.objectContaining({ env: expect.objectContaining({ @@ -415,7 +415,7 @@ test('ls arguments', () => { // THEN expect(spawnSyncMock).toHaveBeenCalledWith( - expect.stringMatching(/aws-cdk\/bin\/cdk/), + expect.stringMatching(/cdk/), ['ls', '--long', '--app', 'node bin/my-app.js', '*'], expect.objectContaining({ env: expect.objectContaining({ From c274c2f983de2dfd20ed2886a3c50f7fd3f6b3f4 Mon Sep 17 00:00:00 2001 From: Cory Hall <43035978+corymhall@users.noreply.github.com> Date: Fri, 27 May 2022 09:32:37 -0400 Subject: [PATCH 03/23] fix(integ-runner): don't throw error if tests pass (#20511) If you run `integ-runner --update-on-failed` and the test succeeds, then the cli should not return an exit code. re #20384 ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/integ-runner/lib/cli.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/integ-runner/lib/cli.ts b/packages/@aws-cdk/integ-runner/lib/cli.ts index 1c7c7920375d5..6014d4997378a 100644 --- a/packages/@aws-cdk/integ-runner/lib/cli.ts +++ b/packages/@aws-cdk/integ-runner/lib/cli.ts @@ -49,9 +49,10 @@ async function main() { let failedSnapshots: IntegTestWorkerConfig[] = []; if (argv['max-workers'] < testRegions.length * (profiles ?? [1]).length) { - logger.warning('You are attempting to run %s tests in parallel, but only have %s workers. Not all of your profiles+regions will be utilized', argv.profiles*argv['parallel-regions'], argv['max-workers']); + logger.warning('You are attempting to run %s tests in parallel, but only have %s workers. Not all of your profiles+regions will be utilized', argv.profiles * argv['parallel-regions'], argv['max-workers']); } + let testsSucceeded = false; try { if (argv.list) { const tests = await new IntegrationTests(argv.directory).fromCliArgs(); @@ -99,6 +100,8 @@ async function main() { verbose: argv.verbose, updateWorkflow: !argv['disable-update-workflow'], }); + testsSucceeded = success; + if (argv.clean === false) { logger.warning('Not cleaning up stacks since "--no-clean" was used'); @@ -125,7 +128,9 @@ async function main() { if (!runUpdateOnFailed) { message = 'To re-run failed tests run: yarn integ-runner --update-on-failed'; } - throw new Error(`Some snapshot tests failed!\n${message}`); + if (!testsSucceeded) { + throw new Error(`Some tests failed!\n${message}`); + } } } From 6f4aba805b93523958d5cb4c8db4c1c800f53806 Mon Sep 17 00:00:00 2001 From: Stephen Blackstone Date: Fri, 27 May 2022 11:05:59 -0400 Subject: [PATCH 04/23] Fix error message when creating a NodeJS function (#20524) Error message gives the incorrect field depsFileLockPath Should be depsLockFilePath ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: None. * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features None. * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* Yep. --- packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts index ee82e25ccca18..eea143f5713f9 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts @@ -147,7 +147,7 @@ function findLockFile(depsLockFilePath?: string): string { throw new Error('Cannot find a package lock file (`pnpm-lock.yaml`, `yarn.lock` or `package-lock.json`). Please specify it with `depsLockFilePath`.'); } if (lockFiles.length > 1) { - throw new Error(`Multiple package lock files found: ${lockFiles.join(', ')}. Please specify the desired one with \`depsFileLockPath\`.`); + throw new Error(`Multiple package lock files found: ${lockFiles.join(', ')}. Please specify the desired one with \`depsLockFilePath\`.`); } return lockFiles[0]; From b7bc10cc7a734fe3b4a9194dffbc017f2fe3ef43 Mon Sep 17 00:00:00 2001 From: Adam Brodziak Date: Fri, 27 May 2022 18:23:10 +0200 Subject: [PATCH 05/23] fix: Default username in RoleSessionName (#20188) In case user does not have entry in `/etc/passwd` the `os.userInfo()` call will throw `SystemError` exception as documented: https://nodejs.org/docs/latest-v16.x/api/os.html#osuserinfooptions Fixes #19401 issue. It can be tested inside Docker for ad-hoc 1234 user ID: ```sh docker run -u 1234 -e CDK_HOME=/tmp npm run cdk diff ``` The `CDK_HOME=/tmp` is a workaround for #7937 issue, where CDK complains that it can't write cached info in user homedir, because it does not exists. Once #7937 will be fixed then #19401 will most likely hit users. However above workaround is a viable option. Hence those two issues are related, but not duplicated. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) Yes, followed the guide. ### Adding new Unconventional Dependencies: * [x] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) No new dependencies. ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? No, it's a bugfix, not a feature. *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-cdk/lib/api/aws-auth/sdk-provider.ts | 6 +++- .../aws-cdk/test/api/sdk-provider.test.ts | 28 +++++++++++++++++++ packages/cdk-assets/lib/aws.ts | 6 +++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts b/packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts index 39f7cd2f2a1b1..200f6548c6554 100644 --- a/packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts +++ b/packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts @@ -459,7 +459,11 @@ function readIfPossible(filename: string): string | undefined { * @see https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#API_AssumeRole_RequestParameters */ function safeUsername() { - return os.userInfo().username.replace(/[^\w+=,.@-]/g, '@'); + try { + return os.userInfo().username.replace(/[^\w+=,.@-]/g, '@'); + } catch (e) { + return 'noname'; + } } /** diff --git a/packages/aws-cdk/test/api/sdk-provider.test.ts b/packages/aws-cdk/test/api/sdk-provider.test.ts index c2e3d311af647..9c03a7be0beed 100644 --- a/packages/aws-cdk/test/api/sdk-provider.test.ts +++ b/packages/aws-cdk/test/api/sdk-provider.test.ts @@ -341,6 +341,34 @@ describe('with intercepted network calls', () => { }); }); + test('assuming a role does not fail when OS username cannot be read', async () => { + // GIVEN + prepareCreds({ + fakeSts, + config: { + default: { aws_access_key_id: 'foo', $account: '11111' }, + }, + }); + + await withMocked(os, 'userInfo', async (userInfo) => { + userInfo.mockImplementation(() => { + // SystemError thrown as documented: https://nodejs.org/docs/latest-v16.x/api/os.html#osuserinfooptions + throw new Error('SystemError on Linux: uv_os_get_passwd returned ENOENT. See #19401 issue.'); + }); + + // WHEN + const provider = await providerFromProfile(undefined); + + const sdk = (await provider.forEnvironment(env(uniq('88888')), Mode.ForReading, { assumeRoleArn: 'arn:aws:role' })).sdk as SDK; + await sdk.currentAccount(); + + // THEN + expect(fakeSts.assumedRoles[0]).toEqual(expect.objectContaining({ + roleSessionName: 'aws-cdk-noname', + })); + }); + }); + test('even if current credentials are for the wrong account, we will still use them to AssumeRole', async () => { // GIVEN prepareCreds({ diff --git a/packages/cdk-assets/lib/aws.ts b/packages/cdk-assets/lib/aws.ts index c35dedb38bbe2..4f79ead780227 100644 --- a/packages/cdk-assets/lib/aws.ts +++ b/packages/cdk-assets/lib/aws.ts @@ -150,6 +150,10 @@ export class DefaultAwsClient implements IAws { * @see https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#API_AssumeRole_RequestParameters */ function safeUsername() { - return os.userInfo().username.replace(/[^\w+=,.@-]/g, '@'); + try { + return os.userInfo().username.replace(/[^\w+=,.@-]/g, '@'); + } catch (e) { + return 'noname'; + } } From dacefd6c4770f06390f853fdf4703d8662beb3f5 Mon Sep 17 00:00:00 2001 From: Joshua Weber <57131123+daschaa@users.noreply.github.com> Date: Fri, 27 May 2022 19:10:42 +0200 Subject: [PATCH 06/23] fix(ecs): canContainersAccessInstanceRole is ignored when passed in AsgCapacityProvider constructor (#20522) Fixes #20293 When adding an AsgCapacityProvider the property `canContainersAccessInstanceRole` is only checked when passed in via the method `addAsgCapacityProvider`. It is ignored when passing the property via the instantiation of an AsgCapacityProvider. In this PR I added, that if either one way (method or constructor) has got the property set - it is respected in the outcome. For more details please see the issue #20293 I decided **not** to omit the property on the class level because it would bring in breaking changes. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ecs/lib/cluster.ts | 10 ++ .../@aws-cdk/aws-ecs/test/cluster.test.ts | 142 ++++++++++++++++++ 2 files changed, 152 insertions(+) diff --git a/packages/@aws-cdk/aws-ecs/lib/cluster.ts b/packages/@aws-cdk/aws-ecs/lib/cluster.ts index 8e48e2be59cec..188fa661944d3 100644 --- a/packages/@aws-cdk/aws-ecs/lib/cluster.ts +++ b/packages/@aws-cdk/aws-ecs/lib/cluster.ts @@ -370,6 +370,7 @@ export class Cluster extends Resource implements ICluster { machineImageType: provider.machineImageType, // Don't enable the instance-draining lifecycle hook if managed termination protection is enabled taskDrainTime: provider.enableManagedTerminationProtection ? Duration.seconds(0) : options.taskDrainTime, + canContainersAccessInstanceRole: options.canContainersAccessInstanceRole ?? provider.canContainersAccessInstanceRole, }); this._capacityProviderNames.push(provider.capacityProviderName); @@ -1109,6 +1110,13 @@ export class AsgCapacityProvider extends CoreConstruct { */ readonly enableManagedTerminationProtection?: boolean; + /** + * Specifies whether the containers can access the container instance role. + * + * @default false + */ + readonly canContainersAccessInstanceRole?: boolean; + constructor(scope: Construct, id: string, props: AsgCapacityProviderProps) { super(scope, id); @@ -1116,6 +1124,8 @@ export class AsgCapacityProvider extends CoreConstruct { this.machineImageType = props.machineImageType ?? MachineImageType.AMAZON_LINUX_2; + this.canContainersAccessInstanceRole = props.canContainersAccessInstanceRole; + this.enableManagedTerminationProtection = props.enableManagedTerminationProtection === undefined ? true : props.enableManagedTerminationProtection; diff --git a/packages/@aws-cdk/aws-ecs/test/cluster.test.ts b/packages/@aws-cdk/aws-ecs/test/cluster.test.ts index d167c30989ded..45f9601728ef7 100644 --- a/packages/@aws-cdk/aws-ecs/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-ecs/test/cluster.test.ts @@ -2306,3 +2306,145 @@ test('throws when ASG Capacity Provider with capacityProviderName starting with cluster.addAsgCapacityProvider(capacityProviderAl2); }).toThrow(/Invalid Capacity Provider Name: ecscp, If a name is specified, it cannot start with aws, ecs, or fargate./); }); + +describe('Accessing container instance role', function () { + + const addUserDataMock = jest.fn(); + const autoScalingGroup: autoscaling.AutoScalingGroup = { + addUserData: addUserDataMock, + addToRolePolicy: jest.fn(), + protectNewInstancesFromScaleIn: jest.fn(), + } as unknown as autoscaling.AutoScalingGroup; + + afterEach(() => { + addUserDataMock.mockClear(); + }); + + test('block ecs from accessing metadata service when canContainersAccessInstanceRole not set', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'test'); + const cluster = new ecs.Cluster(stack, 'EcsCluster'); + + // WHEN + + const capacityProvider = new ecs.AsgCapacityProvider(stack, 'Provider', { + autoScalingGroup: autoScalingGroup, + }); + + cluster.addAsgCapacityProvider(capacityProvider); + + // THEN + expect(autoScalingGroup.addUserData).toHaveBeenCalledWith('sudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP'); + expect(autoScalingGroup.addUserData).toHaveBeenCalledWith('sudo service iptables save'); + expect(autoScalingGroup.addUserData).toHaveBeenCalledWith('echo ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config'); + }); + + test('allow ecs accessing metadata service when canContainersAccessInstanceRole is set on addAsgCapacityProvider', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'test'); + const cluster = new ecs.Cluster(stack, 'EcsCluster'); + + // WHEN + const capacityProvider = new ecs.AsgCapacityProvider(stack, 'Provider', { + autoScalingGroup: autoScalingGroup, + }); + + cluster.addAsgCapacityProvider(capacityProvider, { + canContainersAccessInstanceRole: true, + }); + + // THEN + expect(autoScalingGroup.addUserData).not.toHaveBeenCalledWith('sudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP'); + expect(autoScalingGroup.addUserData).not.toHaveBeenCalledWith('sudo service iptables save'); + expect(autoScalingGroup.addUserData).not.toHaveBeenCalledWith('echo ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config'); + }); + + test('allow ecs accessing metadata service when canContainersAccessInstanceRole is set on AsgCapacityProvider instantiation', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'test'); + const cluster = new ecs.Cluster(stack, 'EcsCluster'); + + // WHEN + const capacityProvider = new ecs.AsgCapacityProvider(stack, 'Provider', { + autoScalingGroup: autoScalingGroup, + canContainersAccessInstanceRole: true, + }); + + cluster.addAsgCapacityProvider(capacityProvider); + + // THEN + expect(autoScalingGroup.addUserData).not.toHaveBeenCalledWith('sudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP'); + expect(autoScalingGroup.addUserData).not.toHaveBeenCalledWith('sudo service iptables save'); + expect(autoScalingGroup.addUserData).not.toHaveBeenCalledWith('echo ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config'); + }); + + test('allow ecs accessing metadata service when canContainersAccessInstanceRole is set on constructor and method', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'test'); + const cluster = new ecs.Cluster(stack, 'EcsCluster'); + + // WHEN + const capacityProvider = new ecs.AsgCapacityProvider(stack, 'Provider', { + autoScalingGroup: autoScalingGroup, + canContainersAccessInstanceRole: true, + }); + + cluster.addAsgCapacityProvider(capacityProvider, { + canContainersAccessInstanceRole: true, + }); + + // THEN + expect(autoScalingGroup.addUserData).not.toHaveBeenCalledWith('sudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP'); + expect(autoScalingGroup.addUserData).not.toHaveBeenCalledWith('sudo service iptables save'); + expect(autoScalingGroup.addUserData).not.toHaveBeenCalledWith('echo ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config'); + }); + + test('block ecs from accessing metadata service when canContainersAccessInstanceRole set on constructor and not set on method', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'test'); + const cluster = new ecs.Cluster(stack, 'EcsCluster'); + + // WHEN + const capacityProvider = new ecs.AsgCapacityProvider(stack, 'Provider', { + autoScalingGroup: autoScalingGroup, + canContainersAccessInstanceRole: true, + }); + + cluster.addAsgCapacityProvider(capacityProvider, { + canContainersAccessInstanceRole: false, + }); + + // THEN + expect(autoScalingGroup.addUserData).toHaveBeenCalledWith('sudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP'); + expect(autoScalingGroup.addUserData).toHaveBeenCalledWith('sudo service iptables save'); + expect(autoScalingGroup.addUserData).toHaveBeenCalledWith('echo ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config'); + }); + + test('allow ecs accessing metadata service when canContainersAccessInstanceRole is not set on constructor and set on method', () => { + // GIVEN + const app = new cdk.App(); + const stack = new cdk.Stack(app, 'test'); + const cluster = new ecs.Cluster(stack, 'EcsCluster'); + + // WHEN + const capacityProvider = new ecs.AsgCapacityProvider(stack, 'Provider', { + autoScalingGroup: autoScalingGroup, + canContainersAccessInstanceRole: false, + }); + + cluster.addAsgCapacityProvider(capacityProvider, { + canContainersAccessInstanceRole: true, + }); + + // THEN + expect(autoScalingGroup.addUserData).not.toHaveBeenCalledWith('sudo iptables --insert FORWARD 1 --in-interface docker+ --destination 169.254.169.254/32 --jump DROP'); + expect(autoScalingGroup.addUserData).not.toHaveBeenCalledWith('sudo service iptables save'); + expect(autoScalingGroup.addUserData).not.toHaveBeenCalledWith('echo ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config'); + }); +}); + From f4439ceda079dd762ec30c6f4a893d6bcd7ed100 Mon Sep 17 00:00:00 2001 From: dafujii <41186511+dafujii@users.noreply.github.com> Date: Sat, 28 May 2022 10:26:48 +0900 Subject: [PATCH 07/23] fix(ecs): fix typo from fromServiceAtrributes to fromServiceAttributes (#20456) Fixed: #20458 I found `fromServiceAtrributes`. I fixed to `fromServiceAttributes` ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-ecs/lib/base/from-service-attributes.ts | 2 +- packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts | 6 +++--- packages/@aws-cdk/aws-ecs/lib/external/external-service.ts | 6 +++--- packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/@aws-cdk/aws-ecs/lib/base/from-service-attributes.ts b/packages/@aws-cdk/aws-ecs/lib/base/from-service-attributes.ts index 8dfc272300d41..7a9cbc0d28563 100644 --- a/packages/@aws-cdk/aws-ecs/lib/base/from-service-attributes.ts +++ b/packages/@aws-cdk/aws-ecs/lib/base/from-service-attributes.ts @@ -27,7 +27,7 @@ export interface ServiceAttributes { readonly serviceName?: string; } -export function fromServiceAtrributes(scope: Construct, id: string, attrs: ServiceAttributes): IBaseService { +export function fromServiceAttributes(scope: Construct, id: string, attrs: ServiceAttributes): IBaseService { if ((attrs.serviceArn && attrs.serviceName) || (!attrs.serviceArn && !attrs.serviceName)) { throw new Error('You can only specify either serviceArn or serviceName.'); } diff --git a/packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts b/packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts index eca66a4db6ff3..c24a1780c8b48 100644 --- a/packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts +++ b/packages/@aws-cdk/aws-ecs/lib/ec2/ec2-service.ts @@ -2,7 +2,7 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import { ArnFormat, Lazy, Resource, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { BaseService, BaseServiceOptions, DeploymentControllerType, IBaseService, IService, LaunchType } from '../base/base-service'; -import { fromServiceAtrributes } from '../base/from-service-attributes'; +import { fromServiceAttributes } from '../base/from-service-attributes'; import { NetworkMode, TaskDefinition } from '../base/task-definition'; import { ICluster } from '../cluster'; import { CfnService } from '../ecs.generated'; @@ -134,10 +134,10 @@ export class Ec2Service extends BaseService implements IEc2Service { } /** - * Imports from the specified service attrributes. + * Imports from the specified service attributes. */ public static fromEc2ServiceAttributes(scope: Construct, id: string, attrs: Ec2ServiceAttributes): IBaseService { - return fromServiceAtrributes(scope, id, attrs); + return fromServiceAttributes(scope, id, attrs); } private readonly constraints: CfnService.PlacementConstraintProperty[]; diff --git a/packages/@aws-cdk/aws-ecs/lib/external/external-service.ts b/packages/@aws-cdk/aws-ecs/lib/external/external-service.ts index 9bb1eaf0b8cef..ba3bb291d422b 100644 --- a/packages/@aws-cdk/aws-ecs/lib/external/external-service.ts +++ b/packages/@aws-cdk/aws-ecs/lib/external/external-service.ts @@ -5,7 +5,7 @@ import * as cloudmap from '@aws-cdk/aws-servicediscovery'; import { ArnFormat, Resource, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { AssociateCloudMapServiceOptions, BaseService, BaseServiceOptions, CloudMapOptions, DeploymentControllerType, EcsTarget, IBaseService, IEcsLoadBalancerTarget, IService, LaunchType, PropagatedTagSource } from '../base/base-service'; -import { fromServiceAtrributes } from '../base/from-service-attributes'; +import { fromServiceAttributes } from '../base/from-service-attributes'; import { ScalableTaskCount } from '../base/scalable-task-count'; import { Compatibility, LoadBalancerTargetOptions, TaskDefinition } from '../base/task-definition'; import { ICluster } from '../cluster'; @@ -79,10 +79,10 @@ export class ExternalService extends BaseService implements IExternalService { } /** - * Imports from the specified service attrributes. + * Imports from the specified service attributes. */ public static fromExternalServiceAttributes(scope: Construct, id: string, attrs: ExternalServiceAttributes): IBaseService { - return fromServiceAtrributes(scope, id, attrs); + return fromServiceAttributes(scope, id, attrs); } /** diff --git a/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts b/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts index b654c87887dda..a1ae858d0be61 100644 --- a/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts +++ b/packages/@aws-cdk/aws-ecs/lib/fargate/fargate-service.ts @@ -3,7 +3,7 @@ import * as cdk from '@aws-cdk/core'; import { ArnFormat } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { BaseService, BaseServiceOptions, DeploymentControllerType, IBaseService, IService, LaunchType } from '../base/base-service'; -import { fromServiceAtrributes } from '../base/from-service-attributes'; +import { fromServiceAttributes } from '../base/from-service-attributes'; import { TaskDefinition } from '../base/task-definition'; import { ICluster } from '../cluster'; @@ -111,10 +111,10 @@ export class FargateService extends BaseService implements IFargateService { } /** - * Imports from the specified service attrributes. + * Imports from the specified service attributes. */ public static fromFargateServiceAttributes(scope: Construct, id: string, attrs: FargateServiceAttributes): IBaseService { - return fromServiceAtrributes(scope, id, attrs); + return fromServiceAttributes(scope, id, attrs); } /** From 3a0077e5ebf8a146354e7f0be451ed4d973b2a38 Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Mon, 30 May 2022 02:46:20 -0700 Subject: [PATCH 08/23] docs(cfnspec): update CloudFormation documentation (#20540) --- .../spec-source/cfn-docs/cfn-docs.json | 56 ++++++++++++++++--- 1 file changed, 49 insertions(+), 7 deletions(-) diff --git a/packages/@aws-cdk/cfnspec/spec-source/cfn-docs/cfn-docs.json b/packages/@aws-cdk/cfnspec/spec-source/cfn-docs/cfn-docs.json index c99e5a9c1f3a7..65e4fda07bbc6 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/cfn-docs/cfn-docs.json +++ b/packages/@aws-cdk/cfnspec/spec-source/cfn-docs/cfn-docs.json @@ -14171,6 +14171,7 @@ }, "AWS::EC2::PlacementGroup": { "attributes": { + "GroupName": "", "Ref": "`Ref` returns the name of the placement group." }, "description": "Specifies a placement group in which to launch instances. The strategy of the placement group determines how the instances are organized within the group.\n\nA `cluster` placement group is a logical grouping of instances within a single Availability Zone that benefit from low network latency, high network throughput. A `spread` placement group places instances on distinct hardware. A `partition` placement group places groups of instances in different partitions, where instances in one partition do not share the same hardware with instances in another partition.\n\nFor more information, see [Placement Groups](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) in the *Amazon EC2 User Guide* .", @@ -14794,6 +14795,7 @@ }, "description": "Attaches a VPC to a transit gateway.\n\nIf you attach a VPC with a CIDR range that overlaps the CIDR range of a VPC that is already attached, the new VPC CIDR range is not propagated to the default propagation route table.\n\nTo send VPC traffic to an attached transit gateway, add a route to the VPC route table using [AWS::EC2::Route](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html) .", "properties": { + "Options": "", "SubnetIds": "The IDs of one or more subnets. You can specify only one subnet per Availability Zone. You must specify at least one subnet, but we recommend that you specify two subnets for better availability. The transit gateway uses one IP address from each specified subnet.", "Tags": "The tags for the attachment.", "TransitGatewayId": "The ID of the transit gateway.", @@ -15078,6 +15080,7 @@ }, "AWS::EC2::VPCPeeringConnection": { "attributes": { + "Id": "", "Ref": "`Ref` returns the ID of the VPC peering connection." }, "description": "Requests a VPC peering connection between two VPCs: a requester VPC that you own and an accepter VPC with which to create the connection. The accepter VPC can belong to another AWS account and can be in a different Region to the requester VPC.\n\nThe requester VPC and accepter VPC cannot have overlapping CIDR blocks. If you create a VPC peering connection request between VPCs with overlapping CIDR blocks, the VPC peering connection has a status of `failed` .\n\nFor more information, see [Walkthough: Peer with a VPC in another AWS account](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/peer-with-vpc-in-another-account.html) .", @@ -15781,7 +15784,7 @@ "attributes": {}, "description": "Information about the platform for the Amazon ECS service or task.\n\nFor more informataion about `RuntimePlatform` , see [RuntimePlatform](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#runtime-platform) in the *Amazon Elastic Container Service Developer Guide* .", "properties": { - "CpuArchitecture": "The CPU architecture.\n\nYou can run your Linux tasks on an ARM-based platform by setting the value to `ARM64` . This option is avaiable for tasks that run on Linuc Amazon EC2 instance or Linux containers on Fargate.", + "CpuArchitecture": "The CPU architecture.\n\nYou can run your Linux tasks on an ARM-based platform by setting the value to `ARM64` . This option is avaiable for tasks that run on Linux Amazon EC2 instance or Linux containers on Fargate.", "OperatingSystemFamily": "The operating system." } }, @@ -19501,7 +19504,7 @@ "description": "The `AWS::GameLift::Fleet` resource creates an Amazon GameLift (GameLift) fleet to host game servers. A fleet is a set of EC2 instances, each of which can host multiple game sessions.", "properties": { "BuildId": "A unique identifier for a build to be deployed on the new fleet. If you are deploying the fleet with a custom game build, you must specify this property. The build must have been successfully uploaded to Amazon GameLift and be in a `READY` status. This fleet setting cannot be changed once the fleet is created.", - "CertificateConfiguration": "Prompts GameLift to generate a TLS/SSL certificate for the fleet. TLS certificates are used for encrypting traffic between game clients and the game servers that are running on GameLift. By default, the `CertificateConfiguration` is set to `DISABLED` . This property cannot be changed after the fleet is created.\n\nNote: This feature requires the AWS Certificate Manager (ACM) service, which is not available in all AWS regions. When working in a region that does not support this feature, a fleet creation request with certificate generation fails with a 4xx error.", + "CertificateConfiguration": "Prompts GameLift to generate a TLS/SSL certificate for the fleet. GameLift uses the certificates to encrypt traffic between game clients and the game servers running on GameLift. By default, the `CertificateConfiguration` is `DISABLED` . You can't change this property after you create the fleet.\n\nAWS Certificate Manager (ACM) certificates expire after 13 months. Certificate expiration can cause fleets to fail, preventing players from connecting to instances in the fleet. We recommend you replace fleets before 13 months, consider using fleet aliases for a smooth transition.\n\n> ACM isn't available in all AWS regions. A fleet creation request with certificate generation enabled in an unsupported Region, fails with a 4xx error. For more information about the supported Regions, see [Supported Regions](https://docs.aws.amazon.com/acm/latest/userguide/acm-regions.html) in the *AWS Certificate Manager User Guide* .", "Description": "A human-readable description of the fleet.", "DesiredEC2Instances": "The number of EC2 instances that you want this fleet to host. When creating a new fleet, GameLift automatically sets this value to \"1\" and initiates a single instance. Once the fleet is active, update this value to trigger GameLift to add or remove instances from the fleet.", "EC2InboundPermissions": "The allowed IP address ranges and port settings that allow inbound traffic to access game sessions on this fleet. If the fleet is hosting a custom game build, this property must be set before players can connect to game sessions. For Realtime Servers fleets, GameLift automatically sets TCP and UDP ranges.", @@ -24499,6 +24502,7 @@ }, "description": "Creates an asset from an existing asset model. For more information, see [Creating assets](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/create-assets.html) in the *AWS IoT SiteWise User Guide* .", "properties": { + "AssetDescription": "", "AssetHierarchies": "A list of asset hierarchies that each contain a `hierarchyLogicalId` . A hierarchy specifies allowed parent/child asset relationships.", "AssetModelId": "The ID of the asset model from which to create the asset.", "AssetName": "A unique, friendly name for the asset.\n\nThe maximum length is 256 characters with the pattern `[^\\u0000-\\u001F\\u007F]+` .", @@ -34013,6 +34017,7 @@ "AdditionalTreatments": "An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.", "ApplicationId": "The unique identifier for the Amazon Pinpoint application that the campaign is associated with.", "CampaignHook": "Specifies the Lambda function to use as a code hook for a campaign.", + "CustomDeliveryConfiguration": "The delivery configuration settings for sending the treatment through a custom channel. This object is required if the `MessageConfiguration` object for the treatment specifies a `CustomMessage` object.", "Description": "A custom description of the campaign.", "HoldoutPercent": "The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.", "IsPaused": "Specifies whether to pause the campaign. A paused campaign doesn't run unless you resume it by changing this value to `false` . If you restart a campaign, the campaign restarts from the beginning and not at the point you paused it.", @@ -34024,6 +34029,7 @@ "SegmentId": "The unique identifier for the segment to associate with the campaign.", "SegmentVersion": "The version of the segment to associate with the campaign.", "Tags": "An array of key-value pairs to apply to this resource.\n\nFor more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .", + "TemplateConfiguration": "The message template to use for the treatment.", "TreatmentDescription": "A custom description of the default treatment for the campaign.", "TreatmentName": "A custom name of the default treatment for the campaign, if the campaign has multiple treatments. A *treatment* is a variation of a campaign that's used for A/B testing." } @@ -34036,6 +34042,13 @@ "Values": "The criteria values to use for the segment dimension. Depending on the value of the `AttributeType` property, endpoints are included or excluded from the segment if their attribute values match the criteria values." } }, + "AWS::Pinpoint::Campaign.CampaignCustomMessage": { + "attributes": {}, + "description": "Specifies the contents of a message that's sent through a custom channel to recipients of a campaign.", + "properties": { + "Data": "The raw, JSON-formatted string to use as the payload for the message. The maximum size is 5 KB." + } + }, "AWS::Pinpoint::Campaign.CampaignEmailMessage": { "attributes": {}, "description": "Specifies the content and \"From\" address for an email message that's sent to recipients of a campaign.", @@ -34084,6 +34097,14 @@ "TemplateId": "The template ID received from the regulatory body for sending SMS in your country." } }, + "AWS::Pinpoint::Campaign.CustomDeliveryConfiguration": { + "attributes": {}, + "description": "Specifies the delivery configuration settings for sending a campaign or campaign treatment through a custom channel. This object is required if you use the `CampaignCustomMessage` object to define the message to send for the campaign or campaign treatment.", + "properties": { + "DeliveryUri": "The destination to send the campaign or treatment to. This value can be one of the following:\n\n- The name or Amazon Resource Name (ARN) of an AWS Lambda function to invoke to handle delivery of the campaign or treatment.\n- The URL for a web application or service that supports HTTPS and can receive the message. The URL has to be a full URL, including the HTTPS protocol.", + "EndpointTypes": "The types of endpoints to send the campaign or treatment to. Each valid value maps to a type of channel that you can associate with an endpoint by using the `ChannelType` property of an endpoint." + } + }, "AWS::Pinpoint::Campaign.DefaultButtonConfiguration": { "attributes": {}, "description": "Specifies the default behavior for a button that appears in an in-app message. You can optionally add button configurations that specifically apply to iOS, Android, or web browser users.", @@ -34181,6 +34202,7 @@ "ADMMessage": "The message that the campaign sends through the ADM (Amazon Device Messaging) channel. If specified, this message overrides the default message.", "APNSMessage": "The message that the campaign sends through the APNs (Apple Push Notification service) channel. If specified, this message overrides the default message.", "BaiduMessage": "The message that the campaign sends through the Baidu (Baidu Cloud Push) channel. If specified, this message overrides the default message.", + "CustomMessage": "The message that the campaign sends through a custom channel, as specified by the delivery configuration ( `CustomDeliveryConfiguration` ) settings for the campaign. If specified, this message overrides the default message.", "DefaultMessage": "The default message that the campaign sends through all the channels that are configured for the campaign.", "EmailMessage": "The message that the campaign sends through the email channel. If specified, this message overrides the default message.", "GCMMessage": "The message that the campaign sends through the GCM channel, which enables Amazon Pinpoint to send push notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. If specified, this message overrides the default message.", @@ -34233,13 +34255,33 @@ "Values": "The criteria values to use for the segment dimension. Depending on the value of the `DimensionType` property, endpoints are included or excluded from the segment if their values match the criteria values." } }, + "AWS::Pinpoint::Campaign.Template": { + "attributes": {}, + "description": "Specifies the name and version of the message template to use for the message.", + "properties": { + "Name": "The name of the message template to use for the message. If specified, this value must match the name of an existing message template.", + "Version": "The unique identifier for the version of the message template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the Template Versions resource.\n\nIf you don't specify a value for this property, Amazon Pinpoint uses the *active version* of the template. The *active version* is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template." + } + }, + "AWS::Pinpoint::Campaign.TemplateConfiguration": { + "attributes": {}, + "description": "Specifies the message template to use for the message, for each type of channel.", + "properties": { + "EmailTemplate": "The email template to use for the message.", + "PushTemplate": "The push notification template to use for the message.", + "SMSTemplate": "The SMS template to use for the message.", + "VoiceTemplate": "The voice template to use for the message. This object isn't supported for campaigns." + } + }, "AWS::Pinpoint::Campaign.WriteTreatmentResource": { "attributes": {}, "description": "Specifies the settings for a campaign treatment. A *treatment* is a variation of a campaign that's used for A/B testing of a campaign.", "properties": { + "CustomDeliveryConfiguration": "The delivery configuration settings for sending the treatment through a custom channel. This object is required if the `MessageConfiguration` object for the treatment specifies a `CustomMessage` object.", "MessageConfiguration": "The message configuration settings for the treatment.", "Schedule": "The schedule settings for the treatment.", "SizePercent": "The allocated percentage of users (segment members) to send the treatment to.", + "TemplateConfiguration": "The message template to use for the treatment.", "TreatmentDescription": "A custom description of the treatment.", "TreatmentName": "A custom name for the treatment." } @@ -34751,8 +34793,8 @@ }, "description": "The `AWS::QLDB::Ledger` resource specifies a new Amazon Quantum Ledger Database (Amazon QLDB) ledger in your AWS account . Amazon QLDB is a fully managed ledger database that provides a transparent, immutable, and cryptographically verifiable transaction log owned by a central trusted authority. You can use QLDB to track all application data changes, and maintain a complete and verifiable history of changes over time.\n\nFor more information, see [CreateLedger](https://docs.aws.amazon.com/qldb/latest/developerguide/API_CreateLedger.html) in the *Amazon QLDB API Reference* .", "properties": { - "DeletionProtection": "The flag that prevents a ledger from being deleted by any user. If not provided on ledger creation, this feature is enabled ( `true` ) by default.\n\nIf deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the `UpdateLedger` operation to set the flag to `false` .", - "KmsKey": "The key in AWS Key Management Service ( AWS KMS ) to use for encryption of data at rest in the ledger. For more information, see [Encryption at rest](https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html) in the *Amazon QLDB Developer Guide* .\n\nUse one of the following options to specify this parameter:\n\n- `AWS_OWNED_KMS_KEY` : Use an AWS KMS key that is owned and managed by AWS on your behalf.\n- *Undefined* : By default, use an AWS owned KMS key.\n- *A valid symmetric customer managed KMS key* : Use the specified KMS key in your account that you create, own, and manage.\n\nAmazon QLDB does not support asymmetric keys. For more information, see [Using symmetric and asymmetric keys](https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) in the *AWS Key Management Service Developer Guide* .\n\nTo specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with `\"alias/\"` . To specify a key in a different AWS account , you must use the key ARN or alias ARN.\n\nFor example:\n\n- Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`\n- Key ARN: `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`\n- Alias name: `alias/ExampleAlias`\n- Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`\n\nFor more information, see [Key identifiers (KeyId)](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id) in the *AWS Key Management Service Developer Guide* .", + "DeletionProtection": "Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger creation, this feature is enabled ( `true` ) by default.\n\nIf deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the `UpdateLedger` operation to set the parameter to `false` .", + "KmsKey": "The key in AWS Key Management Service ( AWS KMS ) to use for encryption of data at rest in the ledger. For more information, see [Encryption at rest](https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html) in the *Amazon QLDB Developer Guide* .\n\nUse one of the following options to specify this parameter:\n\n- `AWS_OWNED_KMS_KEY` : Use an AWS KMS key that is owned and managed by AWS on your behalf.\n- *Undefined* : By default, use an AWS owned KMS key.\n- *A valid symmetric customer managed KMS key* : Use the specified symmetric encryption KMS key in your account that you create, own, and manage.\n\nAmazon QLDB does not support asymmetric keys. For more information, see [Using symmetric and asymmetric keys](https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) in the *AWS Key Management Service Developer Guide* .\n\nTo specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with `\"alias/\"` . To specify a key in a different AWS account , you must use the key ARN or alias ARN.\n\nFor example:\n\n- Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`\n- Key ARN: `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`\n- Alias name: `alias/ExampleAlias`\n- Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`\n\nFor more information, see [Key identifiers (KeyId)](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id) in the *AWS Key Management Service Developer Guide* .", "Name": "The name of the ledger that you want to create. The name must be unique among all of the ledgers in your AWS account in the current Region.\n\nNaming constraints for ledger names are defined in [Quotas in Amazon QLDB](https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming) in the *Amazon QLDB Developer Guide* .", "PermissionsMode": "The permissions mode to assign to the ledger that you want to create. This parameter can have one of the following values:\n\n- `ALLOW_ALL` : A legacy permissions mode that enables access control with API-level granularity for ledgers.\n\nThis mode allows users who have the `SendCommand` API permission for this ledger to run all PartiQL commands (hence, `ALLOW_ALL` ) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.\n- `STANDARD` : ( *Recommended* ) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands.\n\nBy default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the `SendCommand` API permission for the ledger. For information, see [Getting started with the standard permissions mode](https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html) in the *Amazon QLDB Developer Guide* .\n\n> We strongly recommend using the `STANDARD` permissions mode to maximize the security of your ledger data.", "Tags": "An array of key-value pairs to apply to this resource.\n\nFor more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) ." @@ -37844,8 +37886,8 @@ "NoncurrentVersionExpirationInDays": "(Deprecated.) For buckets with versioning enabled (or suspended), specifies the time, in days, between when a new version of the object is uploaded to the bucket and when old versions of the object expire. When object versions expire, Amazon S3 permanently deletes them. If you specify a transition and expiration time, the expiration time must be later than the transition time.", "NoncurrentVersionTransition": "(Deprecated.) For buckets with versioning enabled (or suspended), specifies when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the `NoncurrentVersionTransitions` property.", "NoncurrentVersionTransitions": "For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the `NoncurrentVersionTransition` property.", - "ObjectSizeGreaterThan": "Specifies the minimum object size in bytes for this rule to apply to. For more information about size based rules, see [Lifecycle configuration using size-based rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-configuration-examples.html#lc-size-rules) in the *Amazon S3 User Guide* .", - "ObjectSizeLessThan": "Specifies the maximum object size in bytes for this rule to apply to. For more information about sized based rules, see [Lifecycle configuration using size-based rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-configuration-examples.html#lc-size-rules) in the *Amazon S3 User Guide* .", + "ObjectSizeGreaterThan": "Specifies the minimum object size in bytes for this rule to apply to. Objects must be larger than this value in bytes. For more information about size based rules, see [Lifecycle configuration using size-based rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-configuration-examples.html#lc-size-rules) in the *Amazon S3 User Guide* .", + "ObjectSizeLessThan": "Specifies the maximum object size in bytes for this rule to apply to. Objects must be smaller than this value in bytes. For more information about sized based rules, see [Lifecycle configuration using size-based rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-configuration-examples.html#lc-size-rules) in the *Amazon S3 User Guide* .", "Prefix": "Object key prefix that identifies one or more objects to which this rule applies.\n\n> Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see [XML related object key constraints](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints) .", "Status": "If `Enabled` , the rule is currently being applied. If `Disabled` , the rule is not currently being applied.", "TagFilters": "Tags to use to identify a subset of objects to which the lifecycle rule applies.", @@ -37855,7 +37897,7 @@ }, "AWS::S3::Bucket.S3KeyFilter": { "attributes": {}, - "description": "A container for object key name prefix and suffix filtering rules.\n\n> The same type of filter rule cannot be used more than once. For example, you cannot specify two prefix rules.", + "description": "A container for object key name prefix and suffix filtering rules. For more information about object key name filtering, see [Configuring event notifications using object key name filtering](https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-filtering.html) in the *Amazon S3 User Guide* .\n\n> The same type of filter rule cannot be used more than once. For example, you cannot specify two prefix rules.", "properties": { "Rules": "A list of containers for the key-value pair that defines the criteria for the filter rule." } From d814293b8092d975977005b3e28a0a8ac4c6389f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 May 2022 11:11:10 +0000 Subject: [PATCH 09/23] chore(deps): Bump awscli from 1.24.5 to 1.24.10 in /packages/@aws-cdk/lambda-layer-awscli (#20542) Bumps [awscli](https://github.com/aws/aws-cli) from 1.24.5 to 1.24.10.
Changelog

Sourced from awscli's changelog.

1.24.10

  • api-change:appflow: Adding the following features/changes: Parquet output that preserves typing from the source connector, Failed executions threshold before deactivation for scheduled flows, increasing max size of access and refresh token from 2048 to 4096
  • api-change:sagemaker: Amazon SageMaker Notebook Instances now allows configuration of Instance Metadata Service version and Amazon SageMaker Studio now supports G5 instance types.
  • api-change:datasync: AWS DataSync now supports TLS encryption in transit, file system policies and access points for EFS locations.
  • api-change:emr-serverless: This release adds support for Amazon EMR Serverless, a serverless runtime environment that simplifies running analytics applications using the latest open source frameworks such as Apache Spark and Apache Hive.

1.24.9

  • api-change:ec2: C7g instances, powered by the latest generation AWS Graviton3 processors, provide the best price performance in Amazon EC2 for compute-intensive workloads.
  • api-change:emr-serverless: This release adds support for Amazon EMR Serverless, a serverless runtime environment that simplifies running analytics applications using the latest open source frameworks such as Apache Spark and Apache Hive.
  • api-change:forecast: Introduced a new field in Auto Predictor as Time Alignment Boundary. It helps in aligning the timestamps generated during Forecast exports
  • api-change:lightsail: Amazon Lightsail now supports the ability to configure a Lightsail Container Service to pull images from Amazon ECR private repositories in your account.

1.24.8

  • api-change:secretsmanager: Documentation updates for Secrets Manager
  • api-change:sagemaker: Amazon SageMaker Autopilot adds support for manually selecting features from the input dataset using the CreateAutoMLJob API.
  • api-change:apprunner: Documentation-only update added for CodeConfiguration.
  • api-change:apigateway: Documentation updates for Amazon API Gateway
  • api-change:fsx: This release adds root squash support to FSx for Lustre to restrict root level access from clients by mapping root users to a less-privileged user/group with limited permissions.
  • api-change:lookoutmetrics: Adding AthenaSourceConfig for MetricSet APIs to support Athena as a data source.
  • api-change:voice-id: VoiceID will now automatically expire Speakers if they haven't been accessed for Enrollment, Re-enrollment or Successful Auth for three years. The Speaker APIs now return a "LastAccessedAt" time for Speakers, and the EvaluateSession API returns "SPEAKER_EXPIRED" Auth Decision for EXPIRED Speakers.
  • api-change:cloudformation: Add a new parameter statusReason to DescribeStackSetOperation output for additional details

1.24.7

  • api-change:ec2: Stop Protection feature enables customers to protect their instances from accidental stop actions.
  • api-change:cognito-idp: Amazon Cognito now supports requiring attribute verification (ex. email and phone number) before update.
  • api-change:mediaconvert: AWS Elemental MediaConvert SDK has added support for rules that constrain Automatic-ABR rendition selection when generating ABR package ladders.
  • api-change:networkmanager: This release adds Multi Account API support for a TGW Global Network, to enable and disable AWSServiceAccess with AwsOrganizations for Network Manager service and dependency CloudFormation StackSets service.
  • api-change:ivschat: Doc-only update. For MessageReviewHandler structure, added timeout period in the description of the fallbackResult field

1.24.6

  • api-change:forecast: New APIs for Monitor that help you understand how your predictors perform over time.
  • api-change:elasticache: Added support for encryption in transit for Memcached clusters. Customers can now launch Memcached cluster with encryption in transit enabled when using Memcached version 1.6.12 or later.
  • api-change:personalize: Adding modelMetrics as part of DescribeRecommender API response for Personalize.
Commits
  • 61acbef Merge branch 'release-1.24.10'
  • fd11aff Bumping version to 1.24.10
  • 4db48c4 Update changelog based on model updates
  • c9cedb1 Merge pull request #3822 from mkrn/develop
  • 7f04197 Merge branch 'release-1.24.9'
  • faafcb1 Merge branch 'release-1.24.9' into develop
  • 4c24413 Bumping version to 1.24.9
  • 2db57f7 Update changelog based on model updates
  • d9f828c Add support for aws cloudformation package of AWS::AppSync::FunctionConfigura...
  • 20348b2 Merge pull request #4353 from yoshiken/delete_unused_variable
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=awscli&package-manager=pip&previous-version=1.24.5&new-version=1.24.10)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- packages/@aws-cdk/lambda-layer-awscli/layer/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/lambda-layer-awscli/layer/requirements.txt b/packages/@aws-cdk/lambda-layer-awscli/layer/requirements.txt index 4142bbbaacc8f..9b84c7758b66b 100644 --- a/packages/@aws-cdk/lambda-layer-awscli/layer/requirements.txt +++ b/packages/@aws-cdk/lambda-layer-awscli/layer/requirements.txt @@ -1 +1 @@ -awscli==1.24.5 +awscli==1.24.10 From cedfde8cb07eb879ee384bda93bba813ede91699 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Tue, 31 May 2022 16:32:21 +0200 Subject: [PATCH 10/23] fix(integ-runner): catch snapshot errors, treat `--from-file` as command-line (#20523) Snapshot errors --------------- The constructor of `IntegSnapshotRunner` calls `loadManifest()`, which on my computer happened to fail and stopped the entire test suite because this error happened outside the `try/catch` block. Same for the integ runner itself. Move it inside the try/catch block, needed a bit of refactoring to make sure we could still get at the test name. `--from-file` ------------- Instead of having `--from-file` require a JSON file with its own structure, interpret it as a text file which gets treated exactly the same as the `[TEST [..]]` arguments on the command line. This still allows for the `--exclude` behavior by setting that flag on the command-line. Also be very liberal on the pattern (file name or test name or display name) that we accept, encoded in the `IntegTest.matches()` class. Refactoring ----------- Moved the logic around determining test names and directories into a class (`IntegTest`) which is a convenience class on top of a static data record (`IntegTestInfo`). The split between data and logic is so that we can pass the data to worker threads where we can hydrate the helper class on top again. I tried to be consistent: in memory, all the fields are with respect to `process.cwd()`, so valid file paths in the current process. Only when they are passed to the CLI wrapper are the paths made relative to the CLI wrapper directory. Print snapshot validations that are running for a long time (1 minute). This helps diagnose what is stuck, if anything is. On my machine, it was tests using Docker because there was some issue with it, and this lost me a day. Also change the test reporting formatting slightly. -------------- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/integ-runner/lib/cli.ts | 26 +-- .../lib/runner/integ-test-runner.ts | 24 ++- .../lib/runner/integration-tests.ts | 154 ++++++++++++++---- .../integ-runner/lib/runner/runner-base.ts | 72 +++----- .../lib/runner/snapshot-test-runner.ts | 4 +- packages/@aws-cdk/integ-runner/lib/utils.ts | 58 +++++++ .../integ-runner/lib/workers/common.ts | 43 ++++- .../lib/workers/extract/extract_worker.ts | 72 ++++---- .../lib/workers/integ-snapshot-worker.ts | 21 ++- .../lib/workers/integ-test-worker.ts | 4 +- .../test/runner/integ-test-runner.test.ts | 92 +++++++---- .../test/runner/integration-tests.test.ts | 55 ------- .../test/runner/snapshot-test-runner.test.ts | 40 +++-- .../test/workers/integ-worker.test.ts | 60 +++---- .../test/workers/mock-extract_worker.ts | 4 +- .../test/workers/snapshot-worker.test.ts | 6 +- 16 files changed, 453 insertions(+), 282 deletions(-) diff --git a/packages/@aws-cdk/integ-runner/lib/cli.ts b/packages/@aws-cdk/integ-runner/lib/cli.ts index 6014d4997378a..148d5e456f21c 100644 --- a/packages/@aws-cdk/integ-runner/lib/cli.ts +++ b/packages/@aws-cdk/integ-runner/lib/cli.ts @@ -1,9 +1,10 @@ // Exercise all integ stacks and if they deploy, update the expected synth files +import { promises as fs } from 'fs'; import * as path from 'path'; import * as chalk from 'chalk'; import * as workerpool from 'workerpool'; import * as logger from './logger'; -import { IntegrationTests, IntegTestConfig } from './runner/integration-tests'; +import { IntegrationTests, IntegTestInfo, IntegTest } from './runner/integration-tests'; import { runSnapshotTests, runIntegrationTests, IntegRunnerMetrics, IntegTestWorkerConfig, DestructiveChange } from './workers'; // https://github.com/yargs/yargs/issues/1929 @@ -25,8 +26,8 @@ async function main() { .options('directory', { type: 'string', default: 'test', desc: 'starting directory to discover integration tests. Tests will be discovered recursively from this directory' }) .options('profiles', { type: 'array', desc: 'list of AWS profiles to use. Tests will be run in parallel across each profile+regions', nargs: 1, default: [] }) .options('max-workers', { type: 'number', desc: 'The max number of workerpool workers to use when running integration tests in parallel', default: 16 }) - .options('exclude', { type: 'boolean', desc: 'All tests should be run, except for the list of tests provided', default: false }) - .options('from-file', { type: 'string', desc: 'Import tests to include or exclude from a file' }) + .options('exclude', { type: 'boolean', desc: 'Run all tests in the directory, except the specified TESTs', default: false }) + .options('from-file', { type: 'string', desc: 'Read TEST names from a file (one TEST per line)' }) .option('inspect-failures', { type: 'boolean', desc: 'Keep the integ test cloud assembly if a failure occurs for inspection', default: false }) .option('disable-update-workflow', { type: 'boolean', default: false, desc: 'If this is "true" then the stack update workflow will be disabled' }) .strict() @@ -39,7 +40,7 @@ async function main() { // list of integration tests that will be executed const testsToRun: IntegTestWorkerConfig[] = []; const destructiveChanges: DestructiveChange[] = []; - const testsFromArgs: IntegTestConfig[] = []; + const testsFromArgs: IntegTest[] = []; const parallelRegions = arrayFromYargs(argv['parallel-regions']); const testRegions: string[] = parallelRegions ?? ['us-east-1', 'us-east-2', 'us-west-2']; const profiles = arrayFromYargs(argv.profiles); @@ -56,19 +57,18 @@ async function main() { try { if (argv.list) { const tests = await new IntegrationTests(argv.directory).fromCliArgs(); - process.stdout.write(tests.map(t => t.fileName).join('\n') + '\n'); + process.stdout.write(tests.map(t => t.discoveryRelativeFileName).join('\n') + '\n'); return; } if (argv._.length > 0 && fromFile) { throw new Error('A list of tests cannot be provided if "--from-file" is provided'); - } else if (argv._.length === 0 && !fromFile) { - testsFromArgs.push(...(await new IntegrationTests(path.resolve(argv.directory)).fromCliArgs())); - } else if (fromFile) { - testsFromArgs.push(...(await new IntegrationTests(path.resolve(argv.directory)).fromFile(path.resolve(fromFile)))); - } else { - testsFromArgs.push(...(await new IntegrationTests(path.resolve(argv.directory)).fromCliArgs(argv._.map((x: any) => x.toString()), exclude))); } + const requestedTests = fromFile + ? (await fs.readFile(fromFile, { encoding: 'utf8' })).split('\n').filter(x => x) + : (argv._.length > 0 ? argv._ : undefined); // 'undefined' means no request + + testsFromArgs.push(...(await new IntegrationTests(path.resolve(argv.directory)).fromCliArgs(requestedTests, exclude))); // always run snapshot tests, but if '--force' is passed then // run integration tests on all failed tests, not just those that @@ -85,7 +85,7 @@ async function main() { } else { // if any of the test failed snapshot tests, keep those results // and merge with the rest of the tests from args - testsToRun.push(...mergeTests(testsFromArgs, failedSnapshots)); + testsToRun.push(...mergeTests(testsFromArgs.map(t => t.info), failedSnapshots)); } // run integration tests if `--update-on-failed` OR `--force` is used @@ -174,7 +174,7 @@ function arrayFromYargs(xs: string[]): string[] | undefined { * tests that failed snapshot tests. The failed snapshot tests have additional * information that we want to keep so this should override any test from args */ -function mergeTests(testFromArgs: IntegTestConfig[], failedSnapshotTests: IntegTestWorkerConfig[]): IntegTestWorkerConfig[] { +function mergeTests(testFromArgs: IntegTestInfo[], failedSnapshotTests: IntegTestWorkerConfig[]): IntegTestWorkerConfig[] { const failedTestNames = new Set(failedSnapshotTests.map(test => test.fileName)); const final: IntegTestWorkerConfig[] = failedSnapshotTests; final.push(...testFromArgs.filter(test => !failedTestNames.has(test.fileName))); diff --git a/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts b/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts index 3c325d34c3700..fe1e6cadf1e61 100644 --- a/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts +++ b/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts @@ -72,7 +72,8 @@ export class IntegTestRunner extends IntegRunner { * all branches and we then search for one that starts with `HEAD branch: ` */ private checkoutSnapshot(): void { - const cwd = path.dirname(this.snapshotDir); + const cwd = this.directory; + // https://git-scm.com/docs/git-merge-base let baseBranch: string | undefined = undefined; // try to find the base branch that the working branch was created from @@ -98,17 +99,19 @@ export class IntegTestRunner extends IntegRunner { // if we found the base branch then get the merge-base (most recent common commit) // and checkout the snapshot using that commit if (baseBranch) { + const relativeSnapshotDir = path.relative(this.directory, this.snapshotDir); + try { const base = exec(['git', 'merge-base', 'HEAD', baseBranch], { cwd, }); - exec(['git', 'checkout', base, '--', this.relativeSnapshotDir], { + exec(['git', 'checkout', base, '--', relativeSnapshotDir], { cwd, }); } catch (e) { logger.warning('%s\n%s', `Could not checkout snapshot directory ${this.snapshotDir} using these commands: `, - `git merge-base HEAD ${baseBranch} && git checkout {merge-base} -- ${this.relativeSnapshotDir}`, + `git merge-base HEAD ${baseBranch} && git checkout {merge-base} -- ${relativeSnapshotDir}`, ); logger.warning('error: %s', e); } @@ -129,6 +132,9 @@ export class IntegTestRunner extends IntegRunner { public runIntegTestCase(options: RunOptions): AssertionResults | undefined { let assertionResults: AssertionResults | undefined; const actualTestCase = this.actualTestSuite.testSuite[options.testCaseName]; + if (!actualTestCase) { + throw new Error(`Did not find test case name '${options.testCaseName}' in '${Object.keys(this.actualTestSuite.testSuite)}'`); + } const clean = options.clean ?? true; const updateWorkflowEnabled = (options.updateWorkflow ?? true) && (actualTestCase.stackUpdateWorkflow ?? true); @@ -151,7 +157,7 @@ export class IntegTestRunner extends IntegRunner { this.cdk.synthFast({ execCmd: this.cdkApp.split(' '), env, - output: this.cdkOutDir, + output: path.relative(this.directory, this.cdkOutDir), }); } // only create the snapshot if there are no assertion assertion results @@ -170,7 +176,7 @@ export class IntegTestRunner extends IntegRunner { all: true, force: true, app: this.cdkApp, - output: this.cdkOutDir, + output: path.relative(this.directory, this.cdkOutDir), ...actualTestCase.cdkCommandOptions?.destroy?.args, context: this.getContext(actualTestCase.cdkCommandOptions?.destroy?.args?.context), }); @@ -241,7 +247,7 @@ export class IntegTestRunner extends IntegRunner { stacks: expectedTestCase.stacks, ...expectedTestCase?.cdkCommandOptions?.deploy?.args, context: this.getContext(expectedTestCase?.cdkCommandOptions?.deploy?.args?.context), - app: this.relativeSnapshotDir, + app: path.relative(this.directory, this.snapshotDir), lookups: this.expectedTestSuite?.enableLookups, }); } @@ -255,9 +261,9 @@ export class IntegTestRunner extends IntegRunner { ...actualTestCase.assertionStack ? [actualTestCase.assertionStack] : [], ], rollback: false, - output: this.cdkOutDir, + output: path.relative(this.directory, this.cdkOutDir), ...actualTestCase?.cdkCommandOptions?.deploy?.args, - ...actualTestCase.assertionStack ? { outputsFile: path.join(this.cdkOutDir, 'assertion-results.json') } : undefined, + ...actualTestCase.assertionStack ? { outputsFile: path.relative(this.directory, path.join(this.cdkOutDir, 'assertion-results.json')) } : undefined, context: this.getContext(actualTestCase?.cdkCommandOptions?.deploy?.args?.context), app: this.cdkApp, }); @@ -270,7 +276,7 @@ export class IntegTestRunner extends IntegRunner { if (actualTestCase.assertionStack) { return this.processAssertionResults( - path.join(this.directory, this.cdkOutDir, 'assertion-results.json'), + path.join(this.cdkOutDir, 'assertion-results.json'), actualTestCase.assertionStack, ); } diff --git a/packages/@aws-cdk/integ-runner/lib/runner/integration-tests.ts b/packages/@aws-cdk/integ-runner/lib/runner/integration-tests.ts index 98511a76daff8..ac139187c500a 100644 --- a/packages/@aws-cdk/integ-runner/lib/runner/integration-tests.ts +++ b/packages/@aws-cdk/integ-runner/lib/runner/integration-tests.ts @@ -1,22 +1,118 @@ import * as path from 'path'; import * as fs from 'fs-extra'; +const CDK_OUTDIR_PREFIX = 'cdk-integ.out'; + /** * Represents a single integration test + * + * This type is a data-only structure, so it can trivially be passed to workers. + * Derived attributes are calculated using the `IntegTest` class. */ -export interface IntegTestConfig { +export interface IntegTestInfo { /** - * The name of the file that contains the - * integration tests. This will be in the format - * of integ.{test-name}.js + * Path to the file to run + * + * Path is relative to the current working directory. */ readonly fileName: string; /** - * The base directory where the tests are - * discovered from + * The root directory we discovered this test from + * + * Path is relative to the current working directory. */ - readonly directory: string; + readonly discoveryRoot: string; +} + +/** + * Derived information for IntegTests + */ +export class IntegTest { + /** + * The name of the file to run + * + * Path is relative to the current working directory. + */ + public readonly fileName: string; + + /** + * Relative path to the file to run + * + * Relative from the "discovery root". + */ + public readonly discoveryRelativeFileName: string; + + /** + * The absolute path to the file + */ + public readonly absoluteFileName: string; + + /** + * Directory the test is in + */ + public readonly directory: string; + + /** + * Display name for the test + * + * Depends on the discovery directory. + * + * Looks like `integ.mytest` or `package/test/integ.mytest`. + */ + public readonly testName: string; + + /** + * Path of the snapshot directory for this test + */ + public readonly snapshotDir: string; + + /** + * Path to the temporary output directory for this test + */ + public readonly temporaryOutputDir: string; + + constructor(public readonly info: IntegTestInfo) { + this.absoluteFileName = path.resolve(info.fileName); + this.fileName = path.relative(process.cwd(), info.fileName); + + const parsed = path.parse(this.fileName); + this.discoveryRelativeFileName = path.relative(info.discoveryRoot, info.fileName); + this.directory = parsed.dir; + + // if we are running in a package directory then just use the fileName + // as the testname, but if we are running in a parent directory with + // multiple packages then use the directory/filename as the testname + // + // Looks either like `integ.mytest` or `package/test/integ.mytest`. + const relDiscoveryRoot = path.relative(process.cwd(), info.discoveryRoot); + this.testName = this.directory === path.join(relDiscoveryRoot, 'test') || this.directory === path.join(relDiscoveryRoot) + ? parsed.name + : path.join(path.relative(this.info.discoveryRoot, parsed.dir), parsed.name); + + const nakedTestName = parsed.name.slice(6); // Leave name without 'integ.' and '.ts' + this.snapshotDir = path.join(this.directory, `${nakedTestName}.integ.snapshot`); + this.temporaryOutputDir = path.join(this.directory, `${CDK_OUTDIR_PREFIX}.${nakedTestName}`); + } + + /** + * Whether this test matches the user-given name + * + * We are very lenient here. A name matches if it matches: + * + * - The CWD-relative filename + * - The discovery root-relative filename + * - The suite name + * - The absolute filename + */ + public matches(name: string) { + return [ + this.fileName, + this.discoveryRelativeFileName, + this.testName, + this.absoluteFileName, + ].includes(name); + } } /** @@ -49,7 +145,7 @@ export class IntegrationTests { * Takes a file name of a file that contains a list of test * to either run or exclude and returns a list of Integration Tests to run */ - public async fromFile(fileName: string): Promise { + public async fromFile(fileName: string): Promise { const file: IntegrationTestFileConfig = JSON.parse(fs.readFileSync(fileName, { encoding: 'utf-8' })); const foundTests = await this.discover(); @@ -65,32 +161,27 @@ export class IntegrationTests { * If they have provided a test name that we don't find, then we write out that error message. * - If it is a list of tests to exclude, then we discover all available tests and filter out the tests that were provided by the user. */ - private filterTests(discoveredTests: IntegTestConfig[], requestedTests?: string[], exclude?: boolean): IntegTestConfig[] { - if (!requestedTests || requestedTests.length === 0) { + private filterTests(discoveredTests: IntegTest[], requestedTests?: string[], exclude?: boolean): IntegTest[] { + if (!requestedTests) { return discoveredTests; } - const all = discoveredTests.map(x => { - return path.relative(x.directory, x.fileName); - }); - let foundAll = true; - // Pare down found tests to filter + + const allTests = discoveredTests.filter(t => { - if (exclude) { - return (!requestedTests.includes(path.relative(t.directory, t.fileName))); - } - return (requestedTests.includes(path.relative(t.directory, t.fileName))); + const matches = requestedTests.some(pattern => t.matches(pattern)); + return matches !== !!exclude; // Looks weird but is equal to (matches && !exclude) || (!matches && exclude) }); + // If not excluding, all patterns must have matched at least one test if (!exclude) { - const selectedNames = allTests.map(t => path.relative(t.directory, t.fileName)); - for (const unmatched of requestedTests.filter(t => !selectedNames.includes(t))) { + const unmatchedPatterns = requestedTests.filter(pattern => !discoveredTests.some(t => t.matches(pattern))); + for (const unmatched of unmatchedPatterns) { process.stderr.write(`No such integ test: ${unmatched}\n`); - foundAll = false; } - } - if (!foundAll) { - process.stderr.write(`Available tests: ${all.join(' ')}\n`); - return []; + if (unmatchedPatterns.length > 0) { + process.stderr.write(`Available tests: ${discoveredTests.map(t => t.discoveryRelativeFileName).join(' ')}\n`); + return []; + } } return allTests; @@ -99,8 +190,11 @@ export class IntegrationTests { /** * Takes an optional list of tests to look for, otherwise * it will look for all tests from the directory + * + * @param tests Tests to include or exclude, undefined means include all tests. + * @param exclude Whether the 'tests' list is inclusive or exclusive (inclusive by default). */ - public async fromCliArgs(tests?: string[], exclude?: boolean): Promise { + public async fromCliArgs(tests?: string[], exclude?: boolean): Promise { const discoveredTests = await this.discover(); const allTests = this.filterTests(discoveredTests, tests, exclude); @@ -108,14 +202,14 @@ export class IntegrationTests { return allTests; } - private async discover(): Promise { + private async discover(): Promise { const files = await this.readTree(); const integs = files.filter(fileName => path.basename(fileName).startsWith('integ.') && path.basename(fileName).endsWith('.js')); return this.request(integs); } - private request(files: string[]): IntegTestConfig[] { - return files.map(fileName => { return { directory: this.directory, fileName }; }); + private request(files: string[]): IntegTest[] { + return files.map(fileName => new IntegTest({ discoveryRoot: this.directory, fileName })); } private async readTree(): Promise { diff --git a/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts b/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts index 6ebdce2eea40c..1a74184078769 100644 --- a/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts +++ b/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts @@ -6,9 +6,9 @@ import * as fs from 'fs-extra'; import { flatten } from '../utils'; import { DestructiveChange } from '../workers/common'; import { IntegTestSuite, LegacyIntegTestSuite } from './integ-test-suite'; +import { IntegTest } from './integration-tests'; import { AssemblyManifestReader, ManifestTrace } from './private/cloud-assembly'; -const CDK_OUTDIR_PREFIX = 'cdk-integ.out'; const DESTRUCTIVE_CHANGES = '!!DESTRUCTIVE_CHANGES:'; /** @@ -16,16 +16,9 @@ const DESTRUCTIVE_CHANGES = '!!DESTRUCTIVE_CHANGES:'; */ export interface IntegRunnerOptions { /** - * The name of the file that contains the integration test - * This should be a JavaScript file + * Information about the test to run */ - readonly fileName: string, - - /** - * The base directory where the tests are - * discovered from. - */ - readonly directory: string, + readonly test: IntegTest; /** * The AWS profile to use when invoking the CDK CLI @@ -76,13 +69,10 @@ export abstract class IntegRunner { */ public readonly testName: string; - /** - * The path to the integration test file - */ - protected readonly sourceFilePath: string; - /** * The value used in the '--app' CLI parameter + * + * Path to the integ test source file, relative to `this.directory`. */ protected readonly cdkApp: string; @@ -92,11 +82,6 @@ export abstract class IntegRunner { */ protected readonly cdkContextPath: string; - /** - * The relative path from the cwd to the snapshot directory - */ - protected readonly relativeSnapshotDir: string; - /** * The test suite from the existing snapshot */ @@ -113,6 +98,11 @@ export abstract class IntegRunner { */ protected readonly directory: string; + /** + * The test to run + */ + protected readonly test: IntegTest; + /** * Default options to pass to the CDK CLI */ @@ -124,6 +114,8 @@ export abstract class IntegRunner { /** * The directory where the CDK will be synthed to + * + * Relative to cwd. */ protected readonly cdkOutDir: string; @@ -133,22 +125,10 @@ export abstract class IntegRunner { private legacyContext?: Record; constructor(options: IntegRunnerOptions) { - const parsed = path.parse(options.fileName); - this.directory = parsed.dir; - const testName = parsed.name.slice(6); - - // if we are running in a package directory then juse use the fileName - // as the testname, but if we are running in a parent directory with - // multiple packages then use the directory/filename as the testname - if (parsed.dir === 'test') { - this.testName = testName; - } else { - const relativePath = path.relative(options.directory, parsed.dir); - this.testName = `${relativePath ? relativePath + '/' : ''}${parsed.name}`; - } - this.snapshotDir = path.join(this.directory, `${testName}.integ.snapshot`); - this.relativeSnapshotDir = `${testName}.integ.snapshot`; - this.sourceFilePath = path.join(this.directory, parsed.base); + this.test = options.test; + this.directory = this.test.directory; + this.testName = this.test.testName; + this.snapshotDir = this.test.snapshotDir; this.cdkContextPath = path.join(this.directory, 'cdk.context.json'); this.cdk = options.cdk ?? new CdkCliWrapper({ @@ -157,8 +137,8 @@ export abstract class IntegRunner { ...options.env, }, }); - this.cdkOutDir = options.integOutDir ?? `${CDK_OUTDIR_PREFIX}.${testName}`; - this.cdkApp = `node ${parsed.base}`; + this.cdkOutDir = options.integOutDir ?? this.test.temporaryOutputDir; + this.cdkApp = `node ${path.relative(this.directory, this.test.fileName)}`; this.profile = options.profile; if (this.hasSnapshot()) { this.expectedTestSuite = this.loadManifest(); @@ -194,9 +174,9 @@ export abstract class IntegRunner { // use the "expected" context. This is only run in order to read the manifest CDK_CONTEXT_JSON: JSON.stringify(this.getContext(this.expectedTestSuite?.synthContext)), }, - output: this.cdkOutDir, + output: path.relative(this.directory, this.cdkOutDir), }); - return this.loadManifest(path.join(this.directory, this.cdkOutDir)); + return this.loadManifest(this.cdkOutDir); } /** @@ -221,22 +201,22 @@ export abstract class IntegRunner { const testCases = LegacyIntegTestSuite.fromLegacy({ cdk: this.cdk, testName: this.testName, - integSourceFilePath: this.sourceFilePath, + integSourceFilePath: this.test.fileName, listOptions: { ...this.defaultArgs, all: true, app: this.cdkApp, profile: this.profile, - output: this.cdkOutDir, + output: path.relative(this.directory, this.cdkOutDir), }, }); - this.legacyContext = LegacyIntegTestSuite.getPragmaContext(this.sourceFilePath); + this.legacyContext = LegacyIntegTestSuite.getPragmaContext(this.test.fileName); return testCases; } } protected cleanup(): void { - const cdkOutPath = path.join(this.directory, this.cdkOutDir); + const cdkOutPath = this.cdkOutDir; if (fs.existsSync(cdkOutPath)) { fs.removeSync(cdkOutPath); } @@ -330,10 +310,10 @@ export abstract class IntegRunner { ...DEFAULT_SYNTH_OPTIONS.env, CDK_CONTEXT_JSON: JSON.stringify(this.getContext()), }, - output: this.relativeSnapshotDir, + output: path.relative(this.directory, this.snapshotDir), }); } else { - fs.moveSync(path.join(this.directory, this.cdkOutDir), this.snapshotDir, { overwrite: true }); + fs.moveSync(this.cdkOutDir, this.snapshotDir, { overwrite: true }); } this.cleanupSnapshot(); diff --git a/packages/@aws-cdk/integ-runner/lib/runner/snapshot-test-runner.ts b/packages/@aws-cdk/integ-runner/lib/runner/snapshot-test-runner.ts index e7c95beff0a56..956d392cbea2a 100644 --- a/packages/@aws-cdk/integ-runner/lib/runner/snapshot-test-runner.ts +++ b/packages/@aws-cdk/integ-runner/lib/runner/snapshot-test-runner.ts @@ -47,11 +47,11 @@ export class IntegSnapshotRunner extends IntegRunner { this.cdk.synthFast({ execCmd: this.cdkApp.split(' '), env, - output: this.cdkOutDir, + output: path.relative(this.directory, this.cdkOutDir), }); // read the "actual" snapshot - const actualDir = path.join(this.directory, this.cdkOutDir); + const actualDir = this.cdkOutDir; const actualStacks = this.readAssembly(actualDir); // only diff stacks that are part of the test case const actualStacksToDiff: Record = {}; diff --git a/packages/@aws-cdk/integ-runner/lib/utils.ts b/packages/@aws-cdk/integ-runner/lib/utils.ts index 4eaef31727867..74e5eb2154ae7 100644 --- a/packages/@aws-cdk/integ-runner/lib/utils.ts +++ b/packages/@aws-cdk/integ-runner/lib/utils.ts @@ -40,3 +40,61 @@ export function flatten(xs: T[][]): T[] { export function chain(commands: string[]): string { return commands.filter(c => !!c).join(' && '); } + + +/** + * A class holding a set of items which are being crossed off in time + * + * If it takes too long to cross off a new item, print the list. + */ +export class WorkList { + private readonly remaining = new Set(this.items); + private readonly timeout: number; + private timer?: NodeJS.Timeout; + + constructor(private readonly items: A[], private readonly options: WorkListOptions = {}) { + this.timeout = options.timeout ?? 60_000; + this.scheduleTimer(); + } + + public crossOff(item: A) { + this.remaining.delete(item); + this.stopTimer(); + if (this.remaining.size > 0) { + this.scheduleTimer(); + } + } + + public done() { + this.remaining.clear(); + } + + private stopTimer() { + if (this.timer) { + clearTimeout(this.timer); + this.timer = undefined; + } + } + + private scheduleTimer() { + this.timer = setTimeout(() => this.report(), this.timeout); + } + + private report() { + this.options.onTimeout?.(this.remaining); + } +} + +export interface WorkListOptions { + /** + * When to reply with remaining items + * + * @default 60000 + */ + readonly timeout?: number; + + /** + * Function to call when timeout hits + */ + readonly onTimeout?: (x: Set) => void; +} \ No newline at end of file diff --git a/packages/@aws-cdk/integ-runner/lib/workers/common.ts b/packages/@aws-cdk/integ-runner/lib/workers/common.ts index 9b10c6b195f93..0ceb3bfa5786e 100644 --- a/packages/@aws-cdk/integ-runner/lib/workers/common.ts +++ b/packages/@aws-cdk/integ-runner/lib/workers/common.ts @@ -2,7 +2,7 @@ import { format } from 'util'; import { ResourceImpact } from '@aws-cdk/cloudformation-diff'; import * as chalk from 'chalk'; import * as logger from '../logger'; -import { IntegTestConfig } from '../runner/integration-tests'; +import { IntegTestInfo } from '../runner/integration-tests'; /** * The aggregate results from running assertions on a test case @@ -28,7 +28,7 @@ export interface AssertionResult { /** * Config for an integration test */ -export interface IntegTestWorkerConfig extends IntegTestConfig { +export interface IntegTestWorkerConfig extends IntegTestInfo { /** * A list of any destructive changes * @@ -112,7 +112,7 @@ export interface IntegBatchResponse { /** * List of failed tests */ - readonly failedTests: IntegTestConfig[]; + readonly failedTests: IntegTestInfo[]; /** * List of Integration test metrics. Each entry in the @@ -178,12 +178,22 @@ export enum DiagnosticReason { */ TEST_FAILED = 'TEST_FAILED', + /** + * There was an error running the integration test + */ + TEST_ERROR = 'TEST_ERROR', + /** * The snapshot test failed because the actual * snapshot was different than the expected snapshot */ SNAPSHOT_FAILED = 'SNAPSHOT_FAILED', + /** + * The snapshot test failed because there was an error executing it + */ + SNAPSHOT_ERROR = 'SNAPSHOT_ERROR', + /** * The snapshot test succeeded */ @@ -255,24 +265,39 @@ export function formatAssertionResults(results: AssertionResults): string { export function printResults(diagnostic: Diagnostic): void { switch (diagnostic.reason) { case DiagnosticReason.SNAPSHOT_SUCCESS: - logger.success(' %s No Change! %s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`)); + logger.success(' UNCHANGED %s %s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`)); break; case DiagnosticReason.TEST_SUCCESS: - logger.success(' %s Test Succeeded! %s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`)); + logger.success(' SUCCESS %s %s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`)); break; case DiagnosticReason.NO_SNAPSHOT: - logger.error(' %s - No Snapshot! %s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`)); + logger.error(' NEW %s %s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`)); break; case DiagnosticReason.SNAPSHOT_FAILED: - logger.error(' %s - Snapshot changed! %s\n%s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`), diagnostic.message); + logger.error(' CHANGED %s %s\n %s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`), diagnostic.message); + break; + case DiagnosticReason.SNAPSHOT_ERROR: + case DiagnosticReason.TEST_ERROR: + logger.error(' ERROR %s %s\n %s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`), diagnostic.message); break; case DiagnosticReason.TEST_FAILED: - logger.error(' %s - Failed! %s\n%s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`), diagnostic.message); + logger.error(' FAILED %s %s\n %s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`), diagnostic.message); break; case DiagnosticReason.ASSERTION_FAILED: - logger.error(' %s - Assertions Failed! %s\n%s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`), diagnostic.message); + logger.error(' ASSERT %s %s\n %s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`), diagnostic.message); + break; } for (const addl of diagnostic.additionalMessages ?? []) { logger.print(` ${addl}`); } } + +export function printLaggards(testNames: Set) { + const parts = [ + ' ', + `Waiting for ${testNames.size} more`, + testNames.size < 10 ? ['(', Array.from(testNames).join(', '), ')'].join('') : '', + ]; + + logger.print(chalk.grey(parts.filter(x => x).join(' '))); +} \ No newline at end of file diff --git a/packages/@aws-cdk/integ-runner/lib/workers/extract/extract_worker.ts b/packages/@aws-cdk/integ-runner/lib/workers/extract/extract_worker.ts index 957341647e90f..595dc3a323172 100644 --- a/packages/@aws-cdk/integ-runner/lib/workers/extract/extract_worker.ts +++ b/packages/@aws-cdk/integ-runner/lib/workers/extract/extract_worker.ts @@ -1,6 +1,6 @@ import * as workerpool from 'workerpool'; import { IntegSnapshotRunner, IntegTestRunner } from '../../runner'; -import { IntegTestConfig } from '../../runner/integration-tests'; +import { IntegTest, IntegTestInfo } from '../../runner/integration-tests'; import { DiagnosticReason, IntegTestWorkerConfig, SnapshotVerificationOptions, Diagnostic, formatAssertionResults } from '../common'; import { IntegTestBatchRequest } from '../integ-test-worker'; @@ -13,20 +13,22 @@ import { IntegTestBatchRequest } from '../integ-test-worker'; * If the tests succeed it will then save the snapshot */ export function integTestWorker(request: IntegTestBatchRequest): IntegTestWorkerConfig[] { - const failures: IntegTestConfig[] = []; - for (const test of request.tests) { - const runner = new IntegTestRunner({ - directory: test.directory, - fileName: test.fileName, - profile: request.profile, - env: { - AWS_REGION: request.region, - }, - }, test.destructiveChanges); - + const failures: IntegTestInfo[] = []; + for (const testInfo of request.tests) { + const test = new IntegTest(testInfo); // Hydrate from data const start = Date.now(); - const tests = runner.actualTests(); + try { + const runner = new IntegTestRunner({ + test, + profile: request.profile, + env: { + AWS_REGION: request.region, + }, + }, testInfo.destructiveChanges); + + const tests = runner.actualTests(); + if (!tests || Object.keys(tests).length === 0) { throw new Error(`No tests defined for ${runner.testName}`); } @@ -39,7 +41,7 @@ export function integTestWorker(request: IntegTestBatchRequest): IntegTestWorker updateWorkflow: request.updateWorkflow, }); if (results) { - failures.push(test); + failures.push(testInfo); workerpool.workerEmit({ reason: DiagnosticReason.ASSERTION_FAILED, testName: `${runner.testName}-${testCaseName} (${request.profile}/${request.region})`, @@ -55,7 +57,7 @@ export function integTestWorker(request: IntegTestBatchRequest): IntegTestWorker }); } } catch (e) { - failures.push(test); + failures.push(testInfo); workerpool.workerEmit({ reason: DiagnosticReason.TEST_FAILED, testName: `${runner.testName}-${testCaseName} (${request.profile}/${request.region})`, @@ -65,11 +67,11 @@ export function integTestWorker(request: IntegTestBatchRequest): IntegTestWorker } } } catch (e) { - failures.push(test); + failures.push(testInfo); workerpool.workerEmit({ - reason: DiagnosticReason.TEST_FAILED, - testName: `${test.fileName} (${request.profile}/${request.region})`, - message: `Integration test failed: ${e}`, + reason: DiagnosticReason.TEST_ERROR, + testName: `${testInfo.fileName} (${request.profile}/${request.region})`, + message: `Error during integration test: ${e}`, duration: (Date.now() - start) / 1000, }); } @@ -84,19 +86,30 @@ export function integTestWorker(request: IntegTestBatchRequest): IntegTestWorker * if there is an existing snapshot, and if there is will * check if there are any changes */ -export function snapshotTestWorker(test: IntegTestConfig, options: SnapshotVerificationOptions = {}): IntegTestWorkerConfig[] { +export function snapshotTestWorker(testInfo: IntegTestInfo, options: SnapshotVerificationOptions = {}): IntegTestWorkerConfig[] { const failedTests = new Array(); - const runner = new IntegSnapshotRunner({ fileName: test.fileName, directory: test.directory }); const start = Date.now(); + const test = new IntegTest(testInfo); // Hydrate the data record again + + const timer = setTimeout(() => { + workerpool.workerEmit({ + reason: DiagnosticReason.SNAPSHOT_ERROR, + testName: test.testName, + message: 'Test is taking a very long time', + duration: (Date.now() - start) / 1000, + }); + }, 60_000); + try { + const runner = new IntegSnapshotRunner({ test }); if (!runner.hasSnapshot()) { workerpool.workerEmit({ reason: DiagnosticReason.NO_SNAPSHOT, - testName: runner.testName, + testName: test.testName, message: 'No Snapshot', duration: (Date.now() - start) / 1000, }); - failedTests.push(test); + failedTests.push(test.info); } else { const { diagnostics, destructiveChanges } = runner.testSnapshot(options); if (diagnostics.length > 0) { @@ -105,27 +118,28 @@ export function snapshotTestWorker(test: IntegTestConfig, options: SnapshotVerif duration: (Date.now() - start) / 1000, } as Diagnostic)); failedTests.push({ - fileName: test.fileName, - directory: test.directory, + ...test.info, destructiveChanges, }); } else { workerpool.workerEmit({ reason: DiagnosticReason.SNAPSHOT_SUCCESS, - testName: runner.testName, + testName: test.testName, message: 'Success', duration: (Date.now() - start) / 1000, } as Diagnostic); } } } catch (e) { - failedTests.push(test); + failedTests.push(test.info); workerpool.workerEmit({ message: e.message, - testName: runner.testName, - reason: DiagnosticReason.SNAPSHOT_FAILED, + testName: test.testName, + reason: DiagnosticReason.SNAPSHOT_ERROR, duration: (Date.now() - start) / 1000, } as Diagnostic); + } finally { + clearTimeout(timer); } return failedTests; diff --git a/packages/@aws-cdk/integ-runner/lib/workers/integ-snapshot-worker.ts b/packages/@aws-cdk/integ-runner/lib/workers/integ-snapshot-worker.ts index 1ff88e6cba5d6..072b6c28544b4 100644 --- a/packages/@aws-cdk/integ-runner/lib/workers/integ-snapshot-worker.ts +++ b/packages/@aws-cdk/integ-runner/lib/workers/integ-snapshot-worker.ts @@ -1,8 +1,8 @@ import * as workerpool from 'workerpool'; import * as logger from '../logger'; -import { IntegTestConfig } from '../runner/integration-tests'; -import { flatten } from '../utils'; -import { printSummary, printResults, IntegTestWorkerConfig, SnapshotVerificationOptions } from './common'; +import { IntegTest } from '../runner/integration-tests'; +import { flatten, WorkList } from '../utils'; +import { printSummary, printResults, IntegTestWorkerConfig, SnapshotVerificationOptions, printLaggards } from './common'; /** * Run Snapshot tests @@ -11,19 +11,28 @@ import { printSummary, printResults, IntegTestWorkerConfig, SnapshotVerification */ export async function runSnapshotTests( pool: workerpool.WorkerPool, - tests: IntegTestConfig[], + tests: IntegTest[], options: SnapshotVerificationOptions, ): Promise { logger.highlight('\nVerifying integration test snapshots...\n'); + const todo = new WorkList(tests.map(t => t.testName), { + onTimeout: printLaggards, + }); + const failedTests: IntegTestWorkerConfig[][] = await Promise.all( - tests.map((test) => pool.exec('snapshotTestWorker', [test, options], { - on: printResults, + tests.map((test) => pool.exec('snapshotTestWorker', [test.info /* Dehydrate class -> data */, options], { + on: (x) => { + todo.crossOff(x.testName); + printResults(x); + }, })), ); + todo.done(); const testsToRun = flatten(failedTests); logger.highlight('\nSnapshot Results: \n'); printSummary(tests.length, testsToRun.length); return testsToRun; + } diff --git a/packages/@aws-cdk/integ-runner/lib/workers/integ-test-worker.ts b/packages/@aws-cdk/integ-runner/lib/workers/integ-test-worker.ts index 9c6b4fb2465c6..8ce8fb658b5d5 100644 --- a/packages/@aws-cdk/integ-runner/lib/workers/integ-test-worker.ts +++ b/packages/@aws-cdk/integ-runner/lib/workers/integ-test-worker.ts @@ -1,6 +1,6 @@ import * as workerpool from 'workerpool'; import * as logger from '../logger'; -import { IntegTestConfig } from '../runner/integration-tests'; +import { IntegTestInfo } from '../runner/integration-tests'; import { flatten } from '../utils'; import { printResults, printSummary, IntegBatchResponse, IntegTestOptions, IntegRunnerMetrics } from './common'; @@ -127,7 +127,7 @@ export async function runIntegrationTestsInParallel( if (!test) break; const testStart = Date.now(); logger.highlight(`Running test ${test.fileName} in ${worker.profile ? worker.profile + '/' : ''}${worker.region}`); - const response: IntegTestConfig[][] = await options.pool.exec('integTestWorker', [{ + const response: IntegTestInfo[][] = await options.pool.exec('integTestWorker', [{ region: worker.region, profile: worker.profile, tests: [test], diff --git a/packages/@aws-cdk/integ-runner/test/runner/integ-test-runner.test.ts b/packages/@aws-cdk/integ-runner/test/runner/integ-test-runner.test.ts index db4c4a434554d..c2b0987c3ba2b 100644 --- a/packages/@aws-cdk/integ-runner/test/runner/integ-test-runner.test.ts +++ b/packages/@aws-cdk/integ-runner/test/runner/integ-test-runner.test.ts @@ -3,7 +3,7 @@ import { Manifest } from '@aws-cdk/cloud-assembly-schema'; import { AVAILABILITY_ZONE_FALLBACK_CONTEXT_KEY } from '@aws-cdk/cx-api'; import { SynthFastOptions, DestroyOptions, ListOptions, SynthOptions, DeployOptions } from 'cdk-cli-wrapper'; import * as fs from 'fs-extra'; -import { IntegTestRunner } from '../../lib/runner'; +import { IntegTestRunner, IntegTest } from '../../lib/runner'; import { MockCdkProvider } from '../helpers'; let cdkMock: MockCdkProvider; @@ -55,8 +55,10 @@ describe('IntegTest runIntegTests', () => { // WHEN const integTest = new IntegTestRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.test-with-snapshot.js', - directory: 'test/test-data', + test: new IntegTest({ + fileName: 'test/test-data/integ.test-with-snapshot.js', + discoveryRoot: 'test/test-data', + }), }); integTest.runIntegTestCase({ testCaseName: 'integ.test-with-snapshot', @@ -107,8 +109,10 @@ describe('IntegTest runIntegTests', () => { // WHEN const integTest = new IntegTestRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.integ-test1.js', - directory: 'test/test-data', + test: new IntegTest({ + fileName: 'test/test-data/integ.integ-test1.js', + discoveryRoot: 'test/test-data', + }), }); integTest.runIntegTestCase({ testCaseName: 'integ.integ-test1', @@ -149,8 +153,10 @@ describe('IntegTest runIntegTests', () => { // WHEN const integTest = new IntegTestRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.test-with-snapshot-assets-diff.js', - directory: 'test/test-data', + test: new IntegTest({ + fileName: 'test/test-data/integ.test-with-snapshot-assets-diff.js', + discoveryRoot: 'test/test-data', + }), }); integTest.runIntegTestCase({ testCaseName: 'integ.test-with-snapshot-assets-diff', @@ -206,8 +212,10 @@ describe('IntegTest runIntegTests', () => { // WHEN const integTest = new IntegTestRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.integ-test1.js', - directory: 'test/test-data', + test: new IntegTest({ + fileName: 'test/test-data/integ.integ-test1.js', + discoveryRoot: 'test/test-data', + }), }); integTest.runIntegTestCase({ testCaseName: 'integ.integ-test1', @@ -224,8 +232,10 @@ describe('IntegTest runIntegTests', () => { // WHEN const integTest = new IntegTestRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.integ-test1.js', - directory: 'test/test-data', + test: new IntegTest({ + fileName: 'test/test-data/integ.integ-test1.js', + discoveryRoot: 'test/test-data', + }), }); integTest.runIntegTestCase({ testCaseName: 'integ.integ-test1', @@ -242,8 +252,10 @@ describe('IntegTest runIntegTests', () => { // WHEN const integTest = new IntegTestRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.integ-test1.js', - directory: 'test', + test: new IntegTest({ + fileName: 'test/test-data/integ.integ-test1.js', + discoveryRoot: 'test', + }), }); // THEN @@ -261,8 +273,10 @@ describe('IntegTest runIntegTests', () => { // WHEN new IntegTestRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.integ-test1.js', - directory: 'test/test-data', + test: new IntegTest({ + fileName: 'test/test-data/integ.integ-test1.js', + discoveryRoot: 'test/test-data', + }), }); // THEN @@ -280,8 +294,10 @@ describe('IntegTest runIntegTests', () => { // WHEN const integTest = new IntegTestRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.integ-test2.js', - directory: 'test', + test: new IntegTest({ + fileName: 'test/test-data/integ.integ-test2.js', + discoveryRoot: 'test', + }), }); // THEN @@ -307,9 +323,11 @@ describe('IntegTest runIntegTests', () => { // WHEN const integTest = new IntegTestRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.integ-test1.js', + test: new IntegTest({ + fileName: 'test/test-data/integ.integ-test1.js', + discoveryRoot: 'test/test-data', + }), profile: 'test-profile', - directory: 'test/test-data', }); integTest.runIntegTestCase({ testCaseName: 'integ.integ-test1', @@ -348,8 +366,10 @@ describe('IntegTest runIntegTests', () => { test('with hooks', () => { const integTest = new IntegTestRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.test-with-snapshot-assets.js', - directory: 'test/test-data', + test: new IntegTest({ + fileName: 'test/test-data/integ.test-with-snapshot-assets.js', + discoveryRoot: 'test/test-data', + }), }); integTest.runIntegTestCase({ testCaseName: 'integ.test-with-snapshot-assets', @@ -393,8 +413,10 @@ describe('IntegTest runIntegTests', () => { // WHEN const integTest = new IntegTestRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.test-with-snapshot.js', - directory: 'test/test-data', + test: new IntegTest({ + fileName: 'test/test-data/integ.test-with-snapshot.js', + discoveryRoot: 'test/test-data', + }), }); integTest.runIntegTestCase({ testCaseName: 'integ.test-with-snapshot', @@ -429,8 +451,10 @@ describe('IntegTest runIntegTests', () => { // WHEN const integTest = new IntegTestRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.test-with-snapshot.js', - directory: 'test/test-data', + test: new IntegTest({ + fileName: 'test/test-data/integ.test-with-snapshot.js', + discoveryRoot: 'test/test-data', + }), }); integTest.runIntegTestCase({ testCaseName: 'integ.test-with-snapshot', @@ -466,8 +490,10 @@ describe('IntegTest runIntegTests', () => { // WHEN const integTest = new IntegTestRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.test-with-snapshot.js', - directory: 'test/test-data', + test: new IntegTest({ + fileName: 'test/test-data/integ.test-with-snapshot.js', + discoveryRoot: 'test/test-data', + }), }); integTest.runIntegTestCase({ testCaseName: 'integ.test-with-snapshot', @@ -484,8 +510,10 @@ describe('IntegTest runIntegTests', () => { test('with assets manifest, assets are removed if stackUpdateWorkflow is disabled', () => { const integTest = new IntegTestRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.test-with-snapshot-assets.js', - directory: 'test/test-data', + test: new IntegTest({ + fileName: 'test/test-data/integ.test-with-snapshot-assets.js', + discoveryRoot: 'test/test-data', + }), }); integTest.runIntegTestCase({ testCaseName: 'integ.test-with-snapshot-assets', @@ -503,8 +531,10 @@ describe('IntegTest runIntegTests', () => { test('with assembly manifest, assets are removed if stackUpdateWorkflow is disabled', () => { const integTest = new IntegTestRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.test-with-snapshot-assets-diff.js', - directory: 'test/test-data', + test: new IntegTest({ + fileName: 'test/test-data/integ.test-with-snapshot-assets-diff.js', + discoveryRoot: 'test/test-data', + }), }); integTest.runIntegTestCase({ testCaseName: 'integ.test-with-snapshot-assets-diff', diff --git a/packages/@aws-cdk/integ-runner/test/runner/integration-tests.test.ts b/packages/@aws-cdk/integ-runner/test/runner/integration-tests.test.ts index 1185f848a232a..22b796b9fe52e 100644 --- a/packages/@aws-cdk/integ-runner/test/runner/integration-tests.test.ts +++ b/packages/@aws-cdk/integ-runner/test/runner/integration-tests.test.ts @@ -2,8 +2,6 @@ import * as mockfs from 'mock-fs'; import { IntegrationTests } from '../../lib/runner/integration-tests'; describe('IntegrationTests', () => { - const testsFile = '/tmp/foo/bar/does/not/exist/tests.json'; - const testsFileExclude = '/tmp/foo/bar/does/not/exist/tests-exclude.json'; const tests = new IntegrationTests('test'); let stderrMock: jest.SpyInstance; stderrMock = jest.spyOn(process.stderr, 'write').mockImplementation(() => { return true; }); @@ -14,17 +12,6 @@ describe('IntegrationTests', () => { 'integ.integ-test2.js': 'content', 'integ.integ-test3.js': 'content', }, - [testsFileExclude]: JSON.stringify({ - exclude: true, - tests: [ - 'test-data/integ.integ-test1.js', - ], - }), - [testsFile]: JSON.stringify({ - tests: [ - 'test-data/integ.integ-test1.js', - ], - }), }); }); @@ -60,46 +47,4 @@ describe('IntegrationTests', () => { 'test/test-data/integ.integ-test1.js', ); }); - - test('from file', async () => { - const integTests = await tests.fromFile(testsFile); - - const fileNames = integTests.map(test => test.fileName); - expect(integTests.length).toEqual(1); - expect(fileNames).toContain( - 'test/test-data/integ.integ-test1.js', - ); - }); - - test('from file, test not found', async () => { - mockfs({ - 'test/test-data': { - 'integ.integ-test1.js': 'content', - }, - [testsFile]: JSON.stringify({ - tests: [ - 'test-data/integ.integ-test16.js', - ], - }), - }); - const integTests = await tests.fromFile(testsFile); - - expect(integTests.length).toEqual(0); - expect(stderrMock.mock.calls[0][0]).toContain( - 'No such integ test: test-data/integ.integ-test16.js', - ); - expect(stderrMock.mock.calls[1][0]).toContain( - 'Available tests: test-data/integ.integ-test1.js test-data/integ.integ-test2.js test-data/integ.integ-test3.js', - ); - }); - - test('from file exclude', async () => { - const integTests = await tests.fromFile(testsFileExclude); - - const fileNames = integTests.map(test => test.fileName); - expect(integTests.length).toEqual(2); - expect(fileNames).not.toContain( - 'test/test-data/integ.integ-test1.js', - ); - }); }); diff --git a/packages/@aws-cdk/integ-runner/test/runner/snapshot-test-runner.test.ts b/packages/@aws-cdk/integ-runner/test/runner/snapshot-test-runner.test.ts index 28d9e80c79477..1370589d36252 100644 --- a/packages/@aws-cdk/integ-runner/test/runner/snapshot-test-runner.test.ts +++ b/packages/@aws-cdk/integ-runner/test/runner/snapshot-test-runner.test.ts @@ -2,7 +2,7 @@ import * as child_process from 'child_process'; import * as path from 'path'; import { SynthFastOptions, DestroyOptions, ListOptions, SynthOptions, DeployOptions } from 'cdk-cli-wrapper'; import * as fs from 'fs-extra'; -import { IntegSnapshotRunner } from '../../lib/runner'; +import { IntegSnapshotRunner, IntegTest } from '../../lib/runner'; import { DiagnosticReason } from '../../lib/workers/common'; import { MockCdkProvider } from '../helpers'; @@ -46,9 +46,11 @@ describe('IntegTest runSnapshotTests', () => { // WHEN const integTest = new IntegSnapshotRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.test-with-snapshot.js', - directory: 'test/test-data', - integOutDir: 'test-with-snapshot.integ.snapshot', + test: new IntegTest({ + fileName: 'test/test-data/integ.test-with-snapshot.js', + discoveryRoot: 'test/test-data', + }), + integOutDir: 'test/test-data/test-with-snapshot.integ.snapshot', }); const results = integTest.testSnapshot(); @@ -69,8 +71,10 @@ describe('IntegTest runSnapshotTests', () => { // WHEN const integTest = new IntegSnapshotRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.test-with-snapshot.js', - directory: 'test/test-data', + test: new IntegTest({ + fileName: 'test/test-data/integ.test-with-snapshot.js', + discoveryRoot: 'test/test-data', + }), }); const results = integTest.testSnapshot(); @@ -95,9 +99,11 @@ describe('IntegTest runSnapshotTests', () => { // WHEN const integTest = new IntegSnapshotRunner({ cdk: cdkMock.cdk, - fileName: 'test/test-data/integ.test-with-snapshot.js', - directory: 'test/test-data', - integOutDir: 'test-with-snapshot-diff.integ.snapshot', + test: new IntegTest({ + fileName: 'test/test-data/integ.test-with-snapshot.js', + discoveryRoot: 'test/test-data', + }), + integOutDir: 'test/test-data/test-with-snapshot-diff.integ.snapshot', }); const results = integTest.testSnapshot(); @@ -134,9 +140,11 @@ describe('IntegTest runSnapshotTests', () => { // WHEN const integTest = new IntegSnapshotRunner({ cdk: cdkMock.cdk, - fileName: path.join(__dirname, '../test-data/integ.test-with-snapshot-assets-diff.js'), - directory: 'test/test-data', - integOutDir: 'test-with-snapshot-assets.integ.snapshot', + test: new IntegTest({ + fileName: path.join(__dirname, '../test-data/integ.test-with-snapshot-assets-diff.js'), + discoveryRoot: 'test/test-data', + }), + integOutDir: 'test/test-data/test-with-snapshot-assets.integ.snapshot', }); expect(() => { integTest.testSnapshot(); @@ -158,9 +166,11 @@ describe('IntegTest runSnapshotTests', () => { // WHEN const integTest = new IntegSnapshotRunner({ cdk: cdkMock.cdk, - fileName: path.join(__dirname, '../test-data/integ.test-with-snapshot-assets.js'), - directory: 'test/test-data', - integOutDir: 'test-with-snapshot-assets-diff.integ.snapshot', + test: new IntegTest({ + fileName: path.join(__dirname, '../test-data/integ.test-with-snapshot-assets.js'), + discoveryRoot: 'test/test-data', + }), + integOutDir: 'test/test-data/test-with-snapshot-assets-diff.integ.snapshot', }); const results = integTest.testSnapshot(); diff --git a/packages/@aws-cdk/integ-runner/test/workers/integ-worker.test.ts b/packages/@aws-cdk/integ-runner/test/workers/integ-worker.test.ts index 54864d2421b4a..0c1634faf759e 100644 --- a/packages/@aws-cdk/integ-runner/test/workers/integ-worker.test.ts +++ b/packages/@aws-cdk/integ-runner/test/workers/integ-worker.test.ts @@ -65,7 +65,7 @@ describe('test runner', () => { // WHEN const test = { fileName: 'test/test-data/integ.integ-test1.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }; integTestWorker({ tests: [test], @@ -89,7 +89,7 @@ describe('test runner', () => { // WHEN const test = { fileName: 'test/test-data/integ.integ-test2.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }; spawnSyncMock.mockReset(); jest.spyOn(child_process, 'spawnSync').mockReturnValue({ @@ -108,7 +108,7 @@ describe('test runner', () => { // THEN expect(results[0]).toEqual({ fileName: expect.stringMatching(/integ.integ-test2.js$/), - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }); }); @@ -116,7 +116,7 @@ describe('test runner', () => { // WHEN const test = { fileName: 'test/test-data/integ.test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }; const results = integTestWorker({ tests: [test], @@ -154,7 +154,7 @@ describe('test runner', () => { // WHEN const test = { fileName: 'test/test-data/integ.test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }; jest.spyOn(child_process, 'spawnSync').mockReturnValue({ status: 1, @@ -171,7 +171,7 @@ describe('test runner', () => { expect(results[0]).toEqual({ fileName: 'test/test-data/integ.test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }); }); }); @@ -181,11 +181,11 @@ describe('parallel worker', () => { const tests = [ { fileName: 'integ.test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, { fileName: 'integ.another-test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, ]; await runIntegrationTests({ @@ -211,7 +211,7 @@ describe('parallel worker', () => { test('run tests', async () => { const tests = [{ fileName: 'integ.test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }]; const results = await runIntegrationTestsInParallel({ pool, @@ -226,7 +226,7 @@ describe('parallel worker', () => { failedTests: expect.arrayContaining([ { fileName: 'integ.test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, ]), metrics: expect.arrayContaining([ @@ -245,19 +245,19 @@ describe('parallel worker', () => { const tests = [ { fileName: 'integ.test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, { fileName: 'integ.another-test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, { fileName: 'integ.another-test-with-snapshot2.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, { fileName: 'integ.another-test-with-snapshot3.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, ]; const results = await runIntegrationTestsInParallel({ @@ -283,19 +283,19 @@ describe('parallel worker', () => { failedTests: expect.arrayContaining([ { fileName: 'integ.test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, { fileName: 'integ.another-test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, { fileName: 'integ.another-test-with-snapshot2.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, { fileName: 'integ.another-test-with-snapshot3.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, ]), metrics: expect.arrayContaining([ @@ -339,11 +339,11 @@ describe('parallel worker', () => { const tests = [ { fileName: 'integ.test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, { fileName: 'integ.another-test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, ]; const results = await runIntegrationTestsInParallel({ @@ -362,11 +362,11 @@ describe('parallel worker', () => { failedTests: expect.arrayContaining([ { fileName: 'integ.test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, { fileName: 'integ.another-test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, ]), metrics: expect.arrayContaining([ @@ -392,11 +392,11 @@ describe('parallel worker', () => { const tests = [ { fileName: 'integ.test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, { fileName: 'integ.another-test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, ]; const results = await runIntegrationTestsInParallel({ @@ -415,11 +415,11 @@ describe('parallel worker', () => { failedTests: expect.arrayContaining([ { fileName: 'integ.another-test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, { fileName: 'integ.test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, ]), metrics: expect.arrayContaining([ @@ -439,11 +439,11 @@ describe('parallel worker', () => { const tests = [ { fileName: 'integ.test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, { fileName: 'integ.another-test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, ]; const results = await runIntegrationTestsInParallel({ @@ -462,11 +462,11 @@ describe('parallel worker', () => { failedTests: expect.arrayContaining([ { fileName: 'integ.test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, { fileName: 'integ.another-test-with-snapshot.js', - directory: 'test/test-data', + discoveryRoot: 'test/test-data', }, ]), metrics: expect.arrayContaining([ diff --git a/packages/@aws-cdk/integ-runner/test/workers/mock-extract_worker.ts b/packages/@aws-cdk/integ-runner/test/workers/mock-extract_worker.ts index 18f517e5f4dee..f761b5a2a4429 100644 --- a/packages/@aws-cdk/integ-runner/test/workers/mock-extract_worker.ts +++ b/packages/@aws-cdk/integ-runner/test/workers/mock-extract_worker.ts @@ -1,9 +1,9 @@ import * as workerpool from 'workerpool'; -import { IntegTestConfig } from '../../lib/runner'; +import { IntegTestInfo } from '../../lib/runner'; import { IntegTestBatchRequest } from '../../lib/workers/integ-test-worker'; -function integTestWorker(request: IntegTestBatchRequest): IntegTestConfig[] { +function integTestWorker(request: IntegTestBatchRequest): IntegTestInfo[] { return request.tests; } diff --git a/packages/@aws-cdk/integ-runner/test/workers/snapshot-worker.test.ts b/packages/@aws-cdk/integ-runner/test/workers/snapshot-worker.test.ts index 5b47873fd9987..ac9d4cda13f60 100644 --- a/packages/@aws-cdk/integ-runner/test/workers/snapshot-worker.test.ts +++ b/packages/@aws-cdk/integ-runner/test/workers/snapshot-worker.test.ts @@ -22,7 +22,7 @@ describe('Snapshot tests', () => { // WHEN const test = { fileName: path.join(directory, 'integ.integ-test1.js'), - directory: directory, + discoveryRoot: directory, }; const result = snapshotTestWorker(test); @@ -36,7 +36,7 @@ describe('Snapshot tests', () => { jest.spyOn(child_process, 'spawnSync').mockResolvedValue; const test = { fileName: path.join(directory, 'integ.test-with-snapshot.js'), - directory: directory, + discoveryRoot: directory, }; const result = snapshotTestWorker(test); @@ -49,7 +49,7 @@ describe('Snapshot tests', () => { jest.spyOn(child_process, 'spawnSync').mockRejectedValue; const test = { fileName: path.join(directory, 'integ.test-with-snapshot-assets.js'), - directory, + discoveryRoot: directory, destructiveChanges: [], }; const result = snapshotTestWorker(test); From 33acc7cc03c4a6700c05e840393ef90e5d8f68dc Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Tue, 31 May 2022 17:17:22 +0200 Subject: [PATCH 11/23] feat(cognito): OpenID Connect identity provider (#20241) Add the `UserPoolIdentityProviderOidc` class to create an OpenID Connect identity provider for user pools. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-cognito/README.md | 1 + .../aws-cognito/lib/user-pool-idps/index.ts | 3 +- .../aws-cognito/lib/user-pool-idps/oidc.ts | 157 +++++++++++++ packages/@aws-cdk/aws-cognito/package.json | 3 +- .../test/integ.user-pool-idp.oidc.ts | 45 ++++ .../user-pool-idp.oidc.integ.snapshot/cdk.out | 1 + .../integ-user-pool-idp-google.template.json | 121 ++++++++++ .../integ.json | 14 ++ .../manifest.json | 52 +++++ .../tree.json | 202 +++++++++++++++++ .../test/user-pool-idps/oidc.test.ts | 214 ++++++++++++++++++ 11 files changed, 811 insertions(+), 2 deletions(-) create mode 100644 packages/@aws-cdk/aws-cognito/lib/user-pool-idps/oidc.ts create mode 100644 packages/@aws-cdk/aws-cognito/test/integ.user-pool-idp.oidc.ts create mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/cdk.out create mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/integ-user-pool-idp-google.template.json create mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/integ.json create mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/manifest.json create mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/tree.json create mode 100644 packages/@aws-cdk/aws-cognito/test/user-pool-idps/oidc.test.ts diff --git a/packages/@aws-cdk/aws-cognito/README.md b/packages/@aws-cdk/aws-cognito/README.md index a052d97824a5c..8e2720be896f3 100644 --- a/packages/@aws-cdk/aws-cognito/README.md +++ b/packages/@aws-cdk/aws-cognito/README.md @@ -503,6 +503,7 @@ The following third-party identity providers are currently supported in the CDK - [Facebook Login](https://developers.facebook.com/docs/facebook-login/) - [Google Login](https://developers.google.com/identity/sign-in/web/sign-in) - [Sign In With Apple](https://developer.apple.com/sign-in-with-apple/get-started/) +- [OpenID Connect](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-oidc-idp.html) The following code configures a user pool to federate with the third party provider, 'Login with Amazon'. The identity provider needs to be configured with a set of credentials that the Cognito backend can use to federate with the diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/index.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/index.ts index 321ee0ecad5d9..fd7ad04af70fe 100644 --- a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/index.ts +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/index.ts @@ -2,4 +2,5 @@ export * from './base'; export * from './apple'; export * from './amazon'; export * from './facebook'; -export * from './google'; \ No newline at end of file +export * from './google'; +export * from './oidc'; diff --git a/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/oidc.ts b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/oidc.ts new file mode 100644 index 0000000000000..f23e80adef4de --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/lib/user-pool-idps/oidc.ts @@ -0,0 +1,157 @@ +import { Names, Token } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import { CfnUserPoolIdentityProvider } from '../cognito.generated'; +import { UserPoolIdentityProviderProps } from './base'; +import { UserPoolIdentityProviderBase } from './private/user-pool-idp-base'; + +/** + * Properties to initialize UserPoolIdentityProviderOidc + */ +export interface UserPoolIdentityProviderOidcProps extends UserPoolIdentityProviderProps { + /** + * The client id + */ + readonly clientId: string; + + /** + * The client secret + */ + readonly clientSecret: string; + + /** + * Issuer URL + */ + readonly issuerUrl: string; + + /** + * The name of the provider + * + * @default - the unique ID of the construct + */ + readonly name?: string; + + /** + * The OAuth 2.0 scopes that you will request from OpenID Connect. Scopes are + * groups of OpenID Connect user attributes to exchange with your app. + * + * @default ['openid'] + */ + readonly scopes?: string[]; + + /** + * Identifiers + * + * Identifiers can be used to redirect users to the correct IdP in multitenant apps. + * + * @default - no identifiers used + */ + readonly identifiers?: string[] + + /** + * The method to use to request attributes + * + * @default OidcAttributeRequestMethod.GET + */ + readonly attributeRequestMethod?: OidcAttributeRequestMethod + + /** + * OpenID connect endpoints + * + * @default - auto discovered with issuer URL + */ + readonly endpoints?: OidcEndpoints; +} + +/** + * OpenID Connect endpoints + */ +export interface OidcEndpoints { + /** + * Authorization endpoint + */ + readonly authorization: string; + + /** + * Token endpoint + */ + readonly token: string; + + /** + * UserInfo endpoint + */ + readonly userInfo: string; + + /** + * Jwks_uri endpoint + */ + readonly jwksUri: string; +} + +/** + * The method to use to request attributes + */ +export enum OidcAttributeRequestMethod { + /** GET */ + GET = 'GET', + /** POST */ + POST = 'POST' +} + +/** + * Represents a identity provider that integrates with OpenID Connect + * @resource AWS::Cognito::UserPoolIdentityProvider + */ +export class UserPoolIdentityProviderOidc extends UserPoolIdentityProviderBase { + public readonly providerName: string; + + constructor(scope: Construct, id: string, props: UserPoolIdentityProviderOidcProps) { + super(scope, id, props); + + if (props.name && !Token.isUnresolved(props.name) && (props.name.length < 3 || props.name.length > 32)) { + throw new Error(`Expected provider name to be between 3 and 32 characters, received ${props.name} (${props.name.length} characters)`); + } + + const scopes = props.scopes ?? ['openid']; + + const resource = new CfnUserPoolIdentityProvider(this, 'Resource', { + userPoolId: props.userPool.userPoolId, + providerName: this.getProviderName(props.name), + providerType: 'OIDC', + providerDetails: { + client_id: props.clientId, + client_secret: props.clientSecret, + authorize_scopes: scopes.join(' '), + attributes_request_method: props.attributeRequestMethod ?? OidcAttributeRequestMethod.GET, + oidc_issuer: props.issuerUrl, + authorize_url: props.endpoints?.authorization, + token_url: props.endpoints?.token, + attributes_url: props.endpoints?.userInfo, + jwks_uri: props.endpoints?.jwksUri, + }, + idpIdentifiers: props.identifiers, + attributeMapping: super.configureAttributeMapping(), + }); + + this.providerName = super.getResourceNameAttribute(resource.ref); + } + + private getProviderName(name?: string): string { + if (name) { + if (!Token.isUnresolved(name) && (name.length < 3 || name.length > 32)) { + throw new Error(`Expected provider name to be between 3 and 32 characters, received ${name} (${name.length} characters)`); + } + return name; + } + + const uniqueId = Names.uniqueId(this); + + if (uniqueId.length < 3) { + return `${uniqueId}oidc`; + } + + if (uniqueId.length > 32) { + return uniqueId.substring(0, 16) + uniqueId.substring(uniqueId.length - 16); + } + return uniqueId; + } +} diff --git a/packages/@aws-cdk/aws-cognito/package.json b/packages/@aws-cdk/aws-cognito/package.json index 44d19ecf0ce92..506d0cd1935bc 100644 --- a/packages/@aws-cdk/aws-cognito/package.json +++ b/packages/@aws-cdk/aws-cognito/package.json @@ -122,7 +122,8 @@ "props-physical-name:@aws-cdk/aws-cognito.UserPoolIdentityProviderFacebookProps", "props-physical-name:@aws-cdk/aws-cognito.UserPoolIdentityProviderAmazonProps", "props-physical-name:@aws-cdk/aws-cognito.UserPoolIdentityProviderGoogleProps", - "props-physical-name:@aws-cdk/aws-cognito.UserPoolIdentityProviderAppleProps" + "props-physical-name:@aws-cdk/aws-cognito.UserPoolIdentityProviderAppleProps", + "props-physical-name:@aws-cdk/aws-cognito.UserPoolIdentityProviderOidcProps" ] }, "stability": "stable", diff --git a/packages/@aws-cdk/aws-cognito/test/integ.user-pool-idp.oidc.ts b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-idp.oidc.ts new file mode 100644 index 0000000000000..159c7e305d2ff --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/integ.user-pool-idp.oidc.ts @@ -0,0 +1,45 @@ +import { App, CfnOutput, RemovalPolicy, Stack } from '@aws-cdk/core'; +import { ProviderAttribute, UserPool, UserPoolIdentityProviderOidc } from '../lib'; + +/* + * Stack verification steps + * * Visit the URL provided by stack output 'SignInLink' in a browser, and verify the 'cdk' sign in link shows up. + */ +const app = new App(); +const stack = new Stack(app, 'integ-user-pool-idp-google'); + +const userpool = new UserPool(stack, 'pool', { + removalPolicy: RemovalPolicy.DESTROY, +}); + +new UserPoolIdentityProviderOidc(stack, 'cdk', { + userPool: userpool, + name: 'cdk', + clientId: 'client-id', + clientSecret: 'client-secret', + issuerUrl: 'https://www.issuer-url.com', + endpoints: { + authorization: 'https://www.issuer-url.com/authorize', + token: 'https://www.issuer-url.com/token', + userInfo: 'https://www.issuer-url.com/userinfo', + jwksUri: 'https://www.issuer-url.com/jwks', + }, + scopes: ['openid', 'phone'], + attributeMapping: { + phoneNumber: ProviderAttribute.other('phone_number'), + }, +}); + +const client = userpool.addClient('client'); + +const domain = userpool.addDomain('domain', { + cognitoDomain: { + domainPrefix: 'cdk-test-pool', + }, +}); + +new CfnOutput(stack, 'SignInLink', { + value: domain.signInUrl(client, { + redirectUri: 'https://example.com', + }), +}); diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/cdk.out new file mode 100644 index 0000000000000..2efc89439fab8 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"18.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/integ-user-pool-idp-google.template.json b/packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/integ-user-pool-idp-google.template.json new file mode 100644 index 0000000000000..f5a02bb5abf1f --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/integ-user-pool-idp-google.template.json @@ -0,0 +1,121 @@ +{ + "Resources": { + "pool056F3F7E": { + "Type": "AWS::Cognito::UserPool", + "Properties": { + "AccountRecoverySetting": { + "RecoveryMechanisms": [ + { + "Name": "verified_phone_number", + "Priority": 1 + }, + { + "Name": "verified_email", + "Priority": 2 + } + ] + }, + "AdminCreateUserConfig": { + "AllowAdminCreateUserOnly": true + }, + "EmailVerificationMessage": "The verification code to your new account is {####}", + "EmailVerificationSubject": "Verify your new account", + "SmsVerificationMessage": "The verification code to your new account is {####}", + "VerificationMessageTemplate": { + "DefaultEmailOption": "CONFIRM_WITH_CODE", + "EmailMessage": "The verification code to your new account is {####}", + "EmailSubject": "Verify your new account", + "SmsMessage": "The verification code to your new account is {####}" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "poolclient2623294C": { + "Type": "AWS::Cognito::UserPoolClient", + "Properties": { + "UserPoolId": { + "Ref": "pool056F3F7E" + }, + "AllowedOAuthFlows": [ + "implicit", + "code" + ], + "AllowedOAuthFlowsUserPoolClient": true, + "AllowedOAuthScopes": [ + "profile", + "phone", + "email", + "openid", + "aws.cognito.signin.user.admin" + ], + "CallbackURLs": [ + "https://example.com" + ], + "SupportedIdentityProviders": [ + { + "Ref": "cdk52888317" + }, + "COGNITO" + ] + } + }, + "pooldomain430FA744": { + "Type": "AWS::Cognito::UserPoolDomain", + "Properties": { + "Domain": "cdk-test-pool", + "UserPoolId": { + "Ref": "pool056F3F7E" + } + } + }, + "cdk52888317": { + "Type": "AWS::Cognito::UserPoolIdentityProvider", + "Properties": { + "ProviderName": "cdk", + "ProviderType": "OIDC", + "UserPoolId": { + "Ref": "pool056F3F7E" + }, + "AttributeMapping": { + "phone_number": "phone_number" + }, + "ProviderDetails": { + "client_id": "client-id", + "client_secret": "client-secret", + "authorize_scopes": "openid phone", + "attributes_request_method": "GET", + "oidc_issuer": "https://www.issuer-url.com", + "authorize_url": "https://www.issuer-url.com/authorize", + "token_url": "https://www.issuer-url.com/token", + "attributes_url": "https://www.issuer-url.com/userinfo", + "jwks_uri": "https://www.issuer-url.com/jwks" + } + } + } + }, + "Outputs": { + "SignInLink": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "pooldomain430FA744" + }, + ".auth.", + { + "Ref": "AWS::Region" + }, + ".amazoncognito.com/login?client_id=", + { + "Ref": "poolclient2623294C" + }, + "&response_type=code&redirect_uri=https://example.com" + ] + ] + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/integ.json b/packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/integ.json new file mode 100644 index 0000000000000..6c7dfa2d2f275 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/integ.json @@ -0,0 +1,14 @@ +{ + "version": "18.0.0", + "testCases": { + "integ.user-pool-idp.oidc": { + "stacks": [ + "integ-user-pool-idp-google" + ], + "diffAssets": false, + "stackUpdateWorkflow": true + } + }, + "synthContext": {}, + "enableLookups": false +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/manifest.json new file mode 100644 index 0000000000000..ff3038ce4b3e3 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/manifest.json @@ -0,0 +1,52 @@ +{ + "version": "18.0.0", + "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, + "integ-user-pool-idp-google": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "integ-user-pool-idp-google.template.json", + "validateOnSynth": false + }, + "metadata": { + "/integ-user-pool-idp-google/pool/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "pool056F3F7E" + } + ], + "/integ-user-pool-idp-google/pool/client/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "poolclient2623294C" + } + ], + "/integ-user-pool-idp-google/pool/domain/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "pooldomain430FA744" + } + ], + "/integ-user-pool-idp-google/cdk/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "cdk52888317" + } + ], + "/integ-user-pool-idp-google/SignInLink": [ + { + "type": "aws:cdk:logicalId", + "data": "SignInLink" + } + ] + }, + "displayName": "integ-user-pool-idp-google" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/tree.json b/packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/tree.json new file mode 100644 index 0000000000000..ded3b9a167598 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-idp.oidc.integ.snapshot/tree.json @@ -0,0 +1,202 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "@aws-cdk/core.Construct", + "version": "0.0.0" + } + }, + "integ-user-pool-idp-google": { + "id": "integ-user-pool-idp-google", + "path": "integ-user-pool-idp-google", + "children": { + "pool": { + "id": "pool", + "path": "integ-user-pool-idp-google/pool", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-user-pool-idp-google/pool/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Cognito::UserPool", + "aws:cdk:cloudformation:props": { + "accountRecoverySetting": { + "recoveryMechanisms": [ + { + "name": "verified_phone_number", + "priority": 1 + }, + { + "name": "verified_email", + "priority": 2 + } + ] + }, + "adminCreateUserConfig": { + "allowAdminCreateUserOnly": true + }, + "emailVerificationMessage": "The verification code to your new account is {####}", + "emailVerificationSubject": "Verify your new account", + "smsVerificationMessage": "The verification code to your new account is {####}", + "verificationMessageTemplate": { + "defaultEmailOption": "CONFIRM_WITH_CODE", + "emailMessage": "The verification code to your new account is {####}", + "emailSubject": "Verify your new account", + "smsMessage": "The verification code to your new account is {####}" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cognito.CfnUserPool", + "version": "0.0.0" + } + }, + "client": { + "id": "client", + "path": "integ-user-pool-idp-google/pool/client", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-user-pool-idp-google/pool/client/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Cognito::UserPoolClient", + "aws:cdk:cloudformation:props": { + "userPoolId": { + "Ref": "pool056F3F7E" + }, + "allowedOAuthFlows": [ + "implicit", + "code" + ], + "allowedOAuthFlowsUserPoolClient": true, + "allowedOAuthScopes": [ + "profile", + "phone", + "email", + "openid", + "aws.cognito.signin.user.admin" + ], + "callbackUrLs": [ + "https://example.com" + ], + "supportedIdentityProviders": [ + { + "Ref": "cdk52888317" + }, + "COGNITO" + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cognito.CfnUserPoolClient", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cognito.UserPoolClient", + "version": "0.0.0" + } + }, + "domain": { + "id": "domain", + "path": "integ-user-pool-idp-google/pool/domain", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-user-pool-idp-google/pool/domain/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Cognito::UserPoolDomain", + "aws:cdk:cloudformation:props": { + "domain": "cdk-test-pool", + "userPoolId": { + "Ref": "pool056F3F7E" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cognito.CfnUserPoolDomain", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cognito.UserPoolDomain", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cognito.UserPool", + "version": "0.0.0" + } + }, + "cdk": { + "id": "cdk", + "path": "integ-user-pool-idp-google/cdk", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-user-pool-idp-google/cdk/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Cognito::UserPoolIdentityProvider", + "aws:cdk:cloudformation:props": { + "providerName": "cdk", + "providerType": "OIDC", + "userPoolId": { + "Ref": "pool056F3F7E" + }, + "attributeMapping": { + "phone_number": "phone_number" + }, + "providerDetails": { + "client_id": "client-id", + "client_secret": "client-secret", + "authorize_scopes": "openid phone", + "attributes_request_method": "GET", + "oidc_issuer": "https://www.issuer-url.com", + "authorize_url": "https://www.issuer-url.com/authorize", + "token_url": "https://www.issuer-url.com/token", + "attributes_url": "https://www.issuer-url.com/userinfo", + "jwks_uri": "https://www.issuer-url.com/jwks" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cognito.CfnUserPoolIdentityProvider", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cognito.UserPoolIdentityProviderOidc", + "version": "0.0.0" + } + }, + "SignInLink": { + "id": "SignInLink", + "path": "integ-user-pool-idp-google/SignInLink", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool-idps/oidc.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool-idps/oidc.test.ts new file mode 100644 index 0000000000000..c28feb073ae13 --- /dev/null +++ b/packages/@aws-cdk/aws-cognito/test/user-pool-idps/oidc.test.ts @@ -0,0 +1,214 @@ +import { Template } from '@aws-cdk/assertions'; +import { Stack } from '@aws-cdk/core'; +import { ProviderAttribute, UserPool, UserPoolIdentityProviderOidc } from '../../lib'; + +describe('UserPoolIdentityProvider', () => { + describe('oidc', () => { + test('defaults', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderOidc(stack, 'userpoolidp', { + userPool: pool, + clientId: 'client-id', + clientSecret: 'client-secret', + issuerUrl: 'https://my-issuer-url.com', + }); + + Template.fromStack(stack).hasResourceProperties('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'userpoolidp', + ProviderType: 'OIDC', + ProviderDetails: { + client_id: 'client-id', + client_secret: 'client-secret', + authorize_scopes: 'openid', + attributes_request_method: 'GET', + oidc_issuer: 'https://my-issuer-url.com', + }, + }); + }); + + test('endpoints', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderOidc(stack, 'userpoolidp', { + userPool: pool, + clientId: 'client-id', + clientSecret: 'client-secret', + issuerUrl: 'https://my-issuer-url.com', + endpoints: { + authorization: 'https://my-issuer-url.com/authorize', + token: 'https://my-issuer-url.com/token', + userInfo: 'https://my-issuer-url.com/userinfo', + jwksUri: 'https://my-issuer-url.com/jwks', + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::Cognito::UserPoolIdentityProvider', { + ProviderDetails: { + client_id: 'client-id', + client_secret: 'client-secret', + authorize_scopes: 'openid', + attributes_request_method: 'GET', + oidc_issuer: 'https://my-issuer-url.com', + authorize_url: 'https://my-issuer-url.com/authorize', + token_url: 'https://my-issuer-url.com/token', + attributes_url: 'https://my-issuer-url.com/userinfo', + jwks_uri: 'https://my-issuer-url.com/jwks', + }, + }); + }); + + test('scopes', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderOidc(stack, 'userpoolidp', { + userPool: pool, + clientId: 'client-id', + clientSecret: 'client-secret', + issuerUrl: 'https://my-issuer-url.com', + scopes: ['scope1', 'scope2'], + }); + + Template.fromStack(stack).hasResourceProperties('AWS::Cognito::UserPoolIdentityProvider', { + ProviderDetails: { + client_id: 'client-id', + client_secret: 'client-secret', + authorize_scopes: 'scope1 scope2', + attributes_request_method: 'GET', + oidc_issuer: 'https://my-issuer-url.com', + }, + }); + }); + + test('registered with user pool', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + const provider = new UserPoolIdentityProviderOidc(stack, 'userpoolidp', { + userPool: pool, + clientId: 'client-id', + clientSecret: 'client-secret', + issuerUrl: 'https://my-issuer-url.com', + }); + + // THEN + expect(pool.identityProviders).toContain(provider); + }); + + test('attribute mapping', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderOidc(stack, 'userpoolidp', { + userPool: pool, + clientId: 'client-id', + clientSecret: 'client-secret', + issuerUrl: 'https://my-issuer-url.com', + attributeMapping: { + familyName: ProviderAttribute.other('family_name'), + givenName: ProviderAttribute.other('given_name'), + custom: { + customAttr1: ProviderAttribute.other('email'), + customAttr2: ProviderAttribute.other('sub'), + }, + }, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Cognito::UserPoolIdentityProvider', { + AttributeMapping: { + family_name: 'family_name', + given_name: 'given_name', + customAttr1: 'email', + customAttr2: 'sub', + }, + }); + }); + + test('with provider name', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderOidc(stack, 'userpoolidp', { + userPool: pool, + name: 'my-provider', + clientId: 'client-id', + clientSecret: 'client-secret', + issuerUrl: 'https://my-issuer-url.com', + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'my-provider', + }); + }); + + test('throws with invalid provider name', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // THEN + expect(() => new UserPoolIdentityProviderOidc(stack, 'userpoolidp', { + userPool: pool, + name: 'xy', + clientId: 'client-id', + clientSecret: 'client-secret', + issuerUrl: 'https://my-issuer-url.com', + })).toThrow(/Expected provider name to be between 3 and 32 characters/); + }); + + test('generates a valid name when unique id is too short', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderOidc(stack, 'xy', { + userPool: pool, + clientId: 'client-id', + clientSecret: 'client-secret', + issuerUrl: 'https://my-issuer-url.com', + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'xyoidc', + }); + }); + + test('generates a valid name when unique id is too long', () => { + // GIVEN + const stack = new Stack(); + const pool = new UserPool(stack, 'userpool'); + + // WHEN + new UserPoolIdentityProviderOidc(stack, `${'oidc'.repeat(10)}xyz`, { + userPool: pool, + clientId: 'client-id', + clientSecret: 'client-secret', + issuerUrl: 'https://my-issuer-url.com', + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Cognito::UserPoolIdentityProvider', { + ProviderName: 'oidcoidcoidcoidccoidcoidcoidcxyz', + }); + }); + }); +}); From 27fdaf1be55b1057a59a690484ce8c4891780134 Mon Sep 17 00:00:00 2001 From: Ashok <1902568+ashokm@users.noreply.github.com> Date: Tue, 31 May 2022 18:01:08 +0200 Subject: [PATCH 12/23] chore(lambda-nodejs): fix typo (#20557) --- packages/@aws-cdk/aws-lambda-nodejs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/README.md b/packages/@aws-cdk/aws-lambda-nodejs/README.md index a21e5c9a6001d..61e25f81f8ffe 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/README.md +++ b/packages/@aws-cdk/aws-lambda-nodejs/README.md @@ -102,7 +102,7 @@ If `esbuild` is available it will be used to bundle your code in your environmen bundling will happen in a [Lambda compatible Docker container](https://gallery.ecr.aws/sam/build-nodejs12.x) with the Docker platform based on the target architecture of the Lambda function. -For macOS the recommendend approach is to install `esbuild` as Docker volume performance is really poor. +For macOS the recommended approach is to install `esbuild` as Docker volume performance is really poor. `esbuild` can be installed with: From 2bf30df223cc5bb43c2fcfaaf32669a8438ad19a Mon Sep 17 00:00:00 2001 From: Joshua Weber <57131123+daschaa@users.noreply.github.com> Date: Tue, 31 May 2022 18:47:05 +0200 Subject: [PATCH 13/23] feat(s3): adds objectSizeLessThan property for s3 lifecycle rule (#20429) Fixes (other half - see #20425) of #20372. This implements the `objectSizeLessThan` property for a S3 lifecycle rule. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-s3/README.md | 1 + packages/@aws-cdk/aws-s3/lib/bucket.ts | 1 + packages/@aws-cdk/aws-s3/lib/rule.ts | 8 +++++++- packages/@aws-cdk/aws-s3/test/integ.lifecycle.ts | 1 + .../lifecycle.integ.snapshot/aws-cdk-s3.template.json | 1 + packages/@aws-cdk/aws-s3/test/rules.test.ts | 4 +++- 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-s3/README.md b/packages/@aws-cdk/aws-s3/README.md index 988b360c01d3c..e34dd8067f0ef 100644 --- a/packages/@aws-cdk/aws-s3/README.md +++ b/packages/@aws-cdk/aws-s3/README.md @@ -578,6 +578,7 @@ const bucket = new s3.Bucket(this, 'MyBucket', { }], objectSizeGreaterThan: 500, prefix: 'prefix', + objectSizeLessThan: 10000, transitions: [{ storageClass: s3.StorageClass.GLACIER, diff --git a/packages/@aws-cdk/aws-s3/lib/bucket.ts b/packages/@aws-cdk/aws-s3/lib/bucket.ts index d51d79165f61c..d2be56356ae7f 100644 --- a/packages/@aws-cdk/aws-s3/lib/bucket.ts +++ b/packages/@aws-cdk/aws-s3/lib/bucket.ts @@ -1923,6 +1923,7 @@ export class Bucket extends BucketBase { })), expiredObjectDeleteMarker: rule.expiredObjectDeleteMarker, tagFilters: self.parseTagFilters(rule.tagFilters), + objectSizeLessThan: rule.objectSizeLessThan, objectSizeGreaterThan: rule.objectSizeGreaterThan, }; diff --git a/packages/@aws-cdk/aws-s3/lib/rule.ts b/packages/@aws-cdk/aws-s3/lib/rule.ts index b79af075ed848..943130c1a20f9 100644 --- a/packages/@aws-cdk/aws-s3/lib/rule.ts +++ b/packages/@aws-cdk/aws-s3/lib/rule.ts @@ -120,7 +120,13 @@ export interface LifecycleRule { readonly expiredObjectDeleteMarker?: boolean; /** - * Specifies the minimum object size in bytes for this rule to apply to. + * Specifies the maximum object size in bytes for this rule to apply to. + * + * @default - No rule + */ + readonly objectSizeLessThan?: number; + + /** Specifies the minimum object size in bytes for this rule to apply to. * * @default - No rule */ diff --git a/packages/@aws-cdk/aws-s3/test/integ.lifecycle.ts b/packages/@aws-cdk/aws-s3/test/integ.lifecycle.ts index 0fe92eda9a7eb..973a0e562232c 100644 --- a/packages/@aws-cdk/aws-s3/test/integ.lifecycle.ts +++ b/packages/@aws-cdk/aws-s3/test/integ.lifecycle.ts @@ -12,6 +12,7 @@ new Bucket(stack, 'MyBucket', { expirationDate: new Date('2019-10-01'), }, { + objectSizeLessThan: 500, objectSizeGreaterThan: 500, }, ], diff --git a/packages/@aws-cdk/aws-s3/test/lifecycle.integ.snapshot/aws-cdk-s3.template.json b/packages/@aws-cdk/aws-s3/test/lifecycle.integ.snapshot/aws-cdk-s3.template.json index df2d4d718d3cf..d811988919f3f 100644 --- a/packages/@aws-cdk/aws-s3/test/lifecycle.integ.snapshot/aws-cdk-s3.template.json +++ b/packages/@aws-cdk/aws-s3/test/lifecycle.integ.snapshot/aws-cdk-s3.template.json @@ -10,6 +10,7 @@ "Status": "Enabled" }, { + "ObjectSizeLessThan": "500", "ObjectSizeGreaterThan": "500", "Status": "Enabled" } diff --git a/packages/@aws-cdk/aws-s3/test/rules.test.ts b/packages/@aws-cdk/aws-s3/test/rules.test.ts index 5be1225ebc4d1..b327494d19267 100644 --- a/packages/@aws-cdk/aws-s3/test/rules.test.ts +++ b/packages/@aws-cdk/aws-s3/test/rules.test.ts @@ -292,13 +292,14 @@ describe('rules', () => { }); }); - test('Bucket with objectSizeGreaterThan', () => { + test('Bucket with object size rules', () => { // GIVEN const stack = new Stack(); // WHEN new Bucket(stack, 'Bucket', { lifecycleRules: [{ + objectSizeLessThan: 0, objectSizeGreaterThan: 0, }], }); @@ -307,6 +308,7 @@ describe('rules', () => { Template.fromStack(stack).hasResourceProperties('AWS::S3::Bucket', { LifecycleConfiguration: { Rules: [{ + ObjectSizeLessThan: 0, ObjectSizeGreaterThan: 0, Status: 'Enabled', }], From 68761dc3ceadbe77e241fb85544e48544149568a Mon Sep 17 00:00:00 2001 From: Vincent Voyer Date: Tue, 31 May 2022 19:33:56 +0200 Subject: [PATCH 14/23] feat(lambda): add insights version 1.0.135.0 (#19588) This commits adds Lambda Insights layer version 1.0.135.0 for x86 and arm. Ref: - https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-extension-versionsx86-64.html#Lambda-Insights-extension-1.0.135.0 - https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-extension-versionsARM.html#Lambda-Insights-extension-ARM-1.0.135.0 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-lambda/lib/lambda-insights.ts | 5 ++ .../region-info/build-tools/fact-tables.ts | 72 +++++++++++++++++++ .../__snapshots__/region-info.test.js.snap | 60 ++++++++++++++++ 3 files changed, 137 insertions(+) diff --git a/packages/@aws-cdk/aws-lambda/lib/lambda-insights.ts b/packages/@aws-cdk/aws-lambda/lib/lambda-insights.ts index 4d1eee91cf10a..265e72535f812 100644 --- a/packages/@aws-cdk/aws-lambda/lib/lambda-insights.ts +++ b/packages/@aws-cdk/aws-lambda/lib/lambda-insights.ts @@ -47,6 +47,11 @@ export abstract class LambdaInsightsVersion { */ public static readonly VERSION_1_0_119_0 = LambdaInsightsVersion.fromInsightsVersion('1.0.119.0'); + /** + * Version 1.0.135.0 + */ + public static readonly VERSION_1_0_135_0 = LambdaInsightsVersion.fromInsightsVersion('1.0.135.0'); + /** * Use the insights extension associated with the provided ARN. Make sure the ARN is associated * with same region as your function diff --git a/packages/@aws-cdk/region-info/build-tools/fact-tables.ts b/packages/@aws-cdk/region-info/build-tools/fact-tables.ts index c5de5d2e6e785..502618d1edc16 100644 --- a/packages/@aws-cdk/region-info/build-tools/fact-tables.ts +++ b/packages/@aws-cdk/region-info/build-tools/fact-tables.ts @@ -187,6 +187,78 @@ export const APPMESH_ECR_ACCOUNTS: { [region: string]: string } = { // https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-extension-versions.html export const CLOUDWATCH_LAMBDA_INSIGHTS_ARNS: { [key: string]: any } = { + '1.0.135.0': { + arm64: { + // US East (N. Virginia) + 'us-east-1': 'arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension-Arm64:2', + // US East (Ohio) + 'us-east-2': 'arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension-Arm64:2', + // US West (Oregon) + 'us-west-2': 'arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension-Arm64:2', + // Asia Pacific (Mumbai) + 'ap-south-1': 'arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension-Arm64:2', + // Asia Pacific (Singapore) + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension-Arm64:2', + // Asia Pacific (Sydney) + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension-Arm64:2', + // Asia Pacific (Tokyo) + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension-Arm64:2', + // Europe (Frankfurt) + 'eu-central-1': 'arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension-Arm64:2', + // Europe (Ireland) + 'eu-west-1': 'arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension-Arm64:2', + // Europe (London) + 'eu-west-2': 'arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension-Arm64:2', + }, + x86_64: { + // US East (N. Virginia) + 'us-east-1': 'arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:18', + // US East (Ohio) + 'us-east-2': 'arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:18', + // US West (N. California) + 'us-west-1': 'arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:18', + // US West (Oregon) + 'us-west-2': 'arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:18', + // Africa (Cape Town) + 'af-south-1': 'arn:aws:lambda:af-south-1:012438385374:layer:LambdaInsightsExtension:11', + // Asia Pacific (Hong Kong) + 'ap-east-1': 'arn:aws:lambda:ap-east-1:519774774795:layer:LambdaInsightsExtension:11', + // Asia Pacific (Mumbai) + 'ap-south-1': 'arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:18', + // Asia Pacific (Oskaka) + 'ap-northeast-3': 'arn:aws:lambda:ap-northeast-3:194566237122:layer:LambdaInsightsExtension:1', + // Asia Pacific (Seoul) + 'ap-northeast-2': 'arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:18', + // Asia Pacific (Singapore) + 'ap-southeast-1': 'arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:18', + // Asia Pacific (Sydney) + 'ap-southeast-2': 'arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:18', + // Asia Pacific (Tokyo) + 'ap-northeast-1': 'arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:25', + // Canada (Central) + 'ca-central-1': 'arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:18', + // China (Beijing) + 'cn-north-1': 'arn:aws-cn:lambda:cn-north-1:488211338238:layer:LambdaInsightsExtension:11', + // China (Ningxia) + 'cn-northwest-1': 'arn:aws-cn:lambda:cn-northwest-1:488211338238:layer:LambdaInsightsExtension:11', + // Europe (Frankfurt) + 'eu-central-1': 'arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:18', + // Europe (Ireland) + 'eu-west-1': 'arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:18', + // Europe (London) + 'eu-west-2': 'arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:18', + // Europe (Milan) + 'eu-south-1': 'arn:aws:lambda:eu-south-1:339249233099:layer:LambdaInsightsExtension:11', + // Europe (Paris) + 'eu-west-3': 'arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:18', + // Europe (Stockholm) + 'eu-north-1': 'arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:18', + // Middle East (Bahrain) + 'me-south-1': 'arn:aws:lambda:me-south-1:285320876703:layer:LambdaInsightsExtension:11', + // South America (Sao Paulo) + 'sa-east-1': 'arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:18', + }, + }, '1.0.119.0': { arm64: { // US East (N. Virginia) diff --git a/packages/@aws-cdk/region-info/test/__snapshots__/region-info.test.js.snap b/packages/@aws-cdk/region-info/test/__snapshots__/region-info.test.js.snap index 5a3c0e2683c2c..dae9b4dda9d16 100644 --- a/packages/@aws-cdk/region-info/test/__snapshots__/region-info.test.js.snap +++ b/packages/@aws-cdk/region-info/test/__snapshots__/region-info.test.js.snap @@ -7,9 +7,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:af-south-1:012438385374:layer:LambdaInsightsExtension:9", + "1.0.135.0": "arn:aws:lambda:af-south-1:012438385374:layer:LambdaInsightsExtension:11", "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -38,9 +40,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:ap-east-1:519774774795:layer:LambdaInsightsExtension:9", + "1.0.135.0": "arn:aws:lambda:ap-east-1:519774774795:layer:LambdaInsightsExtension:11", "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -69,9 +73,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension-Arm64:1", + "1.0.135.0": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension-Arm64:2", }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:23", + "1.0.135.0": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:25", "1.0.54.0": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:ap-northeast-1:580247275435:layer:LambdaInsightsExtension:12", @@ -100,9 +106,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:16", + "1.0.135.0": "arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:18", "1.0.54.0": "arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:ap-northeast-2:580247275435:layer:LambdaInsightsExtension:12", @@ -131,9 +139,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": "arn:aws:lambda:ap-northeast-3:194566237122:layer:LambdaInsightsExtension:1", "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -162,9 +172,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension-Arm64:1", + "1.0.135.0": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension-Arm64:2", }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:16", + "1.0.135.0": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:18", "1.0.54.0": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:ap-south-1:580247275435:layer:LambdaInsightsExtension:12", @@ -193,9 +205,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension-Arm64:1", + "1.0.135.0": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension-Arm64:2", }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:16", + "1.0.135.0": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:18", "1.0.54.0": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:ap-southeast-1:580247275435:layer:LambdaInsightsExtension:12", @@ -224,9 +238,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension-Arm64:1", + "1.0.135.0": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension-Arm64:2", }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:16", + "1.0.135.0": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:18", "1.0.54.0": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:ap-southeast-2:580247275435:layer:LambdaInsightsExtension:12", @@ -255,9 +271,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -286,9 +304,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:16", + "1.0.135.0": "arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:18", "1.0.54.0": "arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:ca-central-1:580247275435:layer:LambdaInsightsExtension:12", @@ -317,9 +337,11 @@ Object { "domainSuffix": "amazonaws.com.cn", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws-cn:lambda:cn-north-1:488211338238:layer:LambdaInsightsExtension:9", + "1.0.135.0": "arn:aws-cn:lambda:cn-north-1:488211338238:layer:LambdaInsightsExtension:11", "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -348,9 +370,11 @@ Object { "domainSuffix": "amazonaws.com.cn", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws-cn:lambda:cn-northwest-1:488211338238:layer:LambdaInsightsExtension:9", + "1.0.135.0": "arn:aws-cn:lambda:cn-northwest-1:488211338238:layer:LambdaInsightsExtension:11", "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -379,9 +403,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension-Arm64:1", + "1.0.135.0": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension-Arm64:2", }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:16", + "1.0.135.0": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:18", "1.0.54.0": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:eu-central-1:580247275435:layer:LambdaInsightsExtension:12", @@ -410,9 +436,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:16", + "1.0.135.0": "arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:18", "1.0.54.0": "arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:eu-north-1:580247275435:layer:LambdaInsightsExtension:12", @@ -441,9 +469,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:eu-south-1:339249233099:layer:LambdaInsightsExtension:9", + "1.0.135.0": "arn:aws:lambda:eu-south-1:339249233099:layer:LambdaInsightsExtension:11", "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -472,9 +502,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -503,9 +535,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension-Arm64:1", + "1.0.135.0": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension-Arm64:2", }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:16", + "1.0.135.0": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:18", "1.0.54.0": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:12", @@ -534,9 +568,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension-Arm64:1", + "1.0.135.0": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension-Arm64:2", }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:16", + "1.0.135.0": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:18", "1.0.54.0": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:12", @@ -565,9 +601,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:16", + "1.0.135.0": "arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:18", "1.0.54.0": "arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:eu-west-3:580247275435:layer:LambdaInsightsExtension:12", @@ -596,9 +634,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:me-south-1:285320876703:layer:LambdaInsightsExtension:9", + "1.0.135.0": "arn:aws:lambda:me-south-1:285320876703:layer:LambdaInsightsExtension:11", "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -627,9 +667,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:16", + "1.0.135.0": "arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:18", "1.0.54.0": "arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:sa-east-1:580247275435:layer:LambdaInsightsExtension:12", @@ -658,9 +700,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension-Arm64:1", + "1.0.135.0": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension-Arm64:2", }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:16", + "1.0.135.0": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:18", "1.0.54.0": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:12", @@ -689,9 +733,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension-Arm64:1", + "1.0.135.0": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension-Arm64:2", }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:16", + "1.0.135.0": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:18", "1.0.54.0": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:us-east-2:580247275435:layer:LambdaInsightsExtension:12", @@ -720,9 +766,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -751,9 +799,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -782,9 +832,11 @@ Object { "domainSuffix": "c2s.ic.gov", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -813,9 +865,11 @@ Object { "domainSuffix": "c2s.ic.gov", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -844,9 +898,11 @@ Object { "domainSuffix": "sc2s.sgov.gov", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, "1.0.54.0": undefined, "1.0.86.0": undefined, "1.0.89.0": undefined, @@ -875,9 +931,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": undefined, + "1.0.135.0": undefined, }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:16", + "1.0.135.0": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:18", "1.0.54.0": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:us-west-1:580247275435:layer:LambdaInsightsExtension:12", @@ -906,9 +964,11 @@ Object { "domainSuffix": "amazonaws.com", "lambdaInsightsArmVersions": Object { "1.0.119.0": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension-Arm64:1", + "1.0.135.0": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension-Arm64:2", }, "lambdaInsightsVersions": Object { "1.0.119.0": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:16", + "1.0.135.0": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:18", "1.0.54.0": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:2", "1.0.86.0": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:11", "1.0.89.0": "arn:aws:lambda:us-west-2:580247275435:layer:LambdaInsightsExtension:12", From f19ecefcdde712dfd951106bec3b1f850b66f2a8 Mon Sep 17 00:00:00 2001 From: Kaizen Conroy <36202692+kaizencc@users.noreply.github.com> Date: Tue, 31 May 2022 13:26:23 -0500 Subject: [PATCH 15/23] fix(lambda): function version ignores layer version changes (#20150) Fixes #19098. This introduces two bug fixes that are hidden behind a feature flag to preserve the current hash: - lambda layer order is ignored by the hash now - lambda layer version is included in the hash (along with other lambda layer attributes) I also added a few more tests around this area to confirm the current behavior which should help demonstrate what the feature flag will change. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../cdk.out | 2 +- .../integ-distribution-lambda.template.json | 4 +- .../integ.json | 4 +- .../manifest.json | 13 +- .../tree.json | 2 +- .../aws-cdk-codedeploy-lambda.template.json | 4 +- .../deployment-group.integ.snapshot/cdk.out | 2 +- .../integ.json | 4 +- .../manifest.json | 13 +- .../deployment-group.integ.snapshot/tree.json | 2 +- packages/@aws-cdk/aws-lambda/README.md | 43 +++++- .../@aws-cdk/aws-lambda/lib/function-hash.ts | 35 ++++- packages/@aws-cdk/aws-lambda/lib/function.ts | 48 +++++-- packages/@aws-cdk/aws-lambda/lib/layers.ts | 4 +- .../aws-lambda/rosetta/default.ts-fixture | 3 +- .../aws-lambda-autoscaling.template.json | 5 +- .../autoscaling.lit.integ.snapshot/cdk.out | 2 +- .../autoscaling.lit.integ.snapshot/integ.json | 4 +- .../manifest.json | 13 +- .../autoscaling.lit.integ.snapshot/tree.json | 2 +- .../current-version.integ.snapshot/cdk.out | 2 +- .../current-version.integ.snapshot/integ.json | 4 +- .../lambda-test-current-version.template.json | 7 +- .../manifest.json | 18 ++- .../current-version.integ.snapshot/tree.json | 4 +- .../aws-lambda/test/function-hash.test.ts | 135 +++++++++++++++++- .../@aws-cdk/aws-lambda/test/function.test.ts | 90 +++++++++++- .../aws-lambda/test/integ.autoscaling.lit.ts | 7 +- .../aws-lambda/test/integ.current-version.ts | 9 +- .../test/integ.lambda.prov.concurrent.ts | 5 + .../@aws-cdk/aws-lambda/test/integ.lambda.ts | 5 + .../aws-cdk-lambda-1.template.json | 5 +- .../test/lambda.integ.snapshot/cdk.out | 2 +- .../test/lambda.integ.snapshot/integ.json | 4 +- .../test/lambda.integ.snapshot/manifest.json | 13 +- .../test/lambda.integ.snapshot/tree.json | 2 +- .../aws-cdk-lambda-pce-1.template.json | 10 +- .../cdk.out | 2 +- .../integ.json | 4 +- .../manifest.json | 24 +++- .../tree.json | 4 +- packages/@aws-cdk/cx-api/lib/features.ts | 3 + .../MyStack.template.json | 6 +- .../test/triggers.integ.snapshot/cdk.out | 2 +- .../test/triggers.integ.snapshot/integ.json | 4 +- .../triggers.integ.snapshot/manifest.json | 13 +- 46 files changed, 507 insertions(+), 86 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/integ-distribution-lambda.template.json b/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/integ-distribution-lambda.template.json index bc53883f90d56..a67a9c58206d1 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/integ-distribution-lambda.template.json +++ b/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/integ-distribution-lambda.template.json @@ -53,7 +53,7 @@ "LambdaServiceRoleA8ED4D3B" ] }, - "LambdaCurrentVersionDF706F6A9a632a294ae3a9cd4d550f1c4e26619d": { + "LambdaCurrentVersionDF706F6A1ee13d0fa54e9f5621e8c7b616fc53fc": { "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -72,7 +72,7 @@ { "EventType": "origin-request", "LambdaFunctionARN": { - "Ref": "LambdaCurrentVersionDF706F6A9a632a294ae3a9cd4d550f1c4e26619d" + "Ref": "LambdaCurrentVersionDF706F6A1ee13d0fa54e9f5621e8c7b616fc53fc" } } ], diff --git a/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/integ.json b/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/integ.json index a66e912a752e3..18e730b879c13 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/integ.json @@ -1,7 +1,7 @@ { - "version": "18.0.0", + "version": "20.0.0", "testCases": { - "aws-cloudfront/test/integ.distribution-lambda": { + "integ.distribution-lambda": { "stacks": [ "integ-distribution-lambda" ], diff --git a/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/manifest.json index 8e8ff45bad838..77db96a39724b 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -30,7 +30,7 @@ "/integ-distribution-lambda/Lambda/CurrentVersion/Resource": [ { "type": "aws:cdk:logicalId", - "data": "LambdaCurrentVersionDF706F6A9a632a294ae3a9cd4d550f1c4e26619d" + "data": "LambdaCurrentVersionDF706F6A1ee13d0fa54e9f5621e8c7b616fc53fc" } ], "/integ-distribution-lambda/Dist/Resource": [ @@ -38,6 +38,15 @@ "type": "aws:cdk:logicalId", "data": "DistB3B78991" } + ], + "LambdaCurrentVersionDF706F6A9a632a294ae3a9cd4d550f1c4e26619d": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaCurrentVersionDF706F6A9a632a294ae3a9cd4d550f1c4e26619d", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "integ-distribution-lambda" diff --git a/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/tree.json b/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/tree.json index 69962c261ce0b..7c6b25d4f82fc 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-cloudfront/test/distribution-lambda.integ.snapshot/tree.json @@ -166,7 +166,7 @@ "lambdaFunctionAssociations": [ { "lambdaFunctionArn": { - "Ref": "LambdaCurrentVersionDF706F6A9a632a294ae3a9cd4d550f1c4e26619d" + "Ref": "LambdaCurrentVersionDF706F6A1ee13d0fa54e9f5621e8c7b616fc53fc" }, "eventType": "origin-request" } diff --git a/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/aws-cdk-codedeploy-lambda.template.json b/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/aws-cdk-codedeploy-lambda.template.json index 70a1779a5ea6b..53bc85fe76aa9 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/aws-cdk-codedeploy-lambda.template.json +++ b/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/aws-cdk-codedeploy-lambda.template.json @@ -85,7 +85,7 @@ "HandlerServiceRoleFCDC14AE" ] }, - "HandlerCurrentVersion93FB80BFb2a9ce598bf2730613c07e406cddb6b6": { + "HandlerCurrentVersion93FB80BFf2e6129c63154d1f37c0092df295ab51": { "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -101,7 +101,7 @@ }, "FunctionVersion": { "Fn::GetAtt": [ - "HandlerCurrentVersion93FB80BFb2a9ce598bf2730613c07e406cddb6b6", + "HandlerCurrentVersion93FB80BFf2e6129c63154d1f37c0092df295ab51", "Version" ] }, diff --git a/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/integ.json b/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/integ.json index 75997c02f7318..9e8866896e5c8 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/integ.json @@ -1,7 +1,7 @@ { - "version": "18.0.0", + "version": "20.0.0", "testCases": { - "aws-codedeploy/test/lambda/integ.deployment-group": { + "lambda/integ.deployment-group": { "stacks": [ "aws-cdk-codedeploy-lambda" ], diff --git a/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/manifest.json index 01c947d34ebd3..7cd3a1d6fac26 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -68,7 +68,7 @@ "/aws-cdk-codedeploy-lambda/Handler/CurrentVersion/Resource": [ { "type": "aws:cdk:logicalId", - "data": "HandlerCurrentVersion93FB80BFb2a9ce598bf2730613c07e406cddb6b6" + "data": "HandlerCurrentVersion93FB80BFf2e6129c63154d1f37c0092df295ab51" } ], "/aws-cdk-codedeploy-lambda/AssetParameters/edb7466707eb899fbaee22c1e67f9443e9edcc2eeda0b58d8448f7c4157746b3/S3Bucket": [ @@ -202,6 +202,15 @@ "type": "aws:cdk:logicalId", "data": "ServiceprincipalMap" } + ], + "HandlerCurrentVersion93FB80BFb2a9ce598bf2730613c07e406cddb6b6": [ + { + "type": "aws:cdk:logicalId", + "data": "HandlerCurrentVersion93FB80BFb2a9ce598bf2730613c07e406cddb6b6", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-cdk-codedeploy-lambda" diff --git a/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/tree.json b/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/tree.json index 3c8a6e8b0cd6f..71475f602c3a4 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-codedeploy/test/lambda/deployment-group.integ.snapshot/tree.json @@ -313,7 +313,7 @@ }, "functionVersion": { "Fn::GetAtt": [ - "HandlerCurrentVersion93FB80BFb2a9ce598bf2730613c07e406cddb6b6", + "HandlerCurrentVersion93FB80BFf2e6129c63154d1f37c0092df295ab51", "Version" ] }, diff --git a/packages/@aws-cdk/aws-lambda/README.md b/packages/@aws-cdk/aws-lambda/README.md index 6002699b5f982..cbb22cbd4a090 100644 --- a/packages/@aws-cdk/aws-lambda/README.md +++ b/packages/@aws-cdk/aws-lambda/README.md @@ -288,11 +288,20 @@ This has been fixed in the AWS CDK but *existing* users need to opt-in via a [feature flag]. Users who have run `cdk init` since this fix will be opted in, by default. -Existing users will need to enable the [feature flag] +Otherwise, you will need to enable the [feature flag] `@aws-cdk/aws-lambda:recognizeVersionProps`. Since CloudFormation does not -allow duplicate versions, they will also need to make some modification to -their function so that a new version can be created. Any trivial change such as -a whitespace change in the code or a no-op environment variable will suffice. +allow duplicate versions, you will also need to make some modification to +your function so that a new version can be created. To efficiently and trivially +modify all your lambda functions at once, you can attach the +`FunctionVersionUpgrade` aspect to the stack, which slightly alters the +function description. This aspect is intended for one-time use to upgrade the +version of all your functions at the same time, and can safely be removed after +deploying once. + +```ts +const stack = new Stack(); +Aspects.of(stack).add(new lambda.FunctionVersionUpgrade(LAMBDA_RECOGNIZE_VERSION_PROPS)); +``` When the new logic is in effect, you may rarely come across the following error: `The following properties are not recognized as version properties`. This will @@ -304,6 +313,32 @@ record whether a new version should be generated when this property is changed. This can be typically determined by checking whether the property can be modified using the *[UpdateFunctionConfiguration]* API or not. +### `currentVersion`: Updated hashing logic for layer versions + +An additional update to the hashing logic fixes two issues surrounding layers. +Prior to this change, updating the lambda layer version would have no effect on +the function version. Also, the order of lambda layers provided to the function +was unnecessarily baked into the hash. + +This has been fixed in the AWS CDK starting with version 2.27. If you ran +`cdk init` with an earlier version, you will need to opt-in via a [feature flag]. +If you run `cdk init` with v2.27 or later, this fix will be opted in, by default. + +Existing users will need to enable the [feature flag] +`@aws-cdk/aws-lambda:recognizeLayerVersion`. Since CloudFormation does not +allow duplicate versions, they will also need to make some modification to +their function so that a new version can be created. To efficiently and trivially +modify all your lambda functions at once, users can attach the +`FunctionVersionUpgrade` aspect to the stack, which slightly alters the +function description. This aspect is intended for one-time use to upgrade the +version of all your functions at the same time, and can safely be removed after +deploying once. + +```ts +const stack = new Stack(); +Aspects.of(stack).add(new lambda.FunctionVersionUpgrade(LAMBDA_RECOGNIZE_LAYER_VERSION)); +``` + [feature flag]: https://docs.aws.amazon.com/cdk/latest/guide/featureflags.html [property overrides]: https://docs.aws.amazon.com/cdk/latest/guide/cfn_layer.html#cfn_layer_raw [UpdateFunctionConfiguration]: https://docs.aws.amazon.com/lambda/latest/dg/API_UpdateFunctionConfiguration.html diff --git a/packages/@aws-cdk/aws-lambda/lib/function-hash.ts b/packages/@aws-cdk/aws-lambda/lib/function-hash.ts index 0d16849763fec..952f8f43eed8a 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function-hash.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function-hash.ts @@ -1,7 +1,8 @@ import * as crypto from 'crypto'; import { CfnResource, FeatureFlags, Stack } from '@aws-cdk/core'; -import { LAMBDA_RECOGNIZE_VERSION_PROPS } from '@aws-cdk/cx-api'; +import { LAMBDA_RECOGNIZE_LAYER_VERSION, LAMBDA_RECOGNIZE_VERSION_PROPS } from '@aws-cdk/cx-api'; import { Function as LambdaFunction } from './function'; +import { ILayerVersion } from './layers'; export function calculateFunctionHash(fn: LambdaFunction) { const stack = Stack.of(fn); @@ -29,6 +30,10 @@ export function calculateFunctionHash(fn: LambdaFunction) { stringifiedConfig = JSON.stringify(config); } + if (FeatureFlags.of(fn).isEnabled(LAMBDA_RECOGNIZE_LAYER_VERSION)) { + stringifiedConfig = stringifiedConfig + calculateLayersHash(fn._layers); + } + const hash = crypto.createHash('md5'); hash.update(stringifiedConfig); return hash.digest('hex'); @@ -117,3 +122,31 @@ function sortProperties(properties: any) { } return ret; } + +function calculateLayersHash(layers: ILayerVersion[]): string { + const layerConfig: {[key: string]: any } = {}; + for (const layer of layers) { + const stack = Stack.of(layer); + const layerResource = layer.node.defaultChild as CfnResource; + // if there is no layer resource, then the layer was imported + // and we will include the layer arn and runtimes in the hash + if (layerResource === undefined) { + layerConfig[layer.layerVersionArn] = layer.compatibleRuntimes; + continue; + } + const config = stack.resolve((layerResource as any)._toCloudFormation()); + const resources = config.Resources; + const resourceKeys = Object.keys(resources); + if (resourceKeys.length !== 1) { + throw new Error(`Expected one rendered CloudFormation resource but found ${resourceKeys.length}`); + } + const logicalId = resourceKeys[0]; + const properties = resources[logicalId].Properties; + // all properties require replacement, so they are all version locked. + layerConfig[layer.node.id] = properties; + } + + const hash = crypto.createHash('md5'); + hash.update(JSON.stringify(layerConfig)); + return hash.digest('hex'); +} diff --git a/packages/@aws-cdk/aws-lambda/lib/function.ts b/packages/@aws-cdk/aws-lambda/lib/function.ts index ba6ddcf414f82..2dfe5c7ffacdd 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function.ts @@ -6,8 +6,10 @@ import * as kms from '@aws-cdk/aws-kms'; import * as logs from '@aws-cdk/aws-logs'; import * as sns from '@aws-cdk/aws-sns'; import * as sqs from '@aws-cdk/aws-sqs'; -import { Annotations, ArnFormat, CfnResource, Duration, Fn, Lazy, Names, Size, Stack, Token } from '@aws-cdk/core'; +import { Annotations, ArnFormat, CfnResource, Duration, FeatureFlags, Fn, IAspect, IConstruct, Lazy, Names, Size, Stack, Token } from '@aws-cdk/core'; +import { LAMBDA_RECOGNIZE_LAYER_VERSION } from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; +import { AliasOptions, Alias } from './alias'; import { Architecture } from './architecture'; import { Code, CodeConfig } from './code'; import { ICodeSigningConfig } from './code-signing-config'; @@ -26,7 +28,6 @@ import { Runtime } from './runtime'; // keep this import separate from other imports to reduce chance for merge conflicts with v2-main // eslint-disable-next-line import { LogRetentionRetryOptions } from './log-retention'; -import { AliasOptions, Alias } from './alias'; import { addAlias } from './util'; /** @@ -637,10 +638,10 @@ export class Function extends FunctionBase { public readonly permissionsNode = this.node; - protected readonly canCreatePermissions = true; - private readonly layers: ILayerVersion[] = []; + /** @internal */ + public readonly _layers: ILayerVersion[] = []; private _logGroup?: logs.ILogGroup; @@ -777,7 +778,7 @@ export class Function extends FunctionBase { zipFile: code.inlineCode, imageUri: code.image?.imageUri, }, - layers: Lazy.list({ produce: () => this.layers.map(layer => layer.layerVersionArn) }, { omitEmpty: true }), // Evaluated on synthesis + layers: Lazy.list({ produce: () => this.renderLayers() }), // Evaluated on synthesis handler: props.handler === Handler.FROM_IMAGE ? undefined : props.handler, timeout: props.timeout && props.timeout.toSeconds(), packageType: props.runtime === Runtime.FROM_IMAGE ? 'Image' : undefined, @@ -909,7 +910,7 @@ export class Function extends FunctionBase { */ public addLayers(...layers: ILayerVersion[]): void { for (const layer of layers) { - if (this.layers.length === 5) { + if (this._layers.length === 5) { throw new Error('Unable to add layer: this lambda function already uses 5 layers.'); } if (layer.compatibleRuntimes && !layer.compatibleRuntimes.find(runtime => runtime.runtimeEquals(this.runtime))) { @@ -920,8 +921,7 @@ export class Function extends FunctionBase { // Currently no validations for compatible architectures since Lambda service // allows layers configured with one architecture to be used with a Lambda function // from another architecture. - - this.layers.push(layer); + this._layers.push(layer); } } @@ -1050,6 +1050,18 @@ Environment variables can be marked for removal when used in Lambda@Edge by sett this.role?.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('CloudWatchLambdaInsightsExecutionRolePolicy')); } + private renderLayers() { + if (!this._layers || this._layers.length === 0) { + return undefined; + } + + if (FeatureFlags.of(this).isEnabled(LAMBDA_RECOGNIZE_LAYER_VERSION)) { + this._layers.sort(); + } + + return this._layers.map(layer => layer.layerVersionArn); + } + private renderEnvironment() { if (!this.environment || Object.keys(this.environment).length === 0) { return undefined; @@ -1269,3 +1281,23 @@ function undefinedIfNoKeys(struct: A): A | undefined { const allUndefined = Object.values(struct).every(val => val === undefined); return allUndefined ? undefined : struct; } + +/** + * Aspect for upgrading function versions when the feature flag + * provided feature flag present. This can be necessary when the feature flag + * changes the function hash, as such changes must be associated with a new + * version. This aspect will change the function description in these cases, + * which "validates" the new function hash. + */ +export class FunctionVersionUpgrade implements IAspect { + constructor(private readonly featureFlag: string, private readonly enabled=true) {} + + public visit(node: IConstruct): void { + if (node instanceof Function && + this.enabled === FeatureFlags.of(node).isEnabled(this.featureFlag)) { + const cfnFunction = node.node.defaultChild as CfnFunction; + const desc = cfnFunction.description ? `${cfnFunction.description} ` : ''; + cfnFunction.addPropertyOverride('Description', `${desc}version-hash:${calculateFunctionHash(node)}`); + } + }; +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/lib/layers.ts b/packages/@aws-cdk/aws-lambda/lib/layers.ts index 7176badb0ee42..83c548522600f 100644 --- a/packages/@aws-cdk/aws-lambda/lib/layers.ts +++ b/packages/@aws-cdk/aws-lambda/lib/layers.ts @@ -189,9 +189,7 @@ export class LayerVersion extends LayerVersionBase { if (props.compatibleRuntimes && props.compatibleRuntimes.length === 0) { throw new Error('Attempted to define a Lambda layer that supports no runtime!'); } - if (props.code.isInline) { - throw new Error('Lambda layers cannot be created from inline code'); - } + // Allow usage of the code in this context... const code = props.code.bind(this); if (code.inlineCode) { diff --git a/packages/@aws-cdk/aws-lambda/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-lambda/rosetta/default.ts-fixture index 603fe399c1d3e..3519cb4d48595 100644 --- a/packages/@aws-cdk/aws-lambda/rosetta/default.ts-fixture +++ b/packages/@aws-cdk/aws-lambda/rosetta/default.ts-fixture @@ -1,9 +1,10 @@ // Fixture with packages imported, but nothing else import * as path from 'path'; import { Construct } from 'constructs'; -import { CfnOutput, DockerImage, Duration, RemovalPolicy, Stack } from '@aws-cdk/core'; +import { Aspects, CfnOutput, DockerImage, Duration, RemovalPolicy, Stack } from '@aws-cdk/core'; import * as lambda from '@aws-cdk/aws-lambda'; import * as iam from '@aws-cdk/aws-iam'; +import { LAMBDA_RECOGNIZE_VERSION_PROPS, LAMBDA_RECOGNIZE_LAYER_VERSION } from '@aws-cdk/cx-api'; class Fixture extends Stack { constructor(scope: Construct, id: string) { diff --git a/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/aws-lambda-autoscaling.template.json b/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/aws-lambda-autoscaling.template.json index 9fd6b7e176cc1..b01be18dd2aa5 100644 --- a/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/aws-lambda-autoscaling.template.json +++ b/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/aws-lambda-autoscaling.template.json @@ -43,6 +43,7 @@ "Arn" ] }, + "Description": "version-hash:7c384e097d7f7605c9405f788cdf9f7b", "Handler": "index.handler", "Runtime": "nodejs14.x" }, @@ -50,7 +51,7 @@ "MyLambdaServiceRole4539ECB6" ] }, - "MyLambdaCurrentVersionE7A382CCc9b5d5d60612e848a9b7c670d8802822": { + "MyLambdaCurrentVersionE7A382CC0be4c7f7b82230afaf72d130ee920da9": { "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -66,7 +67,7 @@ }, "FunctionVersion": { "Fn::GetAtt": [ - "MyLambdaCurrentVersionE7A382CCc9b5d5d60612e848a9b7c670d8802822", + "MyLambdaCurrentVersionE7A382CC0be4c7f7b82230afaf72d130ee920da9", "Version" ] }, diff --git a/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/integ.json b/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/integ.json index e9dd8f6f0f119..969a25e58ee55 100644 --- a/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/integ.json @@ -1,7 +1,7 @@ { - "version": "18.0.0", + "version": "20.0.0", "testCases": { - "aws-lambda/test/integ.autoscaling.lit": { + "integ.autoscaling.lit": { "stacks": [ "aws-lambda-autoscaling" ], diff --git a/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/manifest.json index 272bf82e48729..64264d0be91ac 100644 --- a/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -30,7 +30,7 @@ "/aws-lambda-autoscaling/MyLambda/CurrentVersion/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaCurrentVersionE7A382CCc9b5d5d60612e848a9b7c670d8802822" + "data": "MyLambdaCurrentVersionE7A382CC0be4c7f7b82230afaf72d130ee920da9" } ], "/aws-lambda-autoscaling/Alias/Resource": [ @@ -56,6 +56,15 @@ "type": "aws:cdk:logicalId", "data": "FunctionName" } + ], + "MyLambdaCurrentVersionE7A382CCa1b19066cadcfb5b078bffbfb5b1e687": [ + { + "type": "aws:cdk:logicalId", + "data": "MyLambdaCurrentVersionE7A382CCa1b19066cadcfb5b078bffbfb5b1e687", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-lambda-autoscaling" diff --git a/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/tree.json b/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/tree.json index 6493369fc0dc1..d83bb4b12de15 100644 --- a/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-lambda/test/autoscaling.lit.integ.snapshot/tree.json @@ -140,7 +140,7 @@ }, "functionVersion": { "Fn::GetAtt": [ - "MyLambdaCurrentVersionE7A382CCc9b5d5d60612e848a9b7c670d8802822", + "MyLambdaCurrentVersionE7A382CC0be4c7f7b82230afaf72d130ee920da9", "Version" ] }, diff --git a/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/integ.json b/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/integ.json index 2b9ccbdbc02cf..45b5d74847cf9 100644 --- a/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/integ.json @@ -1,7 +1,7 @@ { - "version": "18.0.0", + "version": "20.0.0", "testCases": { - "aws-lambda/test/integ.current-version": { + "integ.current-version": { "stacks": [ "lambda-test-current-version" ], diff --git a/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/lambda-test-current-version.template.json b/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/lambda-test-current-version.template.json index a1161bda27260..366be468de3fc 100644 --- a/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/lambda-test-current-version.template.json +++ b/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/lambda-test-current-version.template.json @@ -78,6 +78,7 @@ "Arn" ] }, + "Description": "version-hash:dc9dd00a4c2f3ab3541720d352f0f09e", "Handler": "index.main", "Runtime": "python3.8" }, @@ -85,7 +86,7 @@ "MyLambdaServiceRole4539ECB6" ] }, - "MyLambdaCurrentVersionE7A382CC132baf6493c3210af4c8c0e36b416660": { + "MyLambdaCurrentVersionE7A382CC1c5f33e29b34a521d6a59697cc440454": { "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -103,7 +104,7 @@ }, "Qualifier": { "Fn::GetAtt": [ - "MyLambdaCurrentVersionE7A382CC132baf6493c3210af4c8c0e36b416660", + "MyLambdaCurrentVersionE7A382CC1c5f33e29b34a521d6a59697cc440454", "Version" ] }, @@ -118,7 +119,7 @@ }, "FunctionVersion": { "Fn::GetAtt": [ - "MyLambdaCurrentVersionE7A382CC132baf6493c3210af4c8c0e36b416660", + "MyLambdaCurrentVersionE7A382CC1c5f33e29b34a521d6a59697cc440454", "Version" ] }, diff --git a/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/manifest.json index 5a584ddfbc9d1..c76ae363745ea 100644 --- a/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -44,13 +44,16 @@ "/lambda-test-current-version/MyLambda/CurrentVersion/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaCurrentVersionE7A382CC132baf6493c3210af4c8c0e36b416660" + "data": "MyLambdaCurrentVersionE7A382CC1c5f33e29b34a521d6a59697cc440454" } ], "/lambda-test-current-version/MyLambda/CurrentVersion/EventInvokeConfig/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaCurrentVersionEventInvokeConfigD120DC68" + "data": "MyLambdaCurrentVersionEventInvokeConfigD120DC68", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] } ], "/lambda-test-current-version/MyLambda/CurrentVersion/Aliaslive/Resource": [ @@ -76,6 +79,15 @@ "type": "aws:cdk:logicalId", "data": "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34ArtifactHash70E274C4" } + ], + "MyLambdaCurrentVersionE7A382CC132baf6493c3210af4c8c0e36b416660": [ + { + "type": "aws:cdk:logicalId", + "data": "MyLambdaCurrentVersionE7A382CC132baf6493c3210af4c8c0e36b416660", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "lambda-test-current-version" diff --git a/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/tree.json b/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/tree.json index 4a38c0f7a8bd4..4ca00596e83cd 100644 --- a/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-lambda/test/current-version.integ.snapshot/tree.json @@ -189,7 +189,7 @@ }, "qualifier": { "Fn::GetAtt": [ - "MyLambdaCurrentVersionE7A382CC132baf6493c3210af4c8c0e36b416660", + "MyLambdaCurrentVersionE7A382CC1c5f33e29b34a521d6a59697cc440454", "Version" ] }, @@ -222,7 +222,7 @@ }, "functionVersion": { "Fn::GetAtt": [ - "MyLambdaCurrentVersionE7A382CC132baf6493c3210af4c8c0e36b416660", + "MyLambdaCurrentVersionE7A382CC1c5f33e29b34a521d6a59697cc440454", "Version" ] }, diff --git a/packages/@aws-cdk/aws-lambda/test/function-hash.test.ts b/packages/@aws-cdk/aws-lambda/test/function-hash.test.ts index de07180924ef5..4fcc5b4ed33f9 100644 --- a/packages/@aws-cdk/aws-lambda/test/function-hash.test.ts +++ b/packages/@aws-cdk/aws-lambda/test/function-hash.test.ts @@ -1,7 +1,7 @@ import * as path from 'path'; import { resourceSpecification } from '@aws-cdk/cfnspec'; import { App, CfnOutput, CfnResource, Stack } from '@aws-cdk/core'; -import { LAMBDA_RECOGNIZE_VERSION_PROPS } from '@aws-cdk/cx-api'; +import { LAMBDA_RECOGNIZE_LAYER_VERSION, LAMBDA_RECOGNIZE_VERSION_PROPS } from '@aws-cdk/cx-api'; import * as lambda from '../lib'; import { calculateFunctionHash, trimFromStart, VERSION_LOCKED } from '../lib/function-hash'; @@ -123,8 +123,139 @@ describe('function hash', () => { expect(calculateFunctionHash(fn2)).toEqual('ffedf6424a18a594a513129dc97bf53c'); }); - describe('impact of env variables order on hash', () => { + describe('lambda layers', () => { + let stack1: Stack; + let layer1: lambda.LayerVersion; + let layer2: lambda.LayerVersion; + beforeAll(() => { + stack1 = new Stack(); + layer1 = new lambda.LayerVersion(stack1, 'MyLayer', { + code: lambda.Code.fromAsset(path.join(__dirname, 'layer-code')), + compatibleRuntimes: [lambda.Runtime.NODEJS_12_X], + license: 'Apache-2.0', + description: 'A layer to test the L2 construct', + }); + layer2 = new lambda.LayerVersion(stack1, 'MyLayer2', { + code: lambda.Code.fromAsset(path.join(__dirname, 'layer-code')), + compatibleRuntimes: [lambda.Runtime.NODEJS_12_X], + license: 'Apache-2.0', + description: 'A layer to test the L2 construct', + }); + }); + + test('same configuration yields the same hash', () => { + const stack2 = new Stack(); + const fn1 = new lambda.Function(stack2, 'MyFunction', { + runtime: lambda.Runtime.NODEJS_12_X, + code: lambda.Code.fromInline('foo'), + handler: 'index.handler', + layers: [layer1], + }); + + const stack3 = new Stack(); + const fn2 = new lambda.Function(stack3, 'MyFunction', { + runtime: lambda.Runtime.NODEJS_12_X, + code: lambda.Code.fromInline('foo'), + handler: 'index.handler', + layers: [layer1], + }); + + expect(calculateFunctionHash(fn1)).toEqual(calculateFunctionHash(fn2)); + expect(calculateFunctionHash(fn1)).toEqual('028f8a4cb1c719f29e70b7b3c0f2a9d7'); + }); + + test('different layers impacts hash', () => { + const stack2 = new Stack(); + const fn1 = new lambda.Function(stack2, 'MyFunction', { + runtime: lambda.Runtime.NODEJS_12_X, + code: lambda.Code.fromInline('foo'), + handler: 'index.handler', + layers: [layer1], + }); + + const stack3 = new Stack(); + const fn2 = new lambda.Function(stack3, 'MyFunction', { + runtime: lambda.Runtime.NODEJS_12_X, + code: lambda.Code.fromInline('foo'), + handler: 'index.handler', + layers: [layer2], + }); + + expect(calculateFunctionHash(fn1)).toEqual('028f8a4cb1c719f29e70b7b3c0f2a9d7'); + expect(calculateFunctionHash(fn2)).toEqual('e74647bf81c4d532137545c8234726f3'); + }); + + describe('impact of lambda layer order on hash', () => { + test('without feature flag, preserve old behavior to avoid unnecessary invalidation of templates', () => { + const stack2 = new Stack(); + const fn1 = new lambda.Function(stack2, 'MyFunction', { + runtime: lambda.Runtime.NODEJS_12_X, + code: lambda.Code.fromInline('foo'), + handler: 'index.handler', + layers: [layer1, layer2], + }); + + const stack3 = new Stack(); + const fn2 = new lambda.Function(stack3, 'MyFunction', { + runtime: lambda.Runtime.NODEJS_12_X, + code: lambda.Code.fromInline('foo'), + handler: 'index.handler', + layers: [layer2, layer1], + }); + + expect(calculateFunctionHash(fn1)).toEqual('b6cade45d8f9c77f29f0ab169004113c'); + expect(calculateFunctionHash(fn2)).toEqual('0d79a0b6bcac599b278e63b173eca170'); + }); + test('with feature flag, we sort layers so order is consistent', () => { + const app = new App({ context: { [LAMBDA_RECOGNIZE_LAYER_VERSION]: true } }); + + const stack2 = new Stack(app, 'stack2'); + const fn1 = new lambda.Function(stack2, 'MyFunction', { + runtime: lambda.Runtime.NODEJS_12_X, + code: lambda.Code.fromInline('foo'), + handler: 'index.handler', + layers: [layer1, layer2], + }); + + const stack3 = new Stack(app, 'stack3'); + const fn2 = new lambda.Function(stack3, 'MyFunction', { + runtime: lambda.Runtime.NODEJS_12_X, + code: lambda.Code.fromInline('foo'), + handler: 'index.handler', + layers: [layer2, layer1], + }); + + expect(calculateFunctionHash(fn1)).toEqual(calculateFunctionHash(fn2)); + }); + }); + + test('with feature flag, imported lambda layers can be distinguished', () => { + const app = new App({ context: { [LAMBDA_RECOGNIZE_LAYER_VERSION]: true } }); + + const stack2 = new Stack(app, 'stack2'); + const importedLayer1 = lambda.LayerVersion.fromLayerVersionArn(stack2, 'imported-layer', 'arn:aws:lambda:::layer::'); + const fn1 = new lambda.Function(stack2, 'MyFunction', { + runtime: lambda.Runtime.NODEJS_12_X, + code: lambda.Code.fromInline('foo'), + handler: 'index.handler', + layers: [importedLayer1], + }); + + const stack3 = new Stack(app, 'stack3'); + const importedLayer2 = lambda.LayerVersion.fromLayerVersionArn(stack3, 'imported-layer', 'arn:aws:lambda:::layer::'); + const fn2 = new lambda.Function(stack3, 'MyFunction', { + runtime: lambda.Runtime.NODEJS_12_X, + code: lambda.Code.fromInline('foo'), + handler: 'index.handler', + layers: [importedLayer2], + }); + + expect(calculateFunctionHash(fn1)).not.toEqual(calculateFunctionHash(fn2)); + }); + }); + + describe('impact of env variables order on hash', () => { test('without "currentVersion", we preserve old behavior to avoid unnecessary invalidation of templates', () => { const stack1 = new Stack(); const fn1 = new lambda.Function(stack1, 'MyFunction', { diff --git a/packages/@aws-cdk/aws-lambda/test/function.test.ts b/packages/@aws-cdk/aws-lambda/test/function.test.ts index 187fa061b2e19..c644e59a70e03 100644 --- a/packages/@aws-cdk/aws-lambda/test/function.test.ts +++ b/packages/@aws-cdk/aws-lambda/test/function.test.ts @@ -12,10 +12,12 @@ import * as sns from '@aws-cdk/aws-sns'; import * as sqs from '@aws-cdk/aws-sqs'; import { testDeprecated } from '@aws-cdk/cdk-build-tools'; import * as cdk from '@aws-cdk/core'; -import { Lazy, Size } from '@aws-cdk/core'; +import { Aspects, Lazy, Size } from '@aws-cdk/core'; +import { LAMBDA_RECOGNIZE_LAYER_VERSION } from '@aws-cdk/cx-api'; import * as constructs from 'constructs'; import * as _ from 'lodash'; import * as lambda from '../lib'; +import { calculateFunctionHash } from '../lib/function-hash'; describe('function', () => { test('default function', () => { @@ -1437,6 +1439,69 @@ describe('function', () => { expect(bindTarget).toEqual(fn); }); + test('layer is baked into the function version', () => { + // GIVEN + const stack = new cdk.Stack(undefined, 'TestStack'); + const bucket = new s3.Bucket(stack, 'Bucket'); + const code = new lambda.S3Code(bucket, 'ObjectKey'); + + const fn = new lambda.Function(stack, 'fn', { + runtime: lambda.Runtime.NODEJS_14_X, + code: lambda.Code.fromInline('exports.main = function() { console.log("DONE"); }'), + handler: 'index.main', + }); + + const fnHash = calculateFunctionHash(fn); + + // WHEN + const layer = new lambda.LayerVersion(stack, 'LayerVersion', { + code, + compatibleRuntimes: [lambda.Runtime.NODEJS_14_X], + }); + + fn.addLayers(layer); + + const newFnHash = calculateFunctionHash(fn); + + expect(fnHash).not.toEqual(newFnHash); + }); + + test('with feature flag, layer version is baked into function version', () => { + // GIVEN + const app = new cdk.App({ context: { [LAMBDA_RECOGNIZE_LAYER_VERSION]: true } }); + const stack = new cdk.Stack(app, 'TestStack'); + const bucket = new s3.Bucket(stack, 'Bucket'); + const code = new lambda.S3Code(bucket, 'ObjectKey'); + const layer = new lambda.LayerVersion(stack, 'LayerVersion', { + code, + compatibleRuntimes: [lambda.Runtime.NODEJS_14_X], + }); + + // function with layer + const fn = new lambda.Function(stack, 'fn', { + runtime: lambda.Runtime.NODEJS_14_X, + code: lambda.Code.fromInline('exports.main = function() { console.log("DONE"); }'), + handler: 'index.main', + layers: [layer], + }); + + const fnHash = calculateFunctionHash(fn); + + // use escape hatch to change the content of the layer + // this simulates updating the layer code which changes the version. + const cfnLayer = layer.node.defaultChild as lambda.CfnLayerVersion; + const newCode = (new lambda.S3Code(bucket, 'NewObjectKey')).bind(layer); + cfnLayer.content = { + s3Bucket: newCode.s3Location!.bucketName, + s3Key: newCode.s3Location!.objectKey, + s3ObjectVersion: newCode.s3Location!.objectVersion, + }; + + const newFnHash = calculateFunctionHash(fn); + + expect(fnHash).not.toEqual(newFnHash); + }); + test('using an incompatible layer', () => { // GIVEN const stack = new cdk.Stack(undefined, 'TestStack'); @@ -2895,6 +2960,29 @@ test('ephemeral storage allows unresolved tokens', () => { }).not.toThrow(); }); +test('FunctionVersionUpgrade adds new description to function', () => { + const app = new cdk.App({ context: { [LAMBDA_RECOGNIZE_LAYER_VERSION]: true } }); + const stack = new cdk.Stack(app); + new lambda.Function(stack, 'MyLambda', { + code: new lambda.InlineCode('foo'), + handler: 'bar', + runtime: lambda.Runtime.NODEJS_14_X, + description: 'my description', + }); + + Aspects.of(stack).add(new lambda.FunctionVersionUpgrade(LAMBDA_RECOGNIZE_LAYER_VERSION)); + + Template.fromStack(stack).hasResource('AWS::Lambda::Function', { + Properties: + { + Code: { ZipFile: 'foo' }, + Handler: 'bar', + Runtime: 'nodejs14.x', + Description: 'my description version-hash:de36a94cfdb5cb58f7c7b4cd975120ba', + }, + }); +}); + function newTestLambda(scope: constructs.Construct) { return new lambda.Function(scope, 'MyLambda', { code: new lambda.InlineCode('foo'), diff --git a/packages/@aws-cdk/aws-lambda/test/integ.autoscaling.lit.ts b/packages/@aws-cdk/aws-lambda/test/integ.autoscaling.lit.ts index ec6387c230c1a..6203e718caafc 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.autoscaling.lit.ts +++ b/packages/@aws-cdk/aws-lambda/test/integ.autoscaling.lit.ts @@ -1,5 +1,6 @@ import * as appscaling from '@aws-cdk/aws-applicationautoscaling'; import * as cdk from '@aws-cdk/core'; +import { LAMBDA_RECOGNIZE_LAYER_VERSION } from '@aws-cdk/cx-api'; import * as lambda from '../lib'; /** @@ -48,6 +49,10 @@ class TestStack extends cdk.Stack { const app = new cdk.App(); -new TestStack(app, 'aws-lambda-autoscaling'); +const stack = new TestStack(app, 'aws-lambda-autoscaling'); + +// Changes the function description when the feature flag is present +// to validate the changed function hash. +cdk.Aspects.of(stack).add(new lambda.FunctionVersionUpgrade(LAMBDA_RECOGNIZE_LAYER_VERSION)); app.synth(); diff --git a/packages/@aws-cdk/aws-lambda/test/integ.current-version.ts b/packages/@aws-cdk/aws-lambda/test/integ.current-version.ts index a6f4e4dae32c0..441f687d7d0cc 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.current-version.ts +++ b/packages/@aws-cdk/aws-lambda/test/integ.current-version.ts @@ -1,5 +1,6 @@ import * as path from 'path'; -import { App, RemovalPolicy, Stack } from '@aws-cdk/core'; +import { Aspects, App, RemovalPolicy, Stack } from '@aws-cdk/core'; +import { LAMBDA_RECOGNIZE_LAYER_VERSION } from '@aws-cdk/cx-api'; import * as lambda from '../lib'; class TestStack extends Stack { @@ -22,6 +23,10 @@ class TestStack extends Stack { const app = new App(); -new TestStack(app, 'lambda-test-current-version'); +const stack = new TestStack(app, 'lambda-test-current-version'); + +// Changes the function description when the feature flag is present +// to validate the changed function hash. +Aspects.of(stack).add(new lambda.FunctionVersionUpgrade(LAMBDA_RECOGNIZE_LAYER_VERSION)); app.synth(); diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.prov.concurrent.ts b/packages/@aws-cdk/aws-lambda/test/integ.lambda.prov.concurrent.ts index dde4a27d84ceb..a0d576926ded7 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.prov.concurrent.ts +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda.prov.concurrent.ts @@ -1,5 +1,6 @@ import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; +import { LAMBDA_RECOGNIZE_LAYER_VERSION } from '@aws-cdk/cx-api'; import * as lambda from '../lib'; const app = new cdk.App(); @@ -61,4 +62,8 @@ alias2.addPermission('AliasPermission2', { principal: new iam.ServicePrincipal('cloudformation.amazonaws.com'), }); +// Changes the function description when the feature flag is present +// to validate the changed function hash. +cdk.Aspects.of(stack).add(new lambda.FunctionVersionUpgrade(LAMBDA_RECOGNIZE_LAYER_VERSION)); + app.synth(); diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.ts b/packages/@aws-cdk/aws-lambda/test/integ.lambda.ts index 91aa827178dd4..c00e9d141a4f6 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.ts +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda.ts @@ -1,5 +1,6 @@ import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; +import { LAMBDA_RECOGNIZE_LAYER_VERSION } from '@aws-cdk/cx-api'; import * as lambda from '../lib'; const app = new cdk.App(); @@ -31,4 +32,8 @@ alias.addFunctionUrl({ authType: lambda.FunctionUrlAuthType.NONE, }); +// Changes the function description when the feature flag is present +// to validate the changed function hash. +cdk.Aspects.of(stack).add(new lambda.FunctionVersionUpgrade(LAMBDA_RECOGNIZE_LAYER_VERSION)); + app.synth(); diff --git a/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/aws-cdk-lambda-1.template.json b/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/aws-cdk-lambda-1.template.json index c53bfeebcfdbb..1bb221f35344f 100644 --- a/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/aws-cdk-lambda-1.template.json +++ b/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/aws-cdk-lambda-1.template.json @@ -64,6 +64,7 @@ "Arn" ] }, + "Description": "version-hash:1786de9fc1bc4cb2fd5b64d612628c6f", "Handler": "index.handler", "Runtime": "nodejs14.x" }, @@ -84,7 +85,7 @@ } } }, - "MyLambdaCurrentVersionE7A382CCaab0ffd2d3271bb29338c3fe7c7f3151": { + "MyLambdaCurrentVersionE7A382CCac1a0c5f52d7e233eaf45e0c00b74629": { "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -100,7 +101,7 @@ }, "FunctionVersion": { "Fn::GetAtt": [ - "MyLambdaCurrentVersionE7A382CCaab0ffd2d3271bb29338c3fe7c7f3151", + "MyLambdaCurrentVersionE7A382CCac1a0c5f52d7e233eaf45e0c00b74629", "Version" ] }, diff --git a/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/integ.json b/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/integ.json index 8dcb9904fbcd8..0ab510ff8ab8f 100644 --- a/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/integ.json @@ -1,7 +1,7 @@ { - "version": "18.0.0", + "version": "20.0.0", "testCases": { - "aws-lambda/test/integ.lambda": { + "integ.lambda": { "stacks": [ "aws-cdk-lambda-1" ], diff --git a/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/manifest.json index 6b8aaa9c4ab1d..6f86b84603474 100644 --- a/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -42,7 +42,7 @@ "/aws-cdk-lambda-1/MyLambda/CurrentVersion/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaCurrentVersionE7A382CCaab0ffd2d3271bb29338c3fe7c7f3151" + "data": "MyLambdaCurrentVersionE7A382CCac1a0c5f52d7e233eaf45e0c00b74629" } ], "/aws-cdk-lambda-1/Alias/Resource": [ @@ -68,6 +68,15 @@ "type": "aws:cdk:logicalId", "data": "Aliasinvokefunctionurl4CA9917B" } + ], + "MyLambdaCurrentVersionE7A382CC7e2eef94b9010f0c2a5e7db748a3833a": [ + { + "type": "aws:cdk:logicalId", + "data": "MyLambdaCurrentVersionE7A382CC7e2eef94b9010f0c2a5e7db748a3833a", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-cdk-lambda-1" diff --git a/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/tree.json b/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/tree.json index 17bb14e72105f..0c403b8704fc2 100644 --- a/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-lambda/test/lambda.integ.snapshot/tree.json @@ -209,7 +209,7 @@ }, "functionVersion": { "Fn::GetAtt": [ - "MyLambdaCurrentVersionE7A382CCaab0ffd2d3271bb29338c3fe7c7f3151", + "MyLambdaCurrentVersionE7A382CCac1a0c5f52d7e233eaf45e0c00b74629", "Version" ] }, diff --git a/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/aws-cdk-lambda-pce-1.template.json b/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/aws-cdk-lambda-pce-1.template.json index 8527e8c9021f3..87e7bcb71d172 100644 --- a/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/aws-cdk-lambda-pce-1.template.json +++ b/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/aws-cdk-lambda-pce-1.template.json @@ -64,6 +64,7 @@ "Arn" ] }, + "Description": "version-hash:22935888161d542257ba1aa7d6060c95", "Handler": "index.handler", "Runtime": "nodejs14.x" }, @@ -72,7 +73,7 @@ "MyLambdaAliasPCEServiceRoleF7C9F212" ] }, - "MyLambdaAliasPCECurrentVersion072335D3f742c0f8cc0b7f48bb32fb34b63bc22c": { + "MyLambdaAliasPCECurrentVersion072335D3224448d87cb592b450e76b3259c1d874": { "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -88,7 +89,7 @@ }, "FunctionVersion": { "Fn::GetAtt": [ - "MyLambdaAliasPCECurrentVersion072335D3f742c0f8cc0b7f48bb32fb34b63bc22c", + "MyLambdaAliasPCECurrentVersion072335D3224448d87cb592b450e76b3259c1d874", "Version" ] }, @@ -172,6 +173,7 @@ "Arn" ] }, + "Description": "version-hash:fa78bcfe53ab85fefd72b3ac4cc5679c", "Handler": "index.handler", "Runtime": "nodejs14.x" }, @@ -180,7 +182,7 @@ "MyLambdaVersionPCEServiceRole2ACFB73E" ] }, - "MyLambdaVersionPCECurrentVersion27FC3932fbc6188ae863cb6dc15d61f96ad00420": { + "MyLambdaVersionPCECurrentVersion27FC3932d779c9115684f8f405cbd7282b1508f5": { "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -199,7 +201,7 @@ }, "FunctionVersion": { "Fn::GetAtt": [ - "MyLambdaVersionPCECurrentVersion27FC3932fbc6188ae863cb6dc15d61f96ad00420", + "MyLambdaVersionPCECurrentVersion27FC3932d779c9115684f8f405cbd7282b1508f5", "Version" ] }, diff --git a/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/integ.json b/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/integ.json index 0ae14379f1ad9..9c97cfe4b427e 100644 --- a/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/integ.json @@ -1,7 +1,7 @@ { - "version": "18.0.0", + "version": "20.0.0", "testCases": { - "aws-lambda/test/integ.lambda.prov.concurrent": { + "integ.lambda.prov.concurrent": { "stacks": [ "aws-cdk-lambda-pce-1" ], diff --git a/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/manifest.json index a9884c51f90b1..148240ef61612 100644 --- a/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -36,7 +36,7 @@ "/aws-cdk-lambda-pce-1/MyLambdaAliasPCE/CurrentVersion/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaAliasPCECurrentVersion072335D3f742c0f8cc0b7f48bb32fb34b63bc22c" + "data": "MyLambdaAliasPCECurrentVersion072335D3224448d87cb592b450e76b3259c1d874" } ], "/aws-cdk-lambda-pce-1/Alias/Resource": [ @@ -72,7 +72,7 @@ "/aws-cdk-lambda-pce-1/MyLambdaVersionPCE/CurrentVersion/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaVersionPCECurrentVersion27FC3932fbc6188ae863cb6dc15d61f96ad00420" + "data": "MyLambdaVersionPCECurrentVersion27FC3932d779c9115684f8f405cbd7282b1508f5" } ], "/aws-cdk-lambda-pce-1/Alias2/Resource": [ @@ -86,6 +86,24 @@ "type": "aws:cdk:logicalId", "data": "Alias2AliasPermission2448514B6" } + ], + "MyLambdaAliasPCECurrentVersion072335D369bedb3f5cf56c66c63ccfdba59d5d84": [ + { + "type": "aws:cdk:logicalId", + "data": "MyLambdaAliasPCECurrentVersion072335D369bedb3f5cf56c66c63ccfdba59d5d84", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "MyLambdaVersionPCECurrentVersion27FC3932fc9df6df91e1aac821ec45a32cf17e32": [ + { + "type": "aws:cdk:logicalId", + "data": "MyLambdaVersionPCECurrentVersion27FC3932fc9df6df91e1aac821ec45a32cf17e32", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-cdk-lambda-pce-1" diff --git a/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/tree.json b/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/tree.json index 1e3519beec613..f1e633686f53b 100644 --- a/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-lambda/test/lambda.prov.concurrent.integ.snapshot/tree.json @@ -179,7 +179,7 @@ }, "functionVersion": { "Fn::GetAtt": [ - "MyLambdaAliasPCECurrentVersion072335D3f742c0f8cc0b7f48bb32fb34b63bc22c", + "MyLambdaAliasPCECurrentVersion072335D3224448d87cb592b450e76b3259c1d874", "Version" ] }, @@ -392,7 +392,7 @@ }, "functionVersion": { "Fn::GetAtt": [ - "MyLambdaVersionPCECurrentVersion27FC3932fbc6188ae863cb6dc15d61f96ad00420", + "MyLambdaVersionPCECurrentVersion27FC3932d779c9115684f8f405cbd7282b1508f5", "Version" ] }, diff --git a/packages/@aws-cdk/cx-api/lib/features.ts b/packages/@aws-cdk/cx-api/lib/features.ts index 21918585ae183..d1dd205efc06f 100644 --- a/packages/@aws-cdk/cx-api/lib/features.ts +++ b/packages/@aws-cdk/cx-api/lib/features.ts @@ -173,6 +173,8 @@ export const EFS_DEFAULT_ENCRYPTION_AT_REST = '@aws-cdk/aws-efs:defaultEncryptio */ export const LAMBDA_RECOGNIZE_VERSION_PROPS = '@aws-cdk/aws-lambda:recognizeVersionProps'; +export const LAMBDA_RECOGNIZE_LAYER_VERSION = '@aws-cdk/aws-lambda:recognizeLayerVersion'; + /** * Enable this feature flag to have cloudfront distributions use the security policy TLSv1.2_2021 by default. * @@ -255,6 +257,7 @@ export const FUTURE_FLAGS: { [key: string]: boolean } = { [RDS_LOWERCASE_DB_IDENTIFIER]: true, [EFS_DEFAULT_ENCRYPTION_AT_REST]: true, [LAMBDA_RECOGNIZE_VERSION_PROPS]: true, + [LAMBDA_RECOGNIZE_LAYER_VERSION]: true, [CLOUDFRONT_DEFAULT_SECURITY_POLICY_TLS_V1_2_2021]: true, [ECS_SERVICE_EXTENSIONS_ENABLE_DEFAULT_LOG_DRIVER]: true, [EC2_UNIQUE_IMDSV2_LAUNCH_TEMPLATE_NAME]: true, diff --git a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/MyStack.template.json b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/MyStack.template.json index 188f4cdd055a0..112695ca01809 100644 --- a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/MyStack.template.json +++ b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/MyStack.template.json @@ -69,7 +69,7 @@ ] }, "HandlerArn": { - "Ref": "MyFunctionCurrentVersion197490AF776ea8de2edf446759649703b18110a4" + "Ref": "MyFunctionCurrentVersion197490AFd41a8aa4109c7b22dd39d6bef408da46" } }, "DependsOn": [ @@ -78,7 +78,7 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, - "MyFunctionCurrentVersion197490AF776ea8de2edf446759649703b18110a4": { + "MyFunctionCurrentVersion197490AFd41a8aa4109c7b22dd39d6bef408da46": { "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -119,7 +119,7 @@ ], "Resource": [ { - "Ref": "MyFunctionCurrentVersion197490AF776ea8de2edf446759649703b18110a4" + "Ref": "MyFunctionCurrentVersion197490AFd41a8aa4109c7b22dd39d6bef408da46" } ] } diff --git a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/cdk.out b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/integ.json b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/integ.json index c6e52debf5128..bccfdf584b074 100644 --- a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/integ.json +++ b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/integ.json @@ -1,7 +1,7 @@ { - "version": "18.0.0", + "version": "20.0.0", "testCases": { - "triggers/test/integ.triggers": { + "integ.triggers": { "stacks": [ "MyStack" ], diff --git a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/manifest.json b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/manifest.json index f362fc350ddae..a71ae08f02057 100644 --- a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -62,7 +62,7 @@ "/MyStack/MyFunction/CurrentVersion/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyFunctionCurrentVersion197490AF776ea8de2edf446759649703b18110a4" + "data": "MyFunctionCurrentVersion197490AFd41a8aa4109c7b22dd39d6bef408da46" } ], "/MyStack/AWSCDK.TriggerCustomResourceProviderCustomResourceProvider/Role": [ @@ -94,6 +94,15 @@ "type": "aws:cdk:logicalId", "data": "AssetParameters6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2ArtifactHash29DBC1FA" } + ], + "MyFunctionCurrentVersion197490AF776ea8de2edf446759649703b18110a4": [ + { + "type": "aws:cdk:logicalId", + "data": "MyFunctionCurrentVersion197490AF776ea8de2edf446759649703b18110a4", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "MyStack" From e44c2c436d41a9993714d7e9ff5a9ed95b5677f1 Mon Sep 17 00:00:00 2001 From: Cory Hall <43035978+corymhall@users.noreply.github.com> Date: Wed, 1 Jun 2022 06:04:08 -0400 Subject: [PATCH 16/23] fix(core): logicalId is consumed prior to being overridden (#20560) When using `Stack.exportValue` to manually create a CloudFormation export, the logicalId of the referenced resource is used to generate the logicalId of the `CfnExport`. Because `exportValue` creates a `CfnExport` _and_ returns an `importValue` it needs to _resolve_ the logicalId at call time. If the user later overrides the logicalId of the referenced resource, that override is reflected in the export/import that was created earlier. There doesn't seem to be a way to solve this without incurring a breaking change so this PR attempts to smooth a rough edge by "locking" the `logicalId` when `exportValue` is called. If the user attempts to override the id _after_ that point, an error message will be thrown closes #14335 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/core/lib/cfn-element.ts | 40 +++++++++++++++++++- packages/@aws-cdk/core/lib/stack.ts | 8 ++++ packages/@aws-cdk/core/test/stack.test.ts | 46 +++++++++++++++++++++++ 3 files changed, 93 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/core/lib/cfn-element.ts b/packages/@aws-cdk/core/lib/cfn-element.ts index 84126add4e13c..feac7bd320dac 100644 --- a/packages/@aws-cdk/core/lib/cfn-element.ts +++ b/packages/@aws-cdk/core/lib/cfn-element.ts @@ -47,6 +47,14 @@ export abstract class CfnElement extends CoreConstruct { */ private _logicalIdOverride?: string; + /** + * If the logicalId is locked then it can no longer be overridden. + * This is needed for cases where the logicalId is consumed prior to synthesis + * (i.e. Stack.exportValue). + */ + private _logicalIdLocked?: boolean; + + /** * Creates an entity and binds it to a tree. * Note that the root of the tree must be a Stack object (not just any Root). @@ -75,7 +83,37 @@ export abstract class CfnElement extends CoreConstruct { * @param newLogicalId The new logical ID to use for this stack element. */ public overrideLogicalId(newLogicalId: string) { - this._logicalIdOverride = newLogicalId; + if (this._logicalIdLocked) { + throw new Error(`The logicalId for resource at path ${Node.of(this).path} has been locked and cannot be overridden\n` + + 'Make sure you are calling "overrideLogicalId" before Stack.exportValue'); + } else { + this._logicalIdOverride = newLogicalId; + } + } + + /** + * Lock the logicalId of the element and do not allow + * any updates (e.g. via overrideLogicalId) + * + * This is needed in cases where you are consuming the LogicalID + * of an element prior to synthesis and you need to not allow future + * changes to the id since doing so would cause the value you just + * consumed to differ from the synth time value of the logicalId. + * + * For example: + * + * const bucket = new Bucket(stack, 'Bucket'); + * stack.exportValue(bucket.bucketArn) <--- consuming the logicalId + * bucket.overrideLogicalId('NewLogicalId') <--- updating logicalId + * + * You should most likely never need to use this method, and if + * you are implementing a feature that requires this, make sure + * you actually require it. + * + * @internal + */ + public _lockLogicalId(): void { + this._logicalIdLocked = true; } /** diff --git a/packages/@aws-cdk/core/lib/stack.ts b/packages/@aws-cdk/core/lib/stack.ts index 4e6287f72fc2b..6a9274b4bc1f0 100644 --- a/packages/@aws-cdk/core/lib/stack.ts +++ b/packages/@aws-cdk/core/lib/stack.ts @@ -907,6 +907,14 @@ export class Stack extends CoreConstruct implements ITaggable { throw new Error('exportValue: either supply \'name\' or make sure to export a resource attribute (like \'bucket.bucketName\')'); } + // if exportValue is being called manually (which is pre onPrepare) then the logicalId + // could potentially be changed by a call to overrideLogicalId. This would cause our Export/Import + // to have an incorrect id. For a better user experience, lock the logicalId and throw an error + // if the user tries to override the id _after_ calling exportValue + if (CfnElement.isCfnElement(resolvable.target)) { + resolvable.target._lockLogicalId(); + } + // "teleport" the value here, in case it comes from a nested stack. This will also // ensure the value is from our own scope. const exportable = referenceNestedStackValueInParent(resolvable, this); diff --git a/packages/@aws-cdk/core/test/stack.test.ts b/packages/@aws-cdk/core/test/stack.test.ts index d55352601503b..f0f1637ed54ad 100644 --- a/packages/@aws-cdk/core/test/stack.test.ts +++ b/packages/@aws-cdk/core/test/stack.test.ts @@ -576,6 +576,52 @@ describe('stack', () => { expect(templateA).toEqual(templateM); }); + test('throw error if overrideLogicalId is used and logicalId is locked', () => { + // GIVEN: manual + const appM = new App(); + const producerM = new Stack(appM, 'Producer'); + const resourceM = new CfnResource(producerM, 'ResourceXXX', { type: 'AWS::Resource' }); + producerM.exportValue(resourceM.getAtt('Att')); + + // THEN - producers are the same + expect(() => { + resourceM.overrideLogicalId('OVERRIDE_LOGICAL_ID'); + }).toThrow(/The logicalId for resource at path Producer\/ResourceXXX has been locked and cannot be overridden/); + }); + + test('do not throw error if overrideLogicalId is used and logicalId is not locked', () => { + // GIVEN: manual + const appM = new App(); + const producerM = new Stack(appM, 'Producer'); + const resourceM = new CfnResource(producerM, 'ResourceXXX', { type: 'AWS::Resource' }); + + // THEN - producers are the same + resourceM.overrideLogicalId('OVERRIDE_LOGICAL_ID'); + producerM.exportValue(resourceM.getAtt('Att')); + + const template = appM.synth().getStackByName(producerM.stackName).template; + expect(template).toEqual({ + Outputs: { + ExportsOutputFnGetAttOVERRIDELOGICALIDAtt2DD28019: { + Export: { + Name: 'Producer:ExportsOutputFnGetAttOVERRIDELOGICALIDAtt2DD28019', + }, + Value: { + 'Fn::GetAtt': [ + 'OVERRIDE_LOGICAL_ID', + 'Att', + ], + }, + }, + }, + Resources: { + OVERRIDE_LOGICAL_ID: { + Type: 'AWS::Resource', + }, + }, + }); + }); + test('automatic cross-stack references and manual exports look the same: nested stack edition', () => { // GIVEN: automatic const appA = new App(); From 9a23575f4590a170caf79f4141c16adf431e7c40 Mon Sep 17 00:00:00 2001 From: Joe Flateau Date: Wed, 1 Jun 2022 06:48:36 -0400 Subject: [PATCH 17/23] fix(ecr-assets): cannot build ARM images using modern stack synthesis (#20563) #20439 added support for the --platform option for docker build but the platform prop was not properly passed through when using the new DefaultStackSynthesizer. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-ecr-assets/test/image-asset.test.ts | 16 ++++++++++++++++ .../_asset-manifest-builder.ts | 1 + 2 files changed, 17 insertions(+) diff --git a/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts b/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts index 4fe6299ab9c87..89a5aeb3d0309 100644 --- a/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts +++ b/packages/@aws-cdk/aws-ecr-assets/test/image-asset.test.ts @@ -170,6 +170,22 @@ describe('image asset', () => { expect(assetMetadata && (assetMetadata.data as cxschema.ContainerImageAssetMetadataEntry).platform).toEqual('linux/arm64'); }); + testFutureBehavior('with platform: default synth edition', flags, App, (app) => { + // GIVEN + const stack = new Stack(app, 'Stack', { synthesizer: new DefaultStackSynthesizer() }); + // WHEN + const asset = new DockerImageAsset(stack, 'Image', { + directory: path.join(__dirname, 'demo-image'), + platform: Platform.LINUX_ARM64, + }); + + // THEN + const asm = app.synth(); + const stackAssets = JSON.parse(fs.readFileSync(path.join(asm.directory, 'Stack.assets.json'), { encoding: 'utf-8' })); + const dockerImageAsset = stackAssets.dockerImages[asset.assetHash]; + expect(dockerImageAsset.source.platform).toEqual('linux/arm64'); + }); + testFutureBehavior('asset.repository.grantPull can be used to grant a principal permissions to use the image', flags, App, (app) => { // GIVEN const stack = new Stack(app); diff --git a/packages/@aws-cdk/core/lib/stack-synthesizers/_asset-manifest-builder.ts b/packages/@aws-cdk/core/lib/stack-synthesizers/_asset-manifest-builder.ts index b1e121399cf4a..3d0d833245b8d 100644 --- a/packages/@aws-cdk/core/lib/stack-synthesizers/_asset-manifest-builder.ts +++ b/packages/@aws-cdk/core/lib/stack-synthesizers/_asset-manifest-builder.ts @@ -93,6 +93,7 @@ export class AssetManifestBuilder { dockerBuildTarget: asset.dockerBuildTarget, dockerFile: asset.dockerFile, networkMode: asset.networkMode, + platform: asset.platform, }, destinations: { [this.manifestEnvName(stack)]: { From 264c02e6014552cd73f38acef0df2205811d6c86 Mon Sep 17 00:00:00 2001 From: Cory Hall <43035978+corymhall@users.noreply.github.com> Date: Wed, 1 Jun 2022 10:45:05 -0400 Subject: [PATCH 18/23] fix(iam): referencing the same immutable role twice makes it mutable (#20497) The solution I went with in this PR was to try and keep the provided id set on the `ImmutableRole` instead of the `Import` role. This should also keep backwards compatibility by only changing the id of the `Import` role if we are returning an `ImmutableRole`. fixes #7255 ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-iam/lib/role.ts | 13 +++-- .../aws-iam/test/immutable-role.test.ts | 55 ++++++++++++++++++- 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/packages/@aws-cdk/aws-iam/lib/role.ts b/packages/@aws-cdk/aws-iam/lib/role.ts index 4b19fb7a93c99..0308899dc10ec 100644 --- a/packages/@aws-cdk/aws-iam/lib/role.ts +++ b/packages/@aws-cdk/aws-iam/lib/role.ts @@ -277,15 +277,20 @@ export class Role extends Resource implements IRole { throw new Error('\'addGrantsToResources\' can only be passed if \'mutable: false\''); } - const importedRole = new Import(scope, id); - const roleArnAndScopeStackAccountComparison = Token.compareStrings(importedRole.env.account, scopeStack.account); + const roleArnAndScopeStackAccountComparison = Token.compareStrings(roleAccount ?? '', scopeStack.account); const equalOrAnyUnresolved = roleArnAndScopeStackAccountComparison === TokenComparison.SAME || roleArnAndScopeStackAccountComparison === TokenComparison.BOTH_UNRESOLVED || roleArnAndScopeStackAccountComparison === TokenComparison.ONE_UNRESOLVED; + + // if we are returning an immutable role then the 'importedRole' is just a throwaway construct + // so give it a different id + const mutableRoleId = (options.mutable !== false && equalOrAnyUnresolved) ? id : `MutableRole${id}`; + const importedRole = new Import(scope, mutableRoleId); + // we only return an immutable Role if both accounts were explicitly provided, and different return options.mutable !== false && equalOrAnyUnresolved ? importedRole - : new ImmutableRole(scope, `ImmutableRole${id}`, importedRole, options.addGrantsToResources ?? false); + : new ImmutableRole(scope, id, importedRole, options.addGrantsToResources ?? false); } /** @@ -655,4 +660,4 @@ export interface WithoutPolicyUpdatesOptions { * @default false */ readonly addGrantsToResources?: boolean; -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-iam/test/immutable-role.test.ts b/packages/@aws-cdk/aws-iam/test/immutable-role.test.ts index 12cb38dc9542b..b79dd3a55c23d 100644 --- a/packages/@aws-cdk/aws-iam/test/immutable-role.test.ts +++ b/packages/@aws-cdk/aws-iam/test/immutable-role.test.ts @@ -1,4 +1,4 @@ -import { Template } from '@aws-cdk/assertions'; +import { Template, Match } from '@aws-cdk/assertions'; import { Stack } from '@aws-cdk/core'; import * as iam from '../lib'; @@ -53,6 +53,57 @@ describe('ImmutableRole', () => { }); }); + test('id of mutable role remains unchanged', () => { + iam.Role.fromRoleName(stack, 'TestRole123', 'my-role'); + expect(stack.node.tryFindChild('TestRole123')).not.toBeUndefined(); + expect(stack.node.tryFindChild('MutableRoleTestRole123')).toBeUndefined(); + }); + + test('remains mutable when called multiple times', () => { + const user = new iam.User(stack, 'User'); + const policy = new iam.Policy(stack, 'Policy', { + statements: [new iam.PolicyStatement({ + resources: ['*'], + actions: ['s3:*'], + })], + users: [user], + }); + + function findRole(): iam.IRole { + const foundRole = stack.node.tryFindChild('MyRole') as iam.IRole; + if (foundRole) { + return foundRole; + } + return iam.Role.fromRoleArn(stack, 'MyRole', 'arn:aws:iam::12345:role/role-name', { mutable: false }); + } + + let foundRole = findRole(); + foundRole.attachInlinePolicy(policy); + foundRole = findRole(); + foundRole.attachInlinePolicy(policy); + + expect(stack.node.tryFindChild('MutableRoleMyRole')).not.toBeUndefined(); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + 'PolicyDocument': { + 'Statement': [ + { + 'Action': 's3:*', + 'Resource': '*', + 'Effect': 'Allow', + }, + ], + 'Version': '2012-10-17', + }, + 'PolicyName': 'Policy23B91518', + 'Roles': Match.absent(), + 'Users': [ + { + 'Ref': 'User00B015A1', + }, + ], + }); + }); + test('ignores calls to addManagedPolicy', () => { mutableRole.addManagedPolicy({ managedPolicyArn: 'Arn1' }); @@ -117,4 +168,4 @@ describe('ImmutableRole', () => { new Construct(immutableRole as unknown as Construct, 'Child'); new Construct(mutableRole.withoutPolicyUpdates() as unknown as Construct, 'Child2'); }); -}); \ No newline at end of file +}); From 74318c7d22bfc00de9e005f68a0a6aaa58c7db39 Mon Sep 17 00:00:00 2001 From: Calvin Combs <66279577+comcalvi@users.noreply.github.com> Date: Wed, 1 Jun 2022 09:44:32 -0600 Subject: [PATCH 19/23] fix(events-targets): EventBus IAM statements are only added for the first target (#20479) If the `EventBus` constructor is called with no arguments, then attaching more than a single target to its policy will silently fail to add them. This is because of a strange edge case in the implementation that was not accounted for previously; it is possible for `props.role` to be `undefined`, yet `singletonEventRole()` is still capable of finding the desired role. `singletonEventRole()` does not add the new statements to any IAM policies that it finds, so as a result adding multiple targets does not add any of them. Fixes #19407. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-events-targets/lib/api-destination.ts | 11 ++- .../aws-events-targets/lib/api-gateway.ts | 18 +++-- .../@aws-cdk/aws-events-targets/lib/batch.ts | 23 +++--- .../aws-events-targets/lib/codebuild.ts | 13 ++-- .../aws-events-targets/lib/codepipeline.ts | 11 ++- .../aws-events-targets/lib/ecs-task.ts | 9 +-- .../aws-events-targets/lib/event-bus.ts | 6 +- .../lib/kinesis-firehose-stream.ts | 8 +- .../aws-events-targets/lib/kinesis-stream.ts | 7 +- .../aws-events-targets/lib/state-machine.ts | 5 +- .../@aws-cdk/aws-events-targets/lib/util.ts | 4 +- .../test/event-bus/event-rule-target.test.ts | 78 +++++++++++++++++++ 12 files changed, 138 insertions(+), 55 deletions(-) diff --git a/packages/@aws-cdk/aws-events-targets/lib/api-destination.ts b/packages/@aws-cdk/aws-events-targets/lib/api-destination.ts index 8f2bc936a6d28..5ec83563ade94 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/api-destination.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/api-destination.ts @@ -83,13 +83,16 @@ export class ApiDestination implements events.IRuleTarget { addToDeadLetterQueueResourcePolicy(_rule, this.props.deadLetterQueue); } + const role = this.props?.eventRole ?? singletonEventRole(this.apiDestination); + role.addToPrincipalPolicy(new iam.PolicyStatement({ + resources: [this.apiDestination.apiDestinationArn], + actions: ['events:InvokeApiDestination'], + })); + return { ...(this.props ? bindBaseTargetConfig(this.props) : {}), arn: this.apiDestination.apiDestinationArn, - role: this.props?.eventRole ?? singletonEventRole(this.apiDestination, [new iam.PolicyStatement({ - resources: [this.apiDestination.apiDestinationArn], - actions: ['events:InvokeApiDestination'], - })]), + role, input: this.props.event, targetResource: this.apiDestination, httpParameters, diff --git a/packages/@aws-cdk/aws-events-targets/lib/api-gateway.ts b/packages/@aws-cdk/aws-events-targets/lib/api-gateway.ts index 168c5a65a386d..04f073ad82fd6 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/api-gateway.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/api-gateway.ts @@ -98,16 +98,20 @@ export class ApiGateway implements events.IRuleTarget { this.props?.path || '/', this.props?.stage || this.restApi.deploymentStage.stageName, ); + + const role = this.props?.eventRole || singletonEventRole(this.restApi); + role.addToPrincipalPolicy(new iam.PolicyStatement({ + resources: [restApiArn], + actions: [ + 'execute-api:Invoke', + 'execute-api:ManageConnections', + ], + })); + return { ...(this.props ? bindBaseTargetConfig(this.props) : {}), arn: restApiArn, - role: this.props?.eventRole || singletonEventRole(this.restApi, [new iam.PolicyStatement({ - resources: [restApiArn], - actions: [ - 'execute-api:Invoke', - 'execute-api:ManageConnections', - ], - })]), + role, deadLetterConfig: this.props?.deadLetterQueue && { arn: this.props.deadLetterQueue?.queueArn }, input: this.props?.postBody, targetResource: this.restApi, diff --git a/packages/@aws-cdk/aws-events-targets/lib/batch.ts b/packages/@aws-cdk/aws-events-targets/lib/batch.ts index f0186efe6089d..369f36517aea6 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/batch.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/batch.ts @@ -87,20 +87,21 @@ export class BatchJob implements events.IRuleTarget { addToDeadLetterQueueResourcePolicy(rule, this.props.deadLetterQueue); } + // When scoping resource-level access for job submission, you must provide both job queue and job definition resource types. + // https://docs.aws.amazon.com/batch/latest/userguide/ExamplePolicies_BATCH.html#iam-example-restrict-job-def + const role = singletonEventRole(this.jobDefinitionScope); + role.addToPrincipalPolicy(new iam.PolicyStatement({ + actions: ['batch:SubmitJob'], + resources: [ + this.jobDefinitionArn, + this.jobQueueArn, + ], + })); + return { ...bindBaseTargetConfig(this.props), arn: this.jobQueueArn, - // When scoping resource-level access for job submission, you must provide both job queue and job definition resource types. - // https://docs.aws.amazon.com/batch/latest/userguide/ExamplePolicies_BATCH.html#iam-example-restrict-job-def - role: singletonEventRole(this.jobDefinitionScope, [ - new iam.PolicyStatement({ - actions: ['batch:SubmitJob'], - resources: [ - this.jobDefinitionArn, - this.jobQueueArn, - ], - }), - ]), + role, input: this.props.event, targetResource: this.jobQueueScope, batchParameters, diff --git a/packages/@aws-cdk/aws-events-targets/lib/codebuild.ts b/packages/@aws-cdk/aws-events-targets/lib/codebuild.ts index a9da8719cfef7..14f9dd4c0c626 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/codebuild.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/codebuild.ts @@ -44,15 +44,16 @@ export class CodeBuildProject implements events.IRuleTarget { addToDeadLetterQueueResourcePolicy(_rule, this.props.deadLetterQueue); } + const role = this.props.eventRole || singletonEventRole(this.project); + role.addToPrincipalPolicy(new iam.PolicyStatement({ + actions: ['codebuild:StartBuild'], + resources: [this.project.projectArn], + })); + return { ...bindBaseTargetConfig(this.props), arn: this.project.projectArn, - role: this.props.eventRole || singletonEventRole(this.project, [ - new iam.PolicyStatement({ - actions: ['codebuild:StartBuild'], - resources: [this.project.projectArn], - }), - ]), + role, input: this.props.event, targetResource: this.project, }; diff --git a/packages/@aws-cdk/aws-events-targets/lib/codepipeline.ts b/packages/@aws-cdk/aws-events-targets/lib/codepipeline.ts index 8d2006378f121..27d80a55e33f9 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/codepipeline.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/codepipeline.ts @@ -26,14 +26,17 @@ export class CodePipeline implements events.IRuleTarget { } public bind(_rule: events.IRule, _id?: string): events.RuleTargetConfig { + const role = this.options.eventRole || singletonEventRole(this.pipeline); + role.addToPrincipalPolicy(new iam.PolicyStatement({ + resources: [this.pipeline.pipelineArn], + actions: ['codepipeline:StartPipelineExecution'], + })); + return { ...bindBaseTargetConfig(this.options), id: '', arn: this.pipeline.pipelineArn, - role: this.options.eventRole || singletonEventRole(this.pipeline, [new iam.PolicyStatement({ - resources: [this.pipeline.pipelineArn], - actions: ['codepipeline:StartPipelineExecution'], - })]), + role, targetResource: this.pipeline, }; } diff --git a/packages/@aws-cdk/aws-events-targets/lib/ecs-task.ts b/packages/@aws-cdk/aws-events-targets/lib/ecs-task.ts index 13a08dbd8d4eb..80147f71b8b40 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/ecs-task.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/ecs-task.ts @@ -118,12 +118,9 @@ export class EcsTask implements events.IRuleTarget { this.taskCount = props.taskCount ?? 1; this.platformVersion = props.platformVersion; - if (props.role) { - const role = props.role; - this.createEventRolePolicyStatements().forEach(role.addToPrincipalPolicy.bind(role)); - this.role = role; - } else { - this.role = singletonEventRole(this.taskDefinition, this.createEventRolePolicyStatements()); + this.role = props.role ?? singletonEventRole(this.taskDefinition); + for (const stmt of this.createEventRolePolicyStatements()) { + this.role.addToPrincipalPolicy(stmt); } // Security groups are only configurable with the "awsvpc" network mode. diff --git a/packages/@aws-cdk/aws-events-targets/lib/event-bus.ts b/packages/@aws-cdk/aws-events-targets/lib/event-bus.ts index 7026273ef5330..eb739c0b37296 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/event-bus.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/event-bus.ts @@ -36,10 +36,8 @@ export class EventBus implements events.IRuleTarget { constructor(private readonly eventBus: events.IEventBus, private readonly props: EventBusProps = {}) { } bind(rule: events.IRule, _id?: string): events.RuleTargetConfig { - if (this.props.role) { - this.props.role.addToPrincipalPolicy(this.putEventStatement()); - } - const role = this.props.role ?? singletonEventRole(rule, [this.putEventStatement()]); + const role = this.props.role ?? singletonEventRole(rule); + role.addToPrincipalPolicy(this.putEventStatement()); if (this.props.deadLetterQueue) { addToDeadLetterQueueResourcePolicy(rule, this.props.deadLetterQueue); diff --git a/packages/@aws-cdk/aws-events-targets/lib/kinesis-firehose-stream.ts b/packages/@aws-cdk/aws-events-targets/lib/kinesis-firehose-stream.ts index b52f7bf423df2..2a454f5164d77 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/kinesis-firehose-stream.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/kinesis-firehose-stream.ts @@ -31,14 +31,16 @@ export class KinesisFirehoseStream implements events.IRuleTarget { * result from a Event Bridge event. */ public bind(_rule: events.IRule, _id?: string): events.RuleTargetConfig { - const policyStatements = [new iam.PolicyStatement({ + const role = singletonEventRole(this.stream); + role.addToPrincipalPolicy(new iam.PolicyStatement({ actions: ['firehose:PutRecord', 'firehose:PutRecordBatch'], resources: [this.stream.attrArn], - })]; + })); + return { arn: this.stream.attrArn, - role: singletonEventRole(this.stream, policyStatements), + role, input: this.props.message, targetResource: this.stream, }; diff --git a/packages/@aws-cdk/aws-events-targets/lib/kinesis-stream.ts b/packages/@aws-cdk/aws-events-targets/lib/kinesis-stream.ts index 743b197e19d52..9114561a6ca97 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/kinesis-stream.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/kinesis-stream.ts @@ -45,14 +45,15 @@ export class KinesisStream implements events.IRuleTarget { * result from a CloudWatch event. */ public bind(_rule: events.IRule, _id?: string): events.RuleTargetConfig { - const policyStatements = [new iam.PolicyStatement({ + const role = singletonEventRole(this.stream); + role.addToPrincipalPolicy(new iam.PolicyStatement({ actions: ['kinesis:PutRecord', 'kinesis:PutRecords'], resources: [this.stream.streamArn], - })]; + })); return { arn: this.stream.streamArn, - role: singletonEventRole(this.stream, policyStatements), + role, input: this.props.message, targetResource: this.stream, kinesisParameters: this.props.partitionKeyPath ? { partitionKeyPath: this.props.partitionKeyPath } : undefined, diff --git a/packages/@aws-cdk/aws-events-targets/lib/state-machine.ts b/packages/@aws-cdk/aws-events-targets/lib/state-machine.ts index ce780bf99d2d2..c328f16884930 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/state-machine.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/state-machine.ts @@ -29,11 +29,8 @@ export class SfnStateMachine implements events.IRuleTarget { private readonly role: iam.IRole; constructor(public readonly machine: sfn.IStateMachine, private readonly props: SfnStateMachineProps = {}) { - if (props.role) { - props.role.grant(new iam.ServicePrincipal('events.amazonaws.com')); - } // no statements are passed because we are configuring permissions by using grant* helper below - this.role = props.role ?? singletonEventRole(machine, []); + this.role = props.role ?? singletonEventRole(machine); machine.grantStartExecution(this.role); } diff --git a/packages/@aws-cdk/aws-events-targets/lib/util.ts b/packages/@aws-cdk/aws-events-targets/lib/util.ts index 086c63b4c2224..8ed77ba548d66 100644 --- a/packages/@aws-cdk/aws-events-targets/lib/util.ts +++ b/packages/@aws-cdk/aws-events-targets/lib/util.ts @@ -71,7 +71,7 @@ export function bindBaseTargetConfig(props: TargetBaseProps) { * events have the same target, they will share a role. * @internal */ -export function singletonEventRole(scope: IConstruct, policyStatements: iam.PolicyStatement[]): iam.IRole { +export function singletonEventRole(scope: IConstruct): iam.IRole { const id = 'EventsRole'; const existing = scope.node.tryFindChild(id) as iam.IRole; if (existing) { return existing; } @@ -81,8 +81,6 @@ export function singletonEventRole(scope: IConstruct, policyStatements: iam.Poli assumedBy: new iam.ServicePrincipal('events.amazonaws.com'), }); - policyStatements.forEach(role.addToPolicy.bind(role)); - return role; } diff --git a/packages/@aws-cdk/aws-events-targets/test/event-bus/event-rule-target.test.ts b/packages/@aws-cdk/aws-events-targets/test/event-bus/event-rule-target.test.ts index cb2940fdb0cd7..554d3b753be62 100644 --- a/packages/@aws-cdk/aws-events-targets/test/event-bus/event-rule-target.test.ts +++ b/packages/@aws-cdk/aws-events-targets/test/event-bus/event-rule-target.test.ts @@ -167,3 +167,81 @@ test('with a Dead Letter Queue specified', () => { ], }); }); + +test('event buses are correctly added to the rule\'s principal policy', () => { + const stack = new Stack(); + const rule = new events.Rule(stack, 'Rule', { + schedule: events.Schedule.expression('rate(1 min)'), + }); + + const bus1 = new events.EventBus(stack, 'bus' + 1); + const bus2 = new events.EventBus(stack, 'bus' + 2); + + rule.addTarget(new targets.EventBus(bus1)); + rule.addTarget(new targets.EventBus(bus2)); + + Template.fromStack(stack).hasResourceProperties('AWS::Events::Rule', { + Targets: [ + { + Arn: { + 'Fn::GetAtt': [ + 'bus110C385DC', + 'Arn', + ], + }, + Id: 'Target0', + RoleArn: { + 'Fn::GetAtt': [ + 'RuleEventsRoleC51A4248', + 'Arn', + ], + }, + }, + { + Arn: { + 'Fn::GetAtt': [ + 'bus22D01F126', + 'Arn', + ], + }, + Id: 'Target1', + RoleArn: { + 'Fn::GetAtt': [ + 'RuleEventsRoleC51A4248', + 'Arn', + ], + }, + }, + ], + }); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Effect: 'Allow', + Action: 'events:PutEvents', + Resource: { + 'Fn::GetAtt': [ + 'bus110C385DC', + 'Arn', + ], + }, + }, + { + Effect: 'Allow', + Action: 'events:PutEvents', + Resource: { + 'Fn::GetAtt': [ + 'bus22D01F126', + 'Arn', + ], + }, + }, + ], + Version: '2012-10-17', + }, + Roles: [{ + Ref: 'RuleEventsRoleC51A4248', + }], + }); +}); From d31a1b904c6e3a3485d7ecc35b01a98b9ec18836 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Jun 2022 22:32:30 +0000 Subject: [PATCH 20/23] chore(deps): Bump awscli from 1.24.10 to 1.25.1 in /packages/@aws-cdk/lambda-layer-awscli (#20580) Bumps [awscli](https://github.com/aws/aws-cli) from 1.24.10 to 1.25.1.
Changelog

Sourced from awscli's changelog.

1.25.1

  • api-change:route53: Add new APIs to support Route 53 IP Based Routing
  • api-change:forecast: Added Format field to Import and Export APIs in Amazon Forecast. Added TimeSeriesSelector to Create Forecast API.
  • api-change:chime-sdk-meetings: Adds support for centrally controlling each participant's ability to send and receive audio, video and screen share within a WebRTC session. Attendee capabilities can be specified when the attendee is created and updated during the session with the new BatchUpdateAttendeeCapabilitiesExcept API.
  • api-change:backup-gateway: Adds GetGateway and UpdateGatewaySoftwareNow API and adds hypervisor name to UpdateHypervisor API

1.25.0

  • api-change:lookoutmetrics: Adding backtest mode to detectors using the Cloudwatch data source.
  • api-change:transcribe: Amazon Transcribe now supports automatic language identification for multi-lingual audio in batch mode.
  • api-change:iotsitewise: This release adds the following new optional field to the IoT SiteWise asset resource: assetDescription.
  • api-change:sagemaker: Amazon SageMaker Notebook Instances now support Jupyter Lab 3.
  • feature:Python: Dropped support for Python 3.6
  • api-change:drs: Changed existing APIs and added new APIs to accommodate using multiple AWS accounts with AWS Elastic Disaster Recovery.
  • api-change:cognito-idp: Amazon Cognito now supports IP Address propagation for all unauthenticated APIs (e.g. SignUp, ForgotPassword).
  • feature:Python: Dropped support for Python 3.6
Commits
  • bdb30cb Merge branch 'release-1.25.1'
  • cbd71ef Bumping version to 1.25.1
  • 8d8b956 Update changelog based on model updates
  • eab8942 Merge pull request #5568 from ConnorKirk/add-codecommit-repository-to-cloudfo...
  • e6f1329 Add CodeCommit::Repository to cfn package command
  • 9b940e8 Merge pull request #5576 from joel-aws/package-serverless-states-definitionuri
  • 042929e Support exporting DefinitionUri in AWS::Serverless::StateMachine resource
  • f73c533 Merge branch 'release-1.25.0'
  • 23e4b4f Merge branch 'release-1.25.0' into develop
  • f6f635c Bumping version to 1.25.0
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=awscli&package-manager=pip&previous-version=1.24.10&new-version=1.25.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- packages/@aws-cdk/lambda-layer-awscli/layer/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/lambda-layer-awscli/layer/requirements.txt b/packages/@aws-cdk/lambda-layer-awscli/layer/requirements.txt index 9b84c7758b66b..9d138469fccdf 100644 --- a/packages/@aws-cdk/lambda-layer-awscli/layer/requirements.txt +++ b/packages/@aws-cdk/lambda-layer-awscli/layer/requirements.txt @@ -1 +1 @@ -awscli==1.24.10 +awscli==1.25.1 From 1d2d8b550e35322e58b50d863dd5a9654ce81933 Mon Sep 17 00:00:00 2001 From: Kaizen Conroy <36202692+kaizencc@users.noreply.github.com> Date: Thu, 2 Jun 2022 09:59:25 -0500 Subject: [PATCH 21/23] chore(core): backport unit test fix from main to v1-main (#20589) ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/core/test/stack.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/core/test/stack.test.ts b/packages/@aws-cdk/core/test/stack.test.ts index f0f1637ed54ad..574c17511a1ec 100644 --- a/packages/@aws-cdk/core/test/stack.test.ts +++ b/packages/@aws-cdk/core/test/stack.test.ts @@ -600,7 +600,7 @@ describe('stack', () => { producerM.exportValue(resourceM.getAtt('Att')); const template = appM.synth().getStackByName(producerM.stackName).template; - expect(template).toEqual({ + expect(template).toMatchObject({ Outputs: { ExportsOutputFnGetAttOVERRIDELOGICALIDAtt2DD28019: { Export: { From 419fdaec2770de1d21c0340f294ad72155d991ce Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Thu, 2 Jun 2022 11:52:22 -0700 Subject: [PATCH 22/23] feat(cfnspec): cloudformation spec v73.1.0 (#20587) --- .../@aws-cdk/aws-emrserverless/.eslintrc.js | 3 + .../@aws-cdk/aws-emrserverless/.gitignore | 19 ++ .../@aws-cdk/aws-emrserverless/.npmignore | 29 +++ packages/@aws-cdk/aws-emrserverless/LICENSE | 201 +++++++++++++++++ packages/@aws-cdk/aws-emrserverless/NOTICE | 2 + packages/@aws-cdk/aws-emrserverless/README.md | 39 ++++ .../@aws-cdk/aws-emrserverless/jest.config.js | 2 + .../@aws-cdk/aws-emrserverless/lib/index.ts | 2 + .../@aws-cdk/aws-emrserverless/package.json | 110 ++++++++++ .../rosetta/default.ts-fixture | 8 + .../test/emrserverless.test.ts | 6 + packages/@aws-cdk/cfnspec/CHANGELOG.md | 75 +++++++ packages/@aws-cdk/cfnspec/cfn.version | 2 +- .../000_cfn/000_official/000_AWS_ACMPCA.json | 2 +- .../000_cfn/000_official/000_AWS_APS.json | 2 +- .../000_official/000_AWS_AccessAnalyzer.json | 2 +- .../000_official/000_AWS_AmazonMQ.json | 2 +- .../000_cfn/000_official/000_AWS_Amplify.json | 2 +- .../000_AWS_AmplifyUIBuilder.json | 2 +- .../000_official/000_AWS_ApiGateway.json | 2 +- .../000_official/000_AWS_ApiGatewayV2.json | 2 +- .../000_official/000_AWS_AppConfig.json | 2 +- .../000_cfn/000_official/000_AWS_AppFlow.json | 2 +- .../000_official/000_AWS_AppIntegrations.json | 2 +- .../000_cfn/000_official/000_AWS_AppMesh.json | 29 ++- .../000_official/000_AWS_AppRunner.json | 2 +- .../000_official/000_AWS_AppStream.json | 2 +- .../000_cfn/000_official/000_AWS_AppSync.json | 2 +- .../000_AWS_ApplicationAutoScaling.json | 2 +- .../000_AWS_ApplicationInsights.json | 2 +- .../000_cfn/000_official/000_AWS_Athena.json | 2 +- .../000_official/000_AWS_AuditManager.json | 2 +- .../000_official/000_AWS_AutoScaling.json | 2 +- .../000_AWS_AutoScalingPlans.json | 2 +- .../000_cfn/000_official/000_AWS_Backup.json | 2 +- .../000_cfn/000_official/000_AWS_Batch.json | 2 +- .../000_AWS_BillingConductor.json | 2 +- .../000_cfn/000_official/000_AWS_Budgets.json | 2 +- .../000_cfn/000_official/000_AWS_CE.json | 2 +- .../000_cfn/000_official/000_AWS_CUR.json | 2 +- .../000_official/000_AWS_Cassandra.json | 2 +- .../000_AWS_CertificateManager.json | 2 +- .../000_cfn/000_official/000_AWS_Chatbot.json | 2 +- .../000_cfn/000_official/000_AWS_Cloud9.json | 2 +- .../000_official/000_AWS_CloudFormation.json | 2 +- .../000_official/000_AWS_CloudFront.json | 2 +- .../000_official/000_AWS_CloudTrail.json | 2 +- .../000_official/000_AWS_CloudWatch.json | 2 +- .../000_official/000_AWS_CodeArtifact.json | 2 +- .../000_official/000_AWS_CodeBuild.json | 2 +- .../000_official/000_AWS_CodeCommit.json | 2 +- .../000_official/000_AWS_CodeDeploy.json | 2 +- .../000_AWS_CodeGuruProfiler.json | 2 +- .../000_AWS_CodeGuruReviewer.json | 2 +- .../000_official/000_AWS_CodePipeline.json | 2 +- .../000_official/000_AWS_CodeStar.json | 2 +- .../000_AWS_CodeStarConnections.json | 2 +- .../000_AWS_CodeStarNotifications.json | 2 +- .../000_cfn/000_official/000_AWS_Cognito.json | 28 ++- .../000_cfn/000_official/000_AWS_Config.json | 2 +- .../000_cfn/000_official/000_AWS_Connect.json | 2 +- .../000_AWS_CustomerProfiles.json | 2 +- .../000_cfn/000_official/000_AWS_DAX.json | 2 +- .../000_cfn/000_official/000_AWS_DLM.json | 2 +- .../000_cfn/000_official/000_AWS_DMS.json | 2 +- .../000_official/000_AWS_DataBrew.json | 2 +- .../000_official/000_AWS_DataPipeline.json | 2 +- .../000_official/000_AWS_DataSync.json | 8 +- .../000_official/000_AWS_Detective.json | 2 +- .../000_official/000_AWS_DevOpsGuru.json | 2 +- .../000_AWS_DirectoryService.json | 2 +- .../000_cfn/000_official/000_AWS_DocDB.json | 2 +- .../000_official/000_AWS_DynamoDB.json | 2 +- .../000_cfn/000_official/000_AWS_EC2.json | 28 ++- .../000_cfn/000_official/000_AWS_ECR.json | 2 +- .../000_cfn/000_official/000_AWS_ECS.json | 2 +- .../000_cfn/000_official/000_AWS_EFS.json | 2 +- .../000_cfn/000_official/000_AWS_EKS.json | 2 +- .../000_cfn/000_official/000_AWS_EMR.json | 2 +- .../000_official/000_AWS_EMRContainers.json | 2 +- .../000_official/000_AWS_EMRServerless.json | 207 ++++++++++++++++++ .../000_official/000_AWS_ElastiCache.json | 2 +- .../000_AWS_ElasticBeanstalk.json | 2 +- .../000_AWS_ElasticLoadBalancing.json | 2 +- .../000_AWS_ElasticLoadBalancingV2.json | 2 +- .../000_official/000_AWS_Elasticsearch.json | 2 +- .../000_official/000_AWS_EventSchemas.json | 2 +- .../000_cfn/000_official/000_AWS_Events.json | 2 +- .../000_official/000_AWS_Evidently.json | 2 +- .../000_cfn/000_official/000_AWS_FIS.json | 2 +- .../000_cfn/000_official/000_AWS_FMS.json | 2 +- .../000_cfn/000_official/000_AWS_FSx.json | 2 +- .../000_official/000_AWS_FinSpace.json | 2 +- .../000_official/000_AWS_Forecast.json | 2 +- .../000_official/000_AWS_FraudDetector.json | 2 +- .../000_official/000_AWS_GameLift.json | 2 +- .../000_AWS_GlobalAccelerator.json | 2 +- .../000_cfn/000_official/000_AWS_Glue.json | 2 +- .../000_official/000_AWS_Greengrass.json | 2 +- .../000_official/000_AWS_GreengrassV2.json | 2 +- .../000_official/000_AWS_GroundStation.json | 2 +- .../000_official/000_AWS_GuardDuty.json | 2 +- .../000_official/000_AWS_HealthLake.json | 2 +- .../000_cfn/000_official/000_AWS_IAM.json | 2 +- .../000_cfn/000_official/000_AWS_IVS.json | 2 +- .../000_official/000_AWS_ImageBuilder.json | 2 +- .../000_official/000_AWS_Inspector.json | 2 +- .../000_official/000_AWS_InspectorV2.json | 2 +- .../000_cfn/000_official/000_AWS_IoT.json | 2 +- .../000_official/000_AWS_IoT1Click.json | 2 +- .../000_official/000_AWS_IoTAnalytics.json | 2 +- .../000_AWS_IoTCoreDeviceAdvisor.json | 2 +- .../000_official/000_AWS_IoTEvents.json | 2 +- .../000_official/000_AWS_IoTFleetHub.json | 2 +- .../000_official/000_AWS_IoTSiteWise.json | 8 +- .../000_official/000_AWS_IoTThingsGraph.json | 2 +- .../000_official/000_AWS_IoTTwinMaker.json | 2 +- .../000_official/000_AWS_IoTWireless.json | 52 ++++- .../000_cfn/000_official/000_AWS_KMS.json | 2 +- .../000_official/000_AWS_KafkaConnect.json | 2 +- .../000_cfn/000_official/000_AWS_Kendra.json | 2 +- .../000_cfn/000_official/000_AWS_Kinesis.json | 2 +- .../000_AWS_KinesisAnalytics.json | 2 +- .../000_AWS_KinesisAnalyticsV2.json | 2 +- .../000_official/000_AWS_KinesisFirehose.json | 2 +- .../000_official/000_AWS_KinesisVideo.json | 2 +- .../000_official/000_AWS_LakeFormation.json | 2 +- .../000_cfn/000_official/000_AWS_Lambda.json | 2 +- .../000_cfn/000_official/000_AWS_Lex.json | 2 +- .../000_official/000_AWS_LicenseManager.json | 2 +- .../000_official/000_AWS_Lightsail.json | 14 +- .../000_official/000_AWS_Location.json | 2 +- .../000_cfn/000_official/000_AWS_Logs.json | 2 +- .../000_AWS_LookoutEquipment.json | 2 +- .../000_official/000_AWS_LookoutMetrics.json | 2 +- .../000_official/000_AWS_LookoutVision.json | 2 +- .../000_cfn/000_official/000_AWS_MSK.json | 2 +- .../000_cfn/000_official/000_AWS_MWAA.json | 2 +- .../000_cfn/000_official/000_AWS_Macie.json | 2 +- .../000_AWS_ManagedBlockchain.json | 2 +- .../000_official/000_AWS_MediaConnect.json | 2 +- .../000_official/000_AWS_MediaConvert.json | 2 +- .../000_official/000_AWS_MediaLive.json | 2 +- .../000_official/000_AWS_MediaPackage.json | 2 +- .../000_official/000_AWS_MediaStore.json | 2 +- .../000_official/000_AWS_MediaTailor.json | 2 +- .../000_official/000_AWS_MemoryDB.json | 2 +- .../000_cfn/000_official/000_AWS_Neptune.json | 2 +- .../000_official/000_AWS_NetworkFirewall.json | 2 +- .../000_official/000_AWS_NetworkManager.json | 4 +- .../000_official/000_AWS_NimbleStudio.json | 2 +- .../000_AWS_OpenSearchService.json | 2 +- .../000_official/000_AWS_OpsWorks.json | 2 +- .../000_official/000_AWS_OpsWorksCM.json | 2 +- .../000_official/000_AWS_Panorama.json | 2 +- .../000_official/000_AWS_Personalize.json | 2 +- .../000_official/000_AWS_Pinpoint.json | 109 ++++++++- .../000_official/000_AWS_PinpointEmail.json | 2 +- .../000_cfn/000_official/000_AWS_QLDB.json | 2 +- .../000_official/000_AWS_QuickSight.json | 2 +- .../000_cfn/000_official/000_AWS_RAM.json | 2 +- .../000_cfn/000_official/000_AWS_RDS.json | 2 +- .../000_cfn/000_official/000_AWS_RUM.json | 2 +- .../000_official/000_AWS_Redshift.json | 2 +- .../000_official/000_AWS_RefactorSpaces.json | 2 +- .../000_official/000_AWS_ResilienceHub.json | 2 +- .../000_official/000_AWS_ResourceGroups.json | 2 +- .../000_official/000_AWS_RoboMaker.json | 2 +- .../000_cfn/000_official/000_AWS_Route53.json | 2 +- .../000_AWS_Route53RecoveryControl.json | 2 +- .../000_AWS_Route53RecoveryReadiness.json | 2 +- .../000_official/000_AWS_Route53Resolver.json | 2 +- .../000_cfn/000_official/000_AWS_S3.json | 2 +- .../000_official/000_AWS_S3ObjectLambda.json | 2 +- .../000_official/000_AWS_S3Outposts.json | 2 +- .../000_cfn/000_official/000_AWS_SDB.json | 2 +- .../000_cfn/000_official/000_AWS_SES.json | 2 +- .../000_cfn/000_official/000_AWS_SNS.json | 2 +- .../000_cfn/000_official/000_AWS_SQS.json | 2 +- .../000_cfn/000_official/000_AWS_SSM.json | 2 +- .../000_official/000_AWS_SSMContacts.json | 2 +- .../000_official/000_AWS_SSMIncidents.json | 38 +++- .../000_cfn/000_official/000_AWS_SSO.json | 2 +- .../000_official/000_AWS_SecretsManager.json | 2 +- .../000_official/000_AWS_SecurityHub.json | 2 +- .../000_official/000_AWS_ServiceCatalog.json | 2 +- .../000_AWS_ServiceCatalogAppRegistry.json | 2 +- .../000_AWS_ServiceDiscovery.json | 2 +- .../000_cfn/000_official/000_AWS_Signer.json | 2 +- .../000_official/000_AWS_StepFunctions.json | 2 +- .../000_official/000_AWS_Synthetics.json | 2 +- .../000_official/000_AWS_Timestream.json | 2 +- .../000_official/000_AWS_Transfer.json | 8 +- .../000_cfn/000_official/000_AWS_VoiceID.json | 2 +- .../000_cfn/000_official/000_AWS_WAF.json | 2 +- .../000_official/000_AWS_WAFRegional.json | 2 +- .../000_cfn/000_official/000_AWS_WAFv2.json | 2 +- .../000_cfn/000_official/000_AWS_Wisdom.json | 2 +- .../000_official/000_AWS_WorkSpaces.json | 2 +- .../000_cfn/000_official/000_AWS_XRay.json | 2 +- .../000_cfn/000_official/000_Alexa_ASK.json | 2 +- .../000_cfn/000_official/000_Tag.json | 2 +- .../000_cfn/000_official/001_Version.json | 2 +- ..._UserPool_UsernameConfiguration_patch.json | 16 ++ .../100_sam/000_official/spec.json | 6 + .../cloudformation-include/package.json | 2 + packages/aws-cdk-lib/package.json | 1 + packages/monocdk/package.json | 1 + 208 files changed, 1217 insertions(+), 196 deletions(-) create mode 100644 packages/@aws-cdk/aws-emrserverless/.eslintrc.js create mode 100644 packages/@aws-cdk/aws-emrserverless/.gitignore create mode 100644 packages/@aws-cdk/aws-emrserverless/.npmignore create mode 100644 packages/@aws-cdk/aws-emrserverless/LICENSE create mode 100644 packages/@aws-cdk/aws-emrserverless/NOTICE create mode 100644 packages/@aws-cdk/aws-emrserverless/README.md create mode 100644 packages/@aws-cdk/aws-emrserverless/jest.config.js create mode 100644 packages/@aws-cdk/aws-emrserverless/lib/index.ts create mode 100644 packages/@aws-cdk/aws-emrserverless/package.json create mode 100644 packages/@aws-cdk/aws-emrserverless/rosetta/default.ts-fixture create mode 100644 packages/@aws-cdk/aws-emrserverless/test/emrserverless.test.ts create mode 100644 packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRServerless.json create mode 100644 packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/500_Cognito_UserPool_UsernameConfiguration_patch.json diff --git a/packages/@aws-cdk/aws-emrserverless/.eslintrc.js b/packages/@aws-cdk/aws-emrserverless/.eslintrc.js new file mode 100644 index 0000000000000..2658ee8727166 --- /dev/null +++ b/packages/@aws-cdk/aws-emrserverless/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-emrserverless/.gitignore b/packages/@aws-cdk/aws-emrserverless/.gitignore new file mode 100644 index 0000000000000..62ebc95d75ce6 --- /dev/null +++ b/packages/@aws-cdk/aws-emrserverless/.gitignore @@ -0,0 +1,19 @@ +*.js +*.js.map +*.d.ts +tsconfig.json +node_modules +*.generated.ts +dist +.jsii + +.LAST_BUILD +.nyc_output +coverage +.nycrc +.LAST_PACKAGE +*.snk +nyc.config.js +!.eslintrc.js +!jest.config.js +junit.xml diff --git a/packages/@aws-cdk/aws-emrserverless/.npmignore b/packages/@aws-cdk/aws-emrserverless/.npmignore new file mode 100644 index 0000000000000..f931fede67c44 --- /dev/null +++ b/packages/@aws-cdk/aws-emrserverless/.npmignore @@ -0,0 +1,29 @@ +# Don't include original .ts files when doing `npm pack` +*.ts +!*.d.ts +coverage +.nyc_output +*.tgz + +dist +.LAST_PACKAGE +.LAST_BUILD +!*.js + +# Include .jsii +!.jsii + +*.snk + +*.tsbuildinfo + +tsconfig.json + +.eslintrc.js +jest.config.js + +# exclude cdk artifacts +**/cdk.out +junit.xml +test/ +!*.lit.ts diff --git a/packages/@aws-cdk/aws-emrserverless/LICENSE b/packages/@aws-cdk/aws-emrserverless/LICENSE new file mode 100644 index 0000000000000..82ad00bb02d0b --- /dev/null +++ b/packages/@aws-cdk/aws-emrserverless/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/@aws-cdk/aws-emrserverless/NOTICE b/packages/@aws-cdk/aws-emrserverless/NOTICE new file mode 100644 index 0000000000000..1b7adbb891265 --- /dev/null +++ b/packages/@aws-cdk/aws-emrserverless/NOTICE @@ -0,0 +1,2 @@ +AWS Cloud Development Kit (AWS CDK) +Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/packages/@aws-cdk/aws-emrserverless/README.md b/packages/@aws-cdk/aws-emrserverless/README.md new file mode 100644 index 0000000000000..4546563b937c0 --- /dev/null +++ b/packages/@aws-cdk/aws-emrserverless/README.md @@ -0,0 +1,39 @@ +# AWS::EMRServerless Construct Library + + +--- + +![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) + +> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use. +> +> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib + +--- + + + +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +```ts nofixture +import * as emrserverless from '@aws-cdk/aws-emrserverless'; +``` + + + +There are no official hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet. Here are some suggestions on how to proceed: + +- Search [Construct Hub for EMRServerless construct libraries](https://constructs.dev/search?q=emrserverless) +- Use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, in the same way you would use [the CloudFormation AWS::EMRServerless resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_EMRServerless.html) directly. + + + + +There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet. +However, you can still use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, and use this service exactly as you would using CloudFormation directly. + +For more information on the resources and properties available for this service, see the [CloudFormation documentation for AWS::EMRServerless](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_EMRServerless.html). + +(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) and submit an RFC if you are interested in contributing to this construct library.) + + diff --git a/packages/@aws-cdk/aws-emrserverless/jest.config.js b/packages/@aws-cdk/aws-emrserverless/jest.config.js new file mode 100644 index 0000000000000..3a2fd93a1228a --- /dev/null +++ b/packages/@aws-cdk/aws-emrserverless/jest.config.js @@ -0,0 +1,2 @@ +const baseConfig = require('@aws-cdk/cdk-build-tools/config/jest.config'); +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-emrserverless/lib/index.ts b/packages/@aws-cdk/aws-emrserverless/lib/index.ts new file mode 100644 index 0000000000000..5f9aa0dc65390 --- /dev/null +++ b/packages/@aws-cdk/aws-emrserverless/lib/index.ts @@ -0,0 +1,2 @@ +// AWS::EMRServerless CloudFormation Resources: +export * from './emrserverless.generated'; diff --git a/packages/@aws-cdk/aws-emrserverless/package.json b/packages/@aws-cdk/aws-emrserverless/package.json new file mode 100644 index 0000000000000..fa4a442055b69 --- /dev/null +++ b/packages/@aws-cdk/aws-emrserverless/package.json @@ -0,0 +1,110 @@ +{ + "name": "@aws-cdk/aws-emrserverless", + "version": "0.0.0", + "description": "AWS::EMRServerless Construct Library", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "jsii": { + "outdir": "dist", + "projectReferences": true, + "targets": { + "dotnet": { + "namespace": "Amazon.CDK.AWS.EMRServerless", + "packageId": "Amazon.CDK.AWS.EMRServerless", + "signAssembly": true, + "assemblyOriginatorKeyFile": "../../key.snk", + "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" + }, + "java": { + "package": "software.amazon.awscdk.services.emrserverless", + "maven": { + "groupId": "software.amazon.awscdk", + "artifactId": "emrserverless" + } + }, + "python": { + "classifiers": [ + "Framework :: AWS CDK", + "Framework :: AWS CDK :: 1" + ], + "distName": "aws-cdk.aws-emrserverless", + "module": "aws_cdk.aws_emrserverless" + } + }, + "metadata": { + "jsii": { + "rosetta": { + "strict": true + } + } + } + }, + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-cdk.git", + "directory": "packages/@aws-cdk/aws-emrserverless" + }, + "homepage": "https://github.com/aws/aws-cdk", + "scripts": { + "build": "cdk-build", + "watch": "cdk-watch", + "lint": "cdk-lint", + "test": "cdk-test", + "integ": "cdk-integ", + "pkglint": "pkglint -f", + "package": "cdk-package", + "awslint": "cdk-awslint", + "cfn2ts": "cfn2ts", + "build+test": "yarn build && yarn test", + "build+test+package": "yarn build+test && yarn package", + "compat": "cdk-compat", + "gen": "cfn2ts", + "rosetta:extract": "yarn --silent jsii-rosetta extract", + "build+extract": "yarn build && yarn rosetta:extract", + "build+test+extract": "yarn build+test && yarn rosetta:extract" + }, + "cdk-build": { + "cloudformation": "AWS::EMRServerless", + "jest": true, + "env": { + "AWSLINT_BASE_CONSTRUCT": "true" + } + }, + "keywords": [ + "aws", + "cdk", + "constructs", + "AWS::EMRServerless", + "aws-emrserverless" + ], + "author": { + "name": "Amazon Web Services", + "url": "https://aws.amazon.com", + "organization": true + }, + "license": "Apache-2.0", + "devDependencies": { + "@aws-cdk/assertions": "0.0.0", + "@aws-cdk/cdk-build-tools": "0.0.0", + "@aws-cdk/cfn2ts": "0.0.0", + "@aws-cdk/pkglint": "0.0.0", + "@types/jest": "^27.5.0" + }, + "dependencies": { + "@aws-cdk/core": "0.0.0" + }, + "peerDependencies": { + "@aws-cdk/core": "0.0.0" + }, + "engines": { + "node": ">= 10.13.0 <13 || >=13.7.0" + }, + "stability": "experimental", + "maturity": "cfn-only", + "awscdkio": { + "announce": false + }, + "publishConfig": { + "tag": "latest" + } +} diff --git a/packages/@aws-cdk/aws-emrserverless/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-emrserverless/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..e208762bca03c --- /dev/null +++ b/packages/@aws-cdk/aws-emrserverless/rosetta/default.ts-fixture @@ -0,0 +1,8 @@ +import { Construct } from 'constructs'; +import { Stack } from '@aws-cdk/core'; + +class MyStack extends Stack { + constructor(scope: Construct, id: string) { + /// here + } +} diff --git a/packages/@aws-cdk/aws-emrserverless/test/emrserverless.test.ts b/packages/@aws-cdk/aws-emrserverless/test/emrserverless.test.ts new file mode 100644 index 0000000000000..465c7bdea0693 --- /dev/null +++ b/packages/@aws-cdk/aws-emrserverless/test/emrserverless.test.ts @@ -0,0 +1,6 @@ +import '@aws-cdk/assertions'; +import {} from '../lib'; + +test('No tests are specified for this package', () => { + expect(true).toBe(true); +}); diff --git a/packages/@aws-cdk/cfnspec/CHANGELOG.md b/packages/@aws-cdk/cfnspec/CHANGELOG.md index 21e1b72d1fbc2..e5491f3f4382f 100644 --- a/packages/@aws-cdk/cfnspec/CHANGELOG.md +++ b/packages/@aws-cdk/cfnspec/CHANGELOG.md @@ -1,3 +1,78 @@ +# CloudFormation Resource Specification v73.1.0 + +## New Resource Types + +* AWS::EMRServerless::Application +* AWS::IoTWireless::NetworkAnalyzerConfiguration + +## Attribute Changes + +* AWS::EC2::PlacementGroup GroupName (__added__) +* AWS::EC2::VPCPeeringConnection Id (__added__) + +## Property Changes + +* AWS::Cognito::UserPool UserAttributeUpdateSettings (__added__) +* AWS::Cognito::UserPoolClient EnablePropagateAdditionalUserContextData (__added__) +* AWS::EC2::TransitGatewayAttachment Options (__added__) +* AWS::EC2::TransitGatewayAttachment SubnetIds.UpdateType (__changed__) + * Old: Immutable + * New: Mutable +* AWS::EC2::TransitGatewayAttachment Tags.UpdateType (__changed__) + * Old: Immutable + * New: Mutable +* AWS::IoTSiteWise::Asset AssetDescription (__added__) +* AWS::Lightsail::LoadBalancer TlsPolicyName (__added__) +* AWS::Lightsail::LoadBalancerTlsCertificate HttpsRedirectionEnabled (__added__) +* AWS::NetworkManager::CoreNetwork PolicyDocument.PrimitiveType (__changed__) + * Old: String + * New: Json +* AWS::Pinpoint::Campaign CustomDeliveryConfiguration (__added__) +* AWS::Pinpoint::Campaign TemplateConfiguration (__added__) +* AWS::Pinpoint::Campaign MessageConfiguration.Required (__changed__) + * Old: true + * New: false + +## Property Type Changes + +* AWS::Cognito::UserPool.UserAttributeUpdateSettings (__added__) +* AWS::Pinpoint::Campaign.CampaignCustomMessage (__added__) +* AWS::Pinpoint::Campaign.CustomDeliveryConfiguration (__added__) +* AWS::Pinpoint::Campaign.Template (__added__) +* AWS::Pinpoint::Campaign.TemplateConfiguration (__added__) +* AWS::SSMIncidents::ResponsePlan.DynamicSsmParameter (__added__) +* AWS::SSMIncidents::ResponsePlan.DynamicSsmParameterValue (__added__) +* AWS::AppMesh::Mesh.MeshServiceDiscovery IpPreference (__added__) +* AWS::AppMesh::Mesh.MeshSpec ServiceDiscovery (__added__) +* AWS::AppMesh::VirtualNode.AwsCloudMapServiceDiscovery IpPreference (__added__) +* AWS::AppMesh::VirtualNode.DnsServiceDiscovery IpPreference (__added__) +* AWS::DataSync::Task.Options ObjectTags (__added__) +* AWS::EC2::LaunchTemplate.LaunchTemplateData DisableApiStop (__added__) +* AWS::Pinpoint::Campaign.MessageConfiguration CustomMessage (__added__) +* AWS::Pinpoint::Campaign.WriteTreatmentResource CustomDeliveryConfiguration (__added__) +* AWS::Pinpoint::Campaign.WriteTreatmentResource TemplateConfiguration (__added__) +* AWS::SSMIncidents::ResponsePlan.SsmAutomation DynamicParameters (__added__) +* AWS::Transfer::Server.ProtocolDetails SetStatOption (__added__) + +## Unapplied changes + +* AWS::Rekognition is at 68.0.0 +* AWS::SageMaker is at 72.0.0 +# Serverless Application Model (SAM) Resource Specification v2016-10-31 + +## New Resource Types + + +## Attribute Changes + + +## Property Changes + + +## Property Type Changes + +* AWS::Serverless::Api.Auth AddDefaultAuthorizerToCorsPreflight (__added__) + # CloudFormation Resource Specification v72.0.0 ## New Resource Types diff --git a/packages/@aws-cdk/cfnspec/cfn.version b/packages/@aws-cdk/cfnspec/cfn.version index 7dbe91c294280..eb9becbe684b7 100644 --- a/packages/@aws-cdk/cfnspec/cfn.version +++ b/packages/@aws-cdk/cfnspec/cfn.version @@ -1 +1 @@ -72.0.0 +73.1.0 diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ACMPCA.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ACMPCA.json index 7c21ffe13187a..96483a44a93d9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ACMPCA.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ACMPCA.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ACMPCA::Certificate.ApiPassthrough": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificate-apipassthrough.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_APS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_APS.json index 70d69bbaca8af..62416d0c708bd 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_APS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_APS.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::APS::RuleGroupsNamespace": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AccessAnalyzer.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AccessAnalyzer.json index 532637d7f6750..cdcaf298f9e30 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AccessAnalyzer.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AccessAnalyzer.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::AccessAnalyzer::Analyzer.ArchiveRule": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-accessanalyzer-analyzer-archiverule.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmazonMQ.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmazonMQ.json index 4254ff51738a4..22364cef61e7d 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmazonMQ.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmazonMQ.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::AmazonMQ::Broker.ConfigurationId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-configurationid.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Amplify.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Amplify.json index 6a7e79c634694..999cfc72662d9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Amplify.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Amplify.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Amplify::App.AutoBranchCreationConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmplifyUIBuilder.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmplifyUIBuilder.json index e1fb7b01ea2e7..50aef0ed165d7 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmplifyUIBuilder.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmplifyUIBuilder.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::AmplifyUIBuilder::Component.ActionParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-actionparameters.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGateway.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGateway.json index a545eb5ed9f5f..49ceaff33ec23 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGateway.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGateway.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ApiGateway::ApiKey.StageKey": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-apikey-stagekey.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGatewayV2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGatewayV2.json index 7e663499d0be1..1de76769eedaf 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGatewayV2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGatewayV2.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ApiGatewayV2::Api.BodyS3Location": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppConfig.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppConfig.json index 85434adbb085a..65d29beea4a96 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppConfig.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppConfig.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::AppConfig::Application.Tags": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appconfig-application-tags.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppFlow.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppFlow.json index a42f9cc5a5042..b487750207bc3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppFlow.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppFlow.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::AppFlow::ConnectorProfile.AmplitudeConnectorProfileCredentials": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-amplitudeconnectorprofilecredentials.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppIntegrations.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppIntegrations.json index 5e6598f9359d0..8ffcd31d03c0e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppIntegrations.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppIntegrations.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::AppIntegrations::DataIntegration.ScheduleConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-dataintegration-scheduleconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppMesh.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppMesh.json index ad67de607a4f3..61fbccea7b897 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppMesh.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppMesh.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::AppMesh::GatewayRoute.GatewayRouteHostnameMatch": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-gatewayroute-gatewayroutehostnamematch.html", @@ -468,7 +468,14 @@ }, "AWS::AppMesh::Mesh.MeshServiceDiscovery": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-mesh-meshservicediscovery.html", - "Properties": {} + "Properties": { + "IpPreference": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-mesh-meshservicediscovery.html#cfn-appmesh-mesh-meshservicediscovery-ippreference", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } }, "AWS::AppMesh::Mesh.MeshSpec": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-mesh-meshspec.html", @@ -478,6 +485,12 @@ "Required": false, "Type": "EgressFilter", "UpdateType": "Mutable" + }, + "ServiceDiscovery": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-mesh-meshspec.html#cfn-appmesh-mesh-meshspec-servicediscovery", + "Required": false, + "Type": "MeshServiceDiscovery", + "UpdateType": "Mutable" } } }, @@ -1555,6 +1568,12 @@ "Type": "List", "UpdateType": "Mutable" }, + "IpPreference": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-awscloudmapservicediscovery.html#cfn-appmesh-virtualnode-awscloudmapservicediscovery-ippreference", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "NamespaceName": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-awscloudmapservicediscovery.html#cfn-appmesh-virtualnode-awscloudmapservicediscovery-namespacename", "PrimitiveType": "String", @@ -1658,6 +1677,12 @@ "Required": true, "UpdateType": "Mutable" }, + "IpPreference": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-dnsservicediscovery.html#cfn-appmesh-virtualnode-dnsservicediscovery-ippreference", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "ResponseType": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-dnsservicediscovery.html#cfn-appmesh-virtualnode-dnsservicediscovery-responsetype", "PrimitiveType": "String", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppRunner.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppRunner.json index a5d0736a6337c..4928bff73367c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppRunner.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppRunner.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::AppRunner::ObservabilityConfiguration.TraceConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-observabilityconfiguration-traceconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppStream.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppStream.json index e2b82ec853ea8..58f3fd68b7247 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppStream.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppStream.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::AppStream::AppBlock.S3Location": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-appblock-s3location.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppSync.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppSync.json index 32803cc91df33..3dd240d35d174 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppSync.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppSync.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::AppSync::DataSource.AuthorizationConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-authorizationconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationAutoScaling.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationAutoScaling.json index e4c0c4cb653bd..dece3d2777748 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationAutoScaling.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationAutoScaling.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ApplicationAutoScaling::ScalableTarget.ScalableTargetAction": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scalabletargetaction.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationInsights.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationInsights.json index 3bb88cc78ef12..f336db92cd5a9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationInsights.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationInsights.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ApplicationInsights::Application.Alarm": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-alarm.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Athena.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Athena.json index 159791649e2fa..5cde0c2c13ae4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Athena.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Athena.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Athena::WorkGroup.EncryptionConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-encryptionconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AuditManager.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AuditManager.json index 5a040dee12cc6..747fcfa0830d9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AuditManager.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AuditManager.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::AuditManager::Assessment.AWSAccount": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-auditmanager-assessment-awsaccount.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScaling.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScaling.json index 9e7e6d35ce7bd..9f08e67808e5a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScaling.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScaling.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::AutoScaling::AutoScalingGroup.AcceleratorCountRequest": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratorcountrequest.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScalingPlans.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScalingPlans.json index e1976c66218a2..e89168eb66994 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScalingPlans.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScalingPlans.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::AutoScalingPlans::ScalingPlan.ApplicationSource": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-applicationsource.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Backup.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Backup.json index 22955b1f3e229..862f2a6345eaa 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Backup.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Backup.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Backup::BackupPlan.AdvancedBackupSettingResourceType": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-advancedbackupsettingresourcetype.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Batch.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Batch.json index c1b1acf125e83..34cb49d708085 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Batch.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Batch.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Batch::ComputeEnvironment.ComputeResources": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_BillingConductor.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_BillingConductor.json index 100d23e2dd0f0..c0aae4efc62df 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_BillingConductor.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_BillingConductor.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::BillingConductor::BillingGroup.AccountGrouping": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billingconductor-billinggroup-accountgrouping.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Budgets.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Budgets.json index a512b1f5a857e..e191528c937cf 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Budgets.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Budgets.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Budgets::Budget.BudgetData": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-budgetdata.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CE.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CE.json index 93795f2421872..d0dec1474cbb8 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CE.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CE.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::CE::AnomalyMonitor.ResourceTag": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ce-anomalymonitor-resourcetag.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CUR.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CUR.json index 10c64bef808f7..6ddd643856a6f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CUR.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CUR.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::CUR::ReportDefinition": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cassandra.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cassandra.json index 05dbfd9b9c8c7..8e749bc1d3963 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cassandra.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cassandra.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Cassandra::Table.BillingMode": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-billingmode.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CertificateManager.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CertificateManager.json index aacb3f1b0e102..883a9d7091959 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CertificateManager.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CertificateManager.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::CertificateManager::Account.ExpiryEventsConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-certificatemanager-account-expiryeventsconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Chatbot.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Chatbot.json index d809107611d03..f495b475cff11 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Chatbot.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Chatbot.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::Chatbot::SlackChannelConfiguration": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cloud9.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cloud9.json index da836a0130666..dadc417a63ad5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cloud9.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cloud9.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Cloud9::EnvironmentEC2.Repository": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloud9-environmentec2-repository.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFormation.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFormation.json index d5e28b2a143f0..ef140e211cde8 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFormation.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFormation.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::CloudFormation::HookVersion.LoggingConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-hookversion-loggingconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFront.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFront.json index 177275027d0df..fcad1fd7e2b5b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFront.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFront.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::CloudFront::CachePolicy.CachePolicyConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-cachepolicy-cachepolicyconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudTrail.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudTrail.json index 13842ecf83639..b0e204f95e8fd 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudTrail.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudTrail.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::CloudTrail::Trail.DataResource": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-trail-dataresource.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudWatch.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudWatch.json index 957830d7fab1f..f4e07474a6fe1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudWatch.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudWatch.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::CloudWatch::Alarm.Dimension": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-dimension.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeArtifact.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeArtifact.json index f9d43c0dcde82..02c557099a50a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeArtifact.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeArtifact.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::CodeArtifact::Domain": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeBuild.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeBuild.json index 7663bc2b0f30d..1ba54ca0211c9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeBuild.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeBuild.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::CodeBuild::Project.Artifacts": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeCommit.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeCommit.json index 006731840449a..616541845898b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeCommit.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeCommit.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::CodeCommit::Repository.Code": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-code.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeDeploy.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeDeploy.json index 6317cf08df341..607e843b12669 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeDeploy.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeDeploy.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::CodeDeploy::DeploymentConfig.MinimumHealthyHosts": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-minimumhealthyhosts.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruProfiler.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruProfiler.json index 302d2df71807b..b9e7b31018481 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruProfiler.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruProfiler.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::CodeGuruProfiler::ProfilingGroup.Channel": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codeguruprofiler-profilinggroup-channel.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruReviewer.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruReviewer.json index f2add38980ad9..b7ecaf9fadd0f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruReviewer.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruReviewer.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::CodeGuruReviewer::RepositoryAssociation": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodePipeline.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodePipeline.json index 9cf4d6347cc8f..d7d6cfdd5c690 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodePipeline.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodePipeline.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::CodePipeline::CustomActionType.ArtifactDetails": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-customactiontype-artifactdetails.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStar.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStar.json index c190f923e7eea..9324d7b595e7b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStar.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStar.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::CodeStar::GitHubRepository.Code": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestar-githubrepository-code.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarConnections.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarConnections.json index 858061d275710..bdb9ee05f09e2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarConnections.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarConnections.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::CodeStarConnections::Connection": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarNotifications.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarNotifications.json index 5150f6c443649..cbc5d92af7636 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarNotifications.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarNotifications.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::CodeStarNotifications::NotificationRule.Target": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestarnotifications-notificationrule-target.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cognito.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cognito.json index 090664002eea0..d16f3d6adf869 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cognito.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cognito.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Cognito::IdentityPool.CognitoIdentityProvider": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypool-cognitoidentityprovider.html", @@ -535,6 +535,18 @@ } } }, + "AWS::Cognito::UserPool.UserAttributeUpdateSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-userattributeupdatesettings.html", + "Properties": { + "AttributesRequireVerificationBeforeUpdate": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-userattributeupdatesettings.html#cfn-cognito-userpool-userattributeupdatesettings-attributesrequireverificationbeforeupdate", + "PrimitiveItemType": "String", + "Required": true, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::Cognito::UserPool.UserPoolAddOns": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-userpooladdons.html", "Properties": { @@ -552,7 +564,7 @@ "CaseSensitive": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-usernameconfiguration.html#cfn-cognito-userpool-usernameconfiguration-casesensitive", "PrimitiveType": "Boolean", - "Required": false, + "Required": true, "UpdateType": "Mutable" } } @@ -1088,6 +1100,12 @@ "Required": false, "UpdateType": "Mutable" }, + "UserAttributeUpdateSettings": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html#cfn-cognito-userpool-userattributeupdatesettings", + "Required": false, + "Type": "UserAttributeUpdateSettings", + "UpdateType": "Mutable" + }, "UserPoolAddOns": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html#cfn-cognito-userpool-userpooladdons", "Required": false, @@ -1189,6 +1207,12 @@ "Required": false, "UpdateType": "Mutable" }, + "EnablePropagateAdditionalUserContextData": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html#cfn-cognito-userpoolclient-enablepropagateadditionalusercontextdata", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, "EnableTokenRevocation": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolclient.html#cfn-cognito-userpoolclient-enabletokenrevocation", "PrimitiveType": "Boolean", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Config.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Config.json index 584e780f87cf0..26c160dd6ef84 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Config.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Config.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Config::ConfigRule.Scope": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configrule-scope.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Connect.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Connect.json index 64de11239608c..e5e5bb39dd532 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Connect.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Connect.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Connect::HoursOfOperation.HoursOfOperationConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-hoursofoperation-hoursofoperationconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CustomerProfiles.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CustomerProfiles.json index 3fdde2cb48296..4533323ad12e8 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CustomerProfiles.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CustomerProfiles.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::CustomerProfiles::Integration.ConnectorOperator": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-integration-connectoroperator.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DAX.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DAX.json index 24c84beb33deb..815504b489381 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DAX.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DAX.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::DAX::Cluster.SSESpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dax-cluster-ssespecification.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DLM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DLM.json index 754e50fda5617..af109a7f6c536 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DLM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DLM.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::DLM::LifecyclePolicy.Action": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-action.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DMS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DMS.json index 30b70e65dfc6b..018c2a50358a6 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DMS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DMS.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::DMS::Endpoint.DocDbSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dms-endpoint-docdbsettings.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataBrew.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataBrew.json index 1cd28965d3ae0..a6c653f0e3de1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataBrew.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataBrew.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::DataBrew::Dataset.CsvOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-dataset-csvoptions.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataPipeline.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataPipeline.json index 2303395a5503e..bc9c1d06bccea 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataPipeline.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataPipeline.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::DataPipeline::Pipeline.Field": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelineobjects-fields.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataSync.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataSync.json index 70e4321b7aaea..791f3c2edcc64 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataSync.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataSync.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::DataSync::LocationEFS.Ec2Config": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-locationefs-ec2config.html", @@ -181,6 +181,12 @@ "Required": false, "UpdateType": "Mutable" }, + "ObjectTags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-objecttags", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "OverwriteMode": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-options.html#cfn-datasync-task-options-overwritemode", "PrimitiveType": "String", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Detective.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Detective.json index c63191a87b865..4d26135bd7e37 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Detective.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Detective.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::Detective::Graph": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DevOpsGuru.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DevOpsGuru.json index 6a6f440616b49..0094630495671 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DevOpsGuru.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DevOpsGuru.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::DevOpsGuru::NotificationChannel.NotificationChannelConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-devopsguru-notificationchannel-notificationchannelconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DirectoryService.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DirectoryService.json index 318135c511af6..05eb994cd7064 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DirectoryService.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DirectoryService.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::DirectoryService::MicrosoftAD.VpcSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-directoryservice-microsoftad-vpcsettings.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDB.json index 258f7b4ec2a09..fa93b2c319ba0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDB.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDB.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::DocDB::DBCluster": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json index 00e392c0b8dbd..c88744bcce94b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::DynamoDB::GlobalTable.AttributeDefinition": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-attributedefinition.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EC2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EC2.json index 3fd413e1baee4..141c2f2581e82 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EC2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EC2.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::EC2::CapacityReservation.TagSpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-tagspecification.html", @@ -1708,6 +1708,12 @@ "Type": "CreditSpecification", "UpdateType": "Mutable" }, + "DisableApiStop": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html#cfn-ec2-launchtemplate-launchtemplatedata-disableapistop", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, "DisableApiTermination": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html#cfn-ec2-launchtemplate-launchtemplatedata-disableapitermination", "PrimitiveType": "Boolean", @@ -6345,6 +6351,11 @@ } }, "AWS::EC2::PlacementGroup": { + "Attributes": { + "GroupName": { + "PrimitiveType": "String" + } + }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-placementgroup.html", "Properties": { "Strategy": { @@ -7155,13 +7166,19 @@ }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewayattachment.html", "Properties": { + "Options": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewayattachment.html#cfn-ec2-transitgatewayattachment-options", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Mutable" + }, "SubnetIds": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewayattachment.html#cfn-ec2-transitgatewayattachment-subnetids", "DuplicatesAllowed": true, "PrimitiveItemType": "String", "Required": true, "Type": "List", - "UpdateType": "Immutable" + "UpdateType": "Mutable" }, "Tags": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewayattachment.html#cfn-ec2-transitgatewayattachment-tags", @@ -7169,7 +7186,7 @@ "ItemType": "Tag", "Required": false, "Type": "List", - "UpdateType": "Immutable" + "UpdateType": "Mutable" }, "TransitGatewayId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewayattachment.html#cfn-ec2-transitgatewayattachment-transitgatewayid", @@ -7910,6 +7927,11 @@ } }, "AWS::EC2::VPCPeeringConnection": { + "Attributes": { + "Id": { + "PrimitiveType": "String" + } + }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcpeeringconnection.html", "Properties": { "PeerOwnerId": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECR.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECR.json index 10683b7682a21..e3a74ce8322a1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECR.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECR.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ECR::ReplicationConfiguration.ReplicationConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecr-replicationconfiguration-replicationconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECS.json index 42b92d2778fb3..82916185c43a0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECS.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ECS::CapacityProvider.AutoScalingGroupProvider": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EFS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EFS.json index e11a2302b07ae..9ae7011ea847c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EFS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EFS.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::EFS::AccessPoint.AccessPointTag": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-efs-accesspoint-accesspointtag.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EKS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EKS.json index ce54c0dbbb1a7..9fcc4662955bf 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EKS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EKS.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::EKS::Cluster.ClusterLogging": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-clusterlogging.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMR.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMR.json index f1703f3f9aa41..8535630c36a04 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMR.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMR.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::EMR::Cluster.Application": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-application.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRContainers.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRContainers.json index fea012308b784..8a42b56375ff9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRContainers.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRContainers.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::EMRContainers::VirtualCluster.ContainerInfo": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrcontainers-virtualcluster-containerinfo.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRServerless.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRServerless.json new file mode 100644 index 0000000000000..d7711523f3b69 --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRServerless.json @@ -0,0 +1,207 @@ +{ + "$version": "73.1.0", + "PropertyTypes": { + "AWS::EMRServerless::Application.AutoStartConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-autostartconfiguration.html", + "Properties": { + "Enabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-autostartconfiguration.html#cfn-emrserverless-application-autostartconfiguration-enabled", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::EMRServerless::Application.AutoStopConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-autostopconfiguration.html", + "Properties": { + "Enabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-autostopconfiguration.html#cfn-emrserverless-application-autostopconfiguration-enabled", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "IdleTimeoutMinutes": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-autostopconfiguration.html#cfn-emrserverless-application-autostopconfiguration-idletimeoutminutes", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::EMRServerless::Application.InitialCapacityConfig": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-initialcapacityconfig.html", + "Properties": { + "WorkerConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-initialcapacityconfig.html#cfn-emrserverless-application-initialcapacityconfig-workerconfiguration", + "Required": true, + "Type": "WorkerConfiguration", + "UpdateType": "Mutable" + }, + "WorkerCount": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-initialcapacityconfig.html#cfn-emrserverless-application-initialcapacityconfig-workercount", + "PrimitiveType": "Integer", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::EMRServerless::Application.InitialCapacityConfigKeyValuePair": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-initialcapacityconfigkeyvaluepair.html", + "Properties": { + "Key": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-initialcapacityconfigkeyvaluepair.html#cfn-emrserverless-application-initialcapacityconfigkeyvaluepair-key", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-initialcapacityconfigkeyvaluepair.html#cfn-emrserverless-application-initialcapacityconfigkeyvaluepair-value", + "Required": true, + "Type": "InitialCapacityConfig", + "UpdateType": "Mutable" + } + } + }, + "AWS::EMRServerless::Application.MaximumAllowedResources": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-maximumallowedresources.html", + "Properties": { + "Cpu": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-maximumallowedresources.html#cfn-emrserverless-application-maximumallowedresources-cpu", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Disk": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-maximumallowedresources.html#cfn-emrserverless-application-maximumallowedresources-disk", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Memory": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-maximumallowedresources.html#cfn-emrserverless-application-maximumallowedresources-memory", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, + "AWS::EMRServerless::Application.NetworkConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-networkconfiguration.html", + "Properties": { + "SecurityGroupIds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-networkconfiguration.html#cfn-emrserverless-application-networkconfiguration-securitygroupids", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "SubnetIds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-networkconfiguration.html#cfn-emrserverless-application-networkconfiguration-subnetids", + "DuplicatesAllowed": false, + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, + "AWS::EMRServerless::Application.WorkerConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-workerconfiguration.html", + "Properties": { + "Cpu": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-workerconfiguration.html#cfn-emrserverless-application-workerconfiguration-cpu", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Disk": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-workerconfiguration.html#cfn-emrserverless-application-workerconfiguration-disk", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Memory": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-workerconfiguration.html#cfn-emrserverless-application-workerconfiguration-memory", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + } + }, + "ResourceTypes": { + "AWS::EMRServerless::Application": { + "Attributes": { + "ApplicationId": { + "PrimitiveType": "String" + }, + "Arn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emrserverless-application.html", + "Properties": { + "AutoStartConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emrserverless-application.html#cfn-emrserverless-application-autostartconfiguration", + "Required": false, + "Type": "AutoStartConfiguration", + "UpdateType": "Mutable" + }, + "AutoStopConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emrserverless-application.html#cfn-emrserverless-application-autostopconfiguration", + "Required": false, + "Type": "AutoStopConfiguration", + "UpdateType": "Mutable" + }, + "InitialCapacity": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emrserverless-application.html#cfn-emrserverless-application-initialcapacity", + "DuplicatesAllowed": false, + "ItemType": "InitialCapacityConfigKeyValuePair", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "MaximumCapacity": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emrserverless-application.html#cfn-emrserverless-application-maximumcapacity", + "Required": false, + "Type": "MaximumAllowedResources", + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emrserverless-application.html#cfn-emrserverless-application-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "NetworkConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emrserverless-application.html#cfn-emrserverless-application-networkconfiguration", + "Required": false, + "Type": "NetworkConfiguration", + "UpdateType": "Mutable" + }, + "ReleaseLabel": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emrserverless-application.html#cfn-emrserverless-application-releaselabel", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emrserverless-application.html#cfn-emrserverless-application-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Type": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emrserverless-application.html#cfn-emrserverless-application-type", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } + } + } +} diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElastiCache.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElastiCache.json index 34ffd7ed7af50..550297c1363fd 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElastiCache.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElastiCache.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ElastiCache::CacheCluster.CloudWatchLogsDestinationDetails": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-cachecluster-cloudwatchlogsdestinationdetails.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticBeanstalk.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticBeanstalk.json index b6bf7265d0e23..c3e4a65be6788 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticBeanstalk.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticBeanstalk.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ElasticBeanstalk::Application.ApplicationResourceLifecycleConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticbeanstalk-application-applicationresourcelifecycleconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancing.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancing.json index 6e0dc94b87fd4..6500f10d751c0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancing.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancing.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ElasticLoadBalancing::LoadBalancer.AccessLoggingPolicy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-accessloggingpolicy.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancingV2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancingV2.json index 6c0989a1d8216..b98e137632b66 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancingV2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancingV2.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ElasticLoadBalancingV2::Listener.Action": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Elasticsearch.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Elasticsearch.json index 07e27224fa4fc..4199193a81c91 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Elasticsearch.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Elasticsearch.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Elasticsearch::Domain.AdvancedSecurityOptionsInput": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticsearch-domain-advancedsecurityoptionsinput.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EventSchemas.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EventSchemas.json index ef7a177d51bb2..254d492901dfe 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EventSchemas.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EventSchemas.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::EventSchemas::Discoverer.TagsEntry": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventschemas-discoverer-tagsentry.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Events.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Events.json index cb0cc756ccdd1..24372863937a5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Events.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Events.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Events::Connection.ApiKeyAuthParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-apikeyauthparameters.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Evidently.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Evidently.json index d314729912e5b..1937a94f13b98 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Evidently.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Evidently.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Evidently::Experiment.MetricGoalObject": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-metricgoalobject.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FIS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FIS.json index 0cf1c70ee7df3..2b4a2a41274b1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FIS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FIS.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::FIS::ExperimentTemplate.ExperimentTemplateAction": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fis-experimenttemplate-experimenttemplateaction.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FMS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FMS.json index b0041a87f3269..7396db8bf9491 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FMS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FMS.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::FMS::Policy.IEMap": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-iemap.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FSx.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FSx.json index 36d664924e334..96e9edb8aaa3b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FSx.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FSx.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::FSx::FileSystem.AuditLogConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-auditlogconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FinSpace.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FinSpace.json index 9d2732491c87c..fe6e8409d4dd9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FinSpace.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FinSpace.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::FinSpace::Environment.FederationParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-finspace-environment-federationparameters.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Forecast.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Forecast.json index d8d29d9d410ee..2932d94b1e3a6 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Forecast.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Forecast.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::Forecast::Dataset": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FraudDetector.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FraudDetector.json index dd9f59e1d2b18..10b8488d31c21 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FraudDetector.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FraudDetector.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::FraudDetector::Detector.EntityType": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-frauddetector-detector-entitytype.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GameLift.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GameLift.json index 9cd4e7f89243e..aa01f03d33fc7 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GameLift.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GameLift.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::GameLift::Alias.RoutingStrategy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-alias-routingstrategy.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GlobalAccelerator.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GlobalAccelerator.json index a71117ef22f83..c88cd1aa12297 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GlobalAccelerator.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GlobalAccelerator.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::GlobalAccelerator::EndpointGroup.EndpointConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-endpointconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Glue.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Glue.json index 6c5c601c3d8d6..c36fff5e79fe7 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Glue.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Glue.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Glue::Classifier.CsvClassifier": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-csvclassifier.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Greengrass.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Greengrass.json index df20e3dd0e39e..968b956b2ecb3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Greengrass.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Greengrass.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Greengrass::ConnectorDefinition.Connector": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-connectordefinition-connector.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GreengrassV2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GreengrassV2.json index e67b311d60a48..ce09e12a69a91 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GreengrassV2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GreengrassV2.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::GreengrassV2::ComponentVersion.ComponentDependencyRequirement": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-componentdependencyrequirement.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GroundStation.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GroundStation.json index 91f8eb37bb5ab..b2944c43cee48 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GroundStation.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GroundStation.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::GroundStation::Config.AntennaDownlinkConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-groundstation-config-antennadownlinkconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GuardDuty.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GuardDuty.json index eb76791f3549a..4101144f9a372 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GuardDuty.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GuardDuty.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::GuardDuty::Detector.CFNDataSourceConfigurations": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-detector-cfndatasourceconfigurations.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_HealthLake.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_HealthLake.json index c5a647715c094..8518a698fe4ab 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_HealthLake.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_HealthLake.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::HealthLake::FHIRDatastore.KmsEncryptionConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-healthlake-fhirdatastore-kmsencryptionconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IAM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IAM.json index e5c1c3de1a7a7..ae88ea523dee2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IAM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IAM.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::IAM::Group.Policy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IVS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IVS.json index 38c626b131445..cc2661939939a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IVS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IVS.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::IVS::RecordingConfiguration.DestinationConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ivs-recordingconfiguration-destinationconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ImageBuilder.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ImageBuilder.json index ea801901aa576..bd4b22496fe42 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ImageBuilder.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ImageBuilder.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ImageBuilder::ContainerRecipe.ComponentConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-containerrecipe-componentconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Inspector.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Inspector.json index ec2a9e38f0b2f..869371c745ee5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Inspector.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Inspector.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::Inspector::AssessmentTarget": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_InspectorV2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_InspectorV2.json index 8154eec4e915b..4a97457a95174 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_InspectorV2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_InspectorV2.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::InspectorV2::Filter.DateFilter": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-inspectorv2-filter-datefilter.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json index 0ede8bd392cf3..43e124f73cedd 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::IoT::AccountAuditConfiguration.AuditCheckConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-accountauditconfiguration-auditcheckconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT1Click.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT1Click.json index e78ce9693e431..f709e56d95af6 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT1Click.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT1Click.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::IoT1Click::Project.DeviceTemplate": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot1click-project-devicetemplate.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTAnalytics.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTAnalytics.json index b428d314a539b..75d5ad6a494c1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTAnalytics.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTAnalytics.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::IoTAnalytics::Channel.ChannelStorage": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-channel-channelstorage.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTCoreDeviceAdvisor.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTCoreDeviceAdvisor.json index 47f99b41fae4e..71769362395f4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTCoreDeviceAdvisor.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTCoreDeviceAdvisor.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::IoTCoreDeviceAdvisor::SuiteDefinition": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTEvents.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTEvents.json index 28a3ed785f9b9..fdc8338b18798 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTEvents.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTEvents.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::IoTEvents::AlarmModel.AcknowledgeFlow": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-acknowledgeflow.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetHub.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetHub.json index dfc38a8c8a89b..2b83ea9f87b6d 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetHub.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetHub.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::IoTFleetHub::Application": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTSiteWise.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTSiteWise.json index 2872a3b46a348..eab9585d1e62a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTSiteWise.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTSiteWise.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::IoTSiteWise::AccessPolicy.AccessPolicyIdentity": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-accesspolicy-accesspolicyidentity.html", @@ -474,6 +474,12 @@ }, "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-asset.html", "Properties": { + "AssetDescription": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-asset.html#cfn-iotsitewise-asset-assetdescription", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "AssetHierarchies": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-asset.html#cfn-iotsitewise-asset-assethierarchies", "ItemType": "AssetHierarchy", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTThingsGraph.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTThingsGraph.json index f35e7beb3b73d..6a14d2a3e2d76 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTThingsGraph.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTThingsGraph.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::IoTThingsGraph::FlowTemplate.DefinitionDocument": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotthingsgraph-flowtemplate-definitiondocument.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTTwinMaker.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTTwinMaker.json index 407c933e5db18..3032f64c1ee21 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTTwinMaker.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTTwinMaker.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::IoTTwinMaker::ComponentType.DataConnector": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iottwinmaker-componenttype-dataconnector.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTWireless.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTWireless.json index 5e5d57be41396..f11459b166492 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTWireless.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTWireless.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::IoTWireless::DeviceProfile.LoRaWANDeviceProfile": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotwireless-deviceprofile-lorawandeviceprofile.html", @@ -777,6 +777,56 @@ } } }, + "AWS::IoTWireless::NetworkAnalyzerConfiguration": { + "Attributes": { + "Arn": { + "PrimitiveType": "String" + } + }, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-networkanalyzerconfiguration.html", + "Properties": { + "Description": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-networkanalyzerconfiguration.html#cfn-iotwireless-networkanalyzerconfiguration-description", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-networkanalyzerconfiguration.html#cfn-iotwireless-networkanalyzerconfiguration-name", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-networkanalyzerconfiguration.html#cfn-iotwireless-networkanalyzerconfiguration-tags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Immutable" + }, + "TraceContent": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-networkanalyzerconfiguration.html#cfn-iotwireless-networkanalyzerconfiguration-tracecontent", + "PrimitiveType": "Json", + "Required": false, + "UpdateType": "Mutable" + }, + "WirelessDevices": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-networkanalyzerconfiguration.html#cfn-iotwireless-networkanalyzerconfiguration-wirelessdevices", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "WirelessGateways": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotwireless-networkanalyzerconfiguration.html#cfn-iotwireless-networkanalyzerconfiguration-wirelessgateways", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::IoTWireless::PartnerAccount": { "Attributes": { "Arn": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KMS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KMS.json index cab1c5711f718..6e751b5f6fdbf 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KMS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KMS.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::KMS::Alias": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KafkaConnect.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KafkaConnect.json index 7d93dadfc8624..09a8b5cc6a266 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KafkaConnect.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KafkaConnect.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::KafkaConnect::Connector.ApacheKafkaCluster": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kafkaconnect-connector-apachekafkacluster.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kendra.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kendra.json index ca083773e031a..8777d0475ed05 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kendra.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kendra.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Kendra::DataSource.AccessControlListConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-accesscontrollistconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kinesis.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kinesis.json index 1096cddc1125c..3b86a84f77bef 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kinesis.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kinesis.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Kinesis::Stream.StreamEncryption": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-streamencryption.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalytics.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalytics.json index 618e9d472be02..ae8261f73a23f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalytics.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalytics.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::KinesisAnalytics::Application.CSVMappingParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-csvmappingparameters.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalyticsV2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalyticsV2.json index 41e54cf3a79a5..dfd61fc6a59f0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalyticsV2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalyticsV2.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::KinesisAnalyticsV2::Application.ApplicationCodeConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalyticsv2-application-applicationcodeconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisFirehose.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisFirehose.json index 24d9820b22b88..1b3bca5785a96 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisFirehose.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisFirehose.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::KinesisFirehose::DeliveryStream.AmazonopensearchserviceBufferingHints": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-amazonopensearchservicebufferinghints.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisVideo.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisVideo.json index 2e5006a0fed57..2c2bf138a19f3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisVideo.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisVideo.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::KinesisVideo::SignalingChannel": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LakeFormation.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LakeFormation.json index 2a328eef0ee22..e064e12229474 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LakeFormation.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LakeFormation.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::LakeFormation::DataLakeSettings.Admins": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lakeformation-datalakesettings-admins.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lambda.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lambda.json index 7320909329f21..3018b458a14d2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lambda.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lambda.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Lambda::Alias.AliasRoutingConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-aliasroutingconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lex.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lex.json index 16b2492404aff..48ab7fc25a8dd 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lex.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lex.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Lex::Bot.AdvancedRecognitionSetting": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-advancedrecognitionsetting.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LicenseManager.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LicenseManager.json index b3b87965af6d9..fee26bf6cfec4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LicenseManager.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LicenseManager.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::LicenseManager::License.BorrowConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-licensemanager-license-borrowconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lightsail.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lightsail.json index 055fbce8a252c..6568ff7ef0496 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lightsail.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lightsail.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Lightsail::Bucket.AccessRules": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-bucket-accessrules.html", @@ -1355,6 +1355,12 @@ "Required": false, "Type": "List", "UpdateType": "Mutable" + }, + "TlsPolicyName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-loadbalancer.html#cfn-lightsail-loadbalancer-tlspolicyname", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" } } }, @@ -1389,6 +1395,12 @@ "Required": true, "UpdateType": "Immutable" }, + "HttpsRedirectionEnabled": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-loadbalancertlscertificate.html#cfn-lightsail-loadbalancertlscertificate-httpsredirectionenabled", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, "IsAttached": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-loadbalancertlscertificate.html#cfn-lightsail-loadbalancertlscertificate-isattached", "PrimitiveType": "Boolean", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Location.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Location.json index 35581a139f962..e1028e9c6afc7 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Location.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Location.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Location::Map.MapConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-location-map-mapconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Logs.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Logs.json index 4559a08730820..26ed48241be21 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Logs.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Logs.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Logs::MetricFilter.MetricTransformation": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutEquipment.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutEquipment.json index 49a57a28e8716..a432e7267a416 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutEquipment.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutEquipment.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::LookoutEquipment::InferenceScheduler": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutMetrics.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutMetrics.json index a97627904cb54..2514e67d37a8d 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutMetrics.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutMetrics.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::LookoutMetrics::Alert.Action": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-alert-action.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutVision.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutVision.json index ca8dcaf749244..0a1a638a415b4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutVision.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutVision.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::LookoutVision::Project": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MSK.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MSK.json index 3e405063fb0ba..d2c3f180cd04c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MSK.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MSK.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::MSK::Cluster.BrokerLogs": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-cluster-brokerlogs.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MWAA.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MWAA.json index e4dc6815b71dd..e76700904ac38 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MWAA.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MWAA.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::MWAA::Environment.LoggingConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Macie.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Macie.json index dda5cf7d6fedf..eeccbbe9bda64 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Macie.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Macie.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Macie::FindingsFilter.Criterion": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-macie-findingsfilter-criterion.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ManagedBlockchain.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ManagedBlockchain.json index ef1f23c456afb..badd69173a6ac 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ManagedBlockchain.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ManagedBlockchain.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ManagedBlockchain::Member.ApprovalThresholdPolicy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-managedblockchain-member-approvalthresholdpolicy.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConnect.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConnect.json index 9583a7b8b256f..a94cc2bd5cabf 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConnect.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConnect.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::MediaConnect::Flow.Encryption": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-flow-encryption.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConvert.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConvert.json index 72ff60c491bb5..488af7329114c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConvert.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConvert.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::MediaConvert::JobTemplate.AccelerationSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconvert-jobtemplate-accelerationsettings.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaLive.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaLive.json index 3a0f5bfe639b0..fbd30e5450bc9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaLive.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaLive.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::MediaLive::Channel.AacSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-aacsettings.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaPackage.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaPackage.json index 07ecdf8da2178..6e68930b3a608 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaPackage.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaPackage.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::MediaPackage::Asset.EgressEndpoint": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-asset-egressendpoint.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaStore.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaStore.json index 38e5e9c2f9fda..273b80f864891 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaStore.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaStore.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::MediaStore::Container.CorsRule": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediastore-container-corsrule.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaTailor.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaTailor.json index 01bc80a29cf7f..decb040090c4c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaTailor.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaTailor.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::MediaTailor::PlaybackConfiguration.AdMarkerPassthrough": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediatailor-playbackconfiguration-admarkerpassthrough.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MemoryDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MemoryDB.json index 895d6be680673..1191072a890a1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MemoryDB.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MemoryDB.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::MemoryDB::Cluster.Endpoint": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-memorydb-cluster-endpoint.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Neptune.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Neptune.json index 11908365248ee..8517b035c538e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Neptune.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Neptune.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Neptune::DBCluster.DBClusterRole": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-neptune-dbcluster-dbclusterrole.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkFirewall.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkFirewall.json index 93e27357cb7e2..a384c2f58fb8f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkFirewall.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkFirewall.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::NetworkFirewall::Firewall.SubnetMapping": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewall-subnetmapping.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkManager.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkManager.json index 0d6b404de56e3..4481081300247 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkManager.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkManager.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::NetworkManager::ConnectAttachment.ConnectAttachmentOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkmanager-connectattachment-connectattachmentoptions.html", @@ -318,7 +318,7 @@ }, "PolicyDocument": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-networkmanager-corenetwork.html#cfn-networkmanager-corenetwork-policydocument", - "PrimitiveType": "String", + "PrimitiveType": "Json", "Required": false, "UpdateType": "Mutable" }, diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NimbleStudio.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NimbleStudio.json index 380ada99ac25a..1f37106f44169 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NimbleStudio.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NimbleStudio.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::NimbleStudio::LaunchProfile.StreamConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-nimblestudio-launchprofile-streamconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchService.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchService.json index acc8663e19d4e..3ce57445ea339 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchService.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchService.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::OpenSearchService::Domain.AdvancedSecurityOptionsInput": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-advancedsecurityoptionsinput.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorks.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorks.json index cc25b418d6825..fe0b888bf4e48 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorks.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorks.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::OpsWorks::App.DataSource": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-app-datasource.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorksCM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorksCM.json index 4a8a0b493e2e9..0fed4a8c948f9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorksCM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorksCM.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::OpsWorksCM::Server.EngineAttribute": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworkscm-server-engineattribute.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Panorama.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Panorama.json index b7008feed60c4..0f80e1314df01 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Panorama.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Panorama.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Panorama::ApplicationInstance.ManifestOverridesPayload": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-panorama-applicationinstance-manifestoverridespayload.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Personalize.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Personalize.json index 956ae18e50884..39a0d85e8149c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Personalize.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Personalize.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Personalize::Dataset.DatasetImportJob": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-personalize-dataset-datasetimportjob.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pinpoint.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pinpoint.json index ce575a33ef214..6b123abeb0a23 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pinpoint.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pinpoint.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Pinpoint::ApplicationSettings.CampaignHook": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-applicationsettings-campaignhook.html", @@ -88,6 +88,17 @@ } } }, + "AWS::Pinpoint::Campaign.CampaignCustomMessage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaigncustommessage.html", + "Properties": { + "Data": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaigncustommessage.html#cfn-pinpoint-campaign-campaigncustommessage-data", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::Pinpoint::Campaign.CampaignEmailMessage": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignemailmessage.html", "Properties": { @@ -222,6 +233,24 @@ } } }, + "AWS::Pinpoint::Campaign.CustomDeliveryConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-customdeliveryconfiguration.html", + "Properties": { + "DeliveryUri": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-customdeliveryconfiguration.html#cfn-pinpoint-campaign-customdeliveryconfiguration-deliveryuri", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "EndpointTypes": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-customdeliveryconfiguration.html#cfn-pinpoint-campaign-customdeliveryconfiguration-endpointtypes", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + } + } + }, "AWS::Pinpoint::Campaign.DefaultButtonConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-defaultbuttonconfiguration.html", "Properties": { @@ -535,6 +564,12 @@ "Type": "Message", "UpdateType": "Mutable" }, + "CustomMessage": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-messageconfiguration.html#cfn-pinpoint-campaign-messageconfiguration-custommessage", + "Required": false, + "Type": "CampaignCustomMessage", + "UpdateType": "Mutable" + }, "DefaultMessage": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-messageconfiguration.html#cfn-pinpoint-campaign-messageconfiguration-defaultmessage", "Required": false, @@ -683,9 +718,61 @@ } } }, + "AWS::Pinpoint::Campaign.Template": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-template.html", + "Properties": { + "Name": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-template.html#cfn-pinpoint-campaign-template-name", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "Version": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-template.html#cfn-pinpoint-campaign-template-version", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, + "AWS::Pinpoint::Campaign.TemplateConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-templateconfiguration.html", + "Properties": { + "EmailTemplate": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-templateconfiguration.html#cfn-pinpoint-campaign-templateconfiguration-emailtemplate", + "Required": false, + "Type": "Template", + "UpdateType": "Mutable" + }, + "PushTemplate": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-templateconfiguration.html#cfn-pinpoint-campaign-templateconfiguration-pushtemplate", + "Required": false, + "Type": "Template", + "UpdateType": "Mutable" + }, + "SMSTemplate": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-templateconfiguration.html#cfn-pinpoint-campaign-templateconfiguration-smstemplate", + "Required": false, + "Type": "Template", + "UpdateType": "Mutable" + }, + "VoiceTemplate": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-templateconfiguration.html#cfn-pinpoint-campaign-templateconfiguration-voicetemplate", + "Required": false, + "Type": "Template", + "UpdateType": "Mutable" + } + } + }, "AWS::Pinpoint::Campaign.WriteTreatmentResource": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-writetreatmentresource.html", "Properties": { + "CustomDeliveryConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-writetreatmentresource.html#cfn-pinpoint-campaign-writetreatmentresource-customdeliveryconfiguration", + "Required": false, + "Type": "CustomDeliveryConfiguration", + "UpdateType": "Mutable" + }, "MessageConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-writetreatmentresource.html#cfn-pinpoint-campaign-writetreatmentresource-messageconfiguration", "Required": false, @@ -704,6 +791,12 @@ "Required": false, "UpdateType": "Mutable" }, + "TemplateConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-writetreatmentresource.html#cfn-pinpoint-campaign-writetreatmentresource-templateconfiguration", + "Required": false, + "Type": "TemplateConfiguration", + "UpdateType": "Mutable" + }, "TreatmentDescription": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-writetreatmentresource.html#cfn-pinpoint-campaign-writetreatmentresource-treatmentdescription", "PrimitiveType": "String", @@ -1667,6 +1760,12 @@ "Type": "CampaignHook", "UpdateType": "Mutable" }, + "CustomDeliveryConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-customdeliveryconfiguration", + "Required": false, + "Type": "CustomDeliveryConfiguration", + "UpdateType": "Mutable" + }, "Description": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-description", "PrimitiveType": "String", @@ -1693,7 +1792,7 @@ }, "MessageConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-messageconfiguration", - "Required": true, + "Required": false, "Type": "MessageConfiguration", "UpdateType": "Mutable" }, @@ -1733,6 +1832,12 @@ "Required": false, "UpdateType": "Mutable" }, + "TemplateConfiguration": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-templateconfiguration", + "Required": false, + "Type": "TemplateConfiguration", + "UpdateType": "Mutable" + }, "TreatmentDescription": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-treatmentdescription", "PrimitiveType": "String", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_PinpointEmail.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_PinpointEmail.json index a7e24e4daac5c..547ea0659160f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_PinpointEmail.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_PinpointEmail.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::PinpointEmail::ConfigurationSet.DeliveryOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpointemail-configurationset-deliveryoptions.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QLDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QLDB.json index dcdcbef1d39c7..e91df3f48651a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QLDB.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QLDB.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::QLDB::Stream.KinesisConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qldb-stream-kinesisconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QuickSight.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QuickSight.json index 2acde43904cac..6babe651c2382 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QuickSight.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QuickSight.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::QuickSight::Analysis.AnalysisError": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-analysiserror.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RAM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RAM.json index acdef465c5203..099de8b64c27c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RAM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RAM.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::RAM::ResourceShare": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RDS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RDS.json index 4ec3afe3df65b..a0c4967b5097c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RDS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RDS.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::RDS::DBCluster.DBClusterRole": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbcluster-dbclusterrole.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RUM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RUM.json index 7d58e97e9d09b..7cfdfa3c11a5a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RUM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RUM.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::RUM::AppMonitor.AppMonitorConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rum-appmonitor-appmonitorconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Redshift.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Redshift.json index 18a5f62f52106..c9feb6fb9636a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Redshift.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Redshift.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Redshift::Cluster.Endpoint": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-redshift-cluster-endpoint.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RefactorSpaces.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RefactorSpaces.json index c838fb2cbf097..d547f8b09287c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RefactorSpaces.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RefactorSpaces.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::RefactorSpaces::Application.ApiGatewayProxyInput": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-application-apigatewayproxyinput.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResilienceHub.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResilienceHub.json index 604076cae83d5..1f4939030948a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResilienceHub.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResilienceHub.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ResilienceHub::App.PhysicalResourceId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-physicalresourceid.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceGroups.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceGroups.json index 2e9442c5127fc..9ac14498c40bb 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceGroups.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceGroups.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ResourceGroups::Group.ConfigurationItem": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resourcegroups-group-configurationitem.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RoboMaker.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RoboMaker.json index a84171d915f15..3cbb81d52a98e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RoboMaker.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RoboMaker.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::RoboMaker::RobotApplication.RobotSoftwareSuite": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-robomaker-robotapplication-robotsoftwaresuite.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53.json index 79de6f7710eb0..48f5a180ab0da 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Route53::HealthCheck.HealthCheckTag": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-healthcheck-healthchecktag.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryControl.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryControl.json index b4dbd3a9b86ff..6db3a05f3a73a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryControl.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryControl.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Route53RecoveryControl::Cluster.ClusterEndpoint": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53recoverycontrol-cluster-clusterendpoint.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryReadiness.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryReadiness.json index d12a43a5abfe9..5bb69c3374f54 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryReadiness.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryReadiness.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Route53RecoveryReadiness::ResourceSet.DNSTargetResource": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53recoveryreadiness-resourceset-dnstargetresource.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53Resolver.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53Resolver.json index 7e05ae7044a4a..c2987b1b7dac0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53Resolver.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53Resolver.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Route53Resolver::FirewallRuleGroup.FirewallRule": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53resolver-firewallrulegroup-firewallrule.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3.json index 420a51ce691f9..211ef26895bbf 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::S3::AccessPoint.PublicAccessBlockConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-accesspoint-publicaccessblockconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3ObjectLambda.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3ObjectLambda.json index 028cb508d9fb0..978dde55495b4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3ObjectLambda.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3ObjectLambda.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::S3ObjectLambda::AccessPoint.ObjectLambdaConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3objectlambda-accesspoint-objectlambdaconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3Outposts.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3Outposts.json index 402c4efa47fa2..058355db4f309 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3Outposts.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3Outposts.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::S3Outposts::AccessPoint.VpcConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-accesspoint-vpcconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SDB.json index 9ed776e0b81c8..8fe36f899e651 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SDB.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SDB.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::SDB::Domain": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SES.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SES.json index b1ccfbaa7a4ab..e7483d2b0e3c1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SES.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SES.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::SES::ConfigurationSetEventDestination.CloudWatchDestination": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-configurationseteventdestination-cloudwatchdestination.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SNS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SNS.json index ea89e95ce890e..01a0c2aa84e8c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SNS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SNS.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::SNS::Topic.Subscription": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-subscription.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SQS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SQS.json index eaa8a47d199d0..189124130a3c3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SQS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SQS.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::SQS::Queue": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSM.json index 3b6f93a146080..2628c922321db 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSM.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::SSM::Association.InstanceAssociationOutputLocation": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-association-instanceassociationoutputlocation.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMContacts.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMContacts.json index 4f04f6d49f218..5e9e53448e635 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMContacts.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMContacts.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::SSMContacts::Contact.ChannelTargetInfo": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmcontacts-contact-channeltargetinfo.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMIncidents.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMIncidents.json index 00ce7394d88c3..a406e3ce4d366 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMIncidents.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMIncidents.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::SSMIncidents::ReplicationSet.RegionConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmincidents-replicationset-regionconfiguration.html", @@ -52,6 +52,34 @@ } } }, + "AWS::SSMIncidents::ResponsePlan.DynamicSsmParameter": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmincidents-responseplan-dynamicssmparameter.html", + "Properties": { + "Key": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmincidents-responseplan-dynamicssmparameter.html#cfn-ssmincidents-responseplan-dynamicssmparameter-key", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmincidents-responseplan-dynamicssmparameter.html#cfn-ssmincidents-responseplan-dynamicssmparameter-value", + "Required": true, + "Type": "DynamicSsmParameterValue", + "UpdateType": "Mutable" + } + } + }, + "AWS::SSMIncidents::ResponsePlan.DynamicSsmParameterValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmincidents-responseplan-dynamicssmparametervalue.html", + "Properties": { + "Variable": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmincidents-responseplan-dynamicssmparametervalue.html#cfn-ssmincidents-responseplan-dynamicssmparametervalue-variable", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + }, "AWS::SSMIncidents::ResponsePlan.IncidentTemplate": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmincidents-responseplan-incidenttemplate.html", "Properties": { @@ -114,6 +142,14 @@ "Required": false, "UpdateType": "Mutable" }, + "DynamicParameters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmincidents-responseplan-ssmautomation.html#cfn-ssmincidents-responseplan-ssmautomation-dynamicparameters", + "DuplicatesAllowed": false, + "ItemType": "DynamicSsmParameter", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "Parameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmincidents-responseplan-ssmautomation.html#cfn-ssmincidents-responseplan-ssmautomation-parameters", "DuplicatesAllowed": false, diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSO.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSO.json index 05365c34b83ee..8c75ea0977a4e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSO.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSO.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::SSO::InstanceAccessControlAttributeConfiguration.AccessControlAttribute": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sso-instanceaccesscontrolattributeconfiguration-accesscontrolattribute.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecretsManager.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecretsManager.json index 42a626ec916fe..87b59469da40a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecretsManager.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecretsManager.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::SecretsManager::RotationSchedule.HostedRotationLambda": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-secretsmanager-rotationschedule-hostedrotationlambda.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecurityHub.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecurityHub.json index 727eccd194f52..1d0053cffd1bc 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecurityHub.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecurityHub.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::SecurityHub::Hub": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalog.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalog.json index 8d6cdbcb1bc9f..e6abffa5ffa65 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalog.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalog.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ServiceCatalog::CloudFormationProduct.ProvisioningArtifactProperties": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicecatalog-cloudformationproduct-provisioningartifactproperties.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalogAppRegistry.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalogAppRegistry.json index f2a7757a96491..ecb03c7db4642 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalogAppRegistry.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalogAppRegistry.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::ServiceCatalogAppRegistry::Application": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceDiscovery.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceDiscovery.json index 7c8410550ab9c..89e97c5cf5ecc 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceDiscovery.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceDiscovery.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::ServiceDiscovery::PrivateDnsNamespace.PrivateDnsPropertiesMutable": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-privatednsnamespace-privatednspropertiesmutable.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Signer.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Signer.json index 5186a96ade54b..d0fe24773a8d5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Signer.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Signer.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Signer::SigningProfile.SignatureValidityPeriod": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-signer-signingprofile-signaturevalidityperiod.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_StepFunctions.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_StepFunctions.json index 35f1148845403..3ba25fb8aba43 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_StepFunctions.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_StepFunctions.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::StepFunctions::Activity.TagsEntry": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-activity-tagsentry.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Synthetics.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Synthetics.json index f73b2e0212535..1f374462d5160 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Synthetics.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Synthetics.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Synthetics::Canary.ArtifactConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-synthetics-canary-artifactconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Timestream.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Timestream.json index 99581cadc26e5..dd16af7afcbea 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Timestream.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Timestream.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Timestream::ScheduledQuery.DimensionMapping": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-dimensionmapping.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Transfer.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Transfer.json index d104b80b4f581..c4aae8944d168 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Transfer.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Transfer.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Transfer::Server.EndpointDetails": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-endpointdetails.html", @@ -83,6 +83,12 @@ "Required": false, "UpdateType": "Mutable" }, + "SetStatOption": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-protocoldetails.html#cfn-transfer-server-protocoldetails-setstatoption", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "TlsSessionResumptionMode": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-protocoldetails.html#cfn-transfer-server-protocoldetails-tlssessionresumptionmode", "PrimitiveType": "String", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_VoiceID.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_VoiceID.json index 17596e50ed0e2..dfa4bba69e883 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_VoiceID.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_VoiceID.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::VoiceID::Domain.ServerSideEncryptionConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-voiceid-domain-serversideencryptionconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAF.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAF.json index e34985fed8b8c..67111ea2b7ed5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAF.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAF.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::WAF::ByteMatchSet.ByteMatchTuple": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waf-bytematchset-bytematchtuples.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFRegional.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFRegional.json index 706d3752bfd14..2b0052241e641 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFRegional.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFRegional.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::WAFRegional::ByteMatchSet.ByteMatchTuple": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-bytematchset-bytematchtuple.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFv2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFv2.json index bf6c661b58831..4b43988f52693 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFv2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFv2.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::WAFv2::LoggingConfiguration.FieldToMatch": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-fieldtomatch.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Wisdom.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Wisdom.json index 6fca0fde8314b..13f38f6fc1e7c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Wisdom.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Wisdom.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::Wisdom::Assistant.ServerSideEncryptionConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wisdom-assistant-serversideencryptionconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WorkSpaces.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WorkSpaces.json index 0afa8b7299dd4..ea0b9dcd77d57 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WorkSpaces.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WorkSpaces.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::WorkSpaces::ConnectionAlias.ConnectionAliasAssociation": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspaces-connectionalias-connectionaliasassociation.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_XRay.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_XRay.json index 3f1dfd3225b82..72abe06d5fac9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_XRay.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_XRay.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "AWS::XRay::Group.InsightsConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-group-insightsconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Alexa_ASK.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Alexa_ASK.json index 3dd6839790b0f..6352c62fb342c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Alexa_ASK.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Alexa_ASK.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "Alexa::ASK::Skill.AuthenticationConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ask-skill-authenticationconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Tag.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Tag.json index d4f7b4a850527..224ef7d9522c2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Tag.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Tag.json @@ -1,5 +1,5 @@ { - "$version": "72.0.0", + "$version": "73.1.0", "PropertyTypes": { "Tag": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/001_Version.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/001_Version.json index 777005626fe95..a8420359296c3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/001_Version.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/001_Version.json @@ -1,3 +1,3 @@ { - "ResourceSpecificationVersion": "72.0.0" + "ResourceSpecificationVersion": "73.1.0" } diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/500_Cognito_UserPool_UsernameConfiguration_patch.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/500_Cognito_UserPool_UsernameConfiguration_patch.json new file mode 100644 index 0000000000000..2e921a70e94cf --- /dev/null +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/500_Cognito_UserPool_UsernameConfiguration_patch.json @@ -0,0 +1,16 @@ +{ + "PropertyTypes": { + "AWS::Cognito::UserPool.UsernameConfiguration": { + "patch": { + "description": "make UserPool.UsernameConfiguration.CaseSensitive optional", + "operations": [ + { + "op": "replace", + "path": "/Properties/CaseSensitive/Required", + "value": false + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/100_sam/000_official/spec.json b/packages/@aws-cdk/cfnspec/spec-source/specification/100_sam/000_official/spec.json index 0c8307f05357a..e6ad5e727ea82 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/100_sam/000_official/spec.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/100_sam/000_official/spec.json @@ -60,6 +60,12 @@ "AWS::Serverless::Api.Auth": { "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api-auth-object", "Properties": { + "AddDefaultAuthorizerToCorsPreflight": { + "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api-auth-object", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Immutable" + }, "Authorizers": { "Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api-auth-object", "PrimitiveType": "Json", diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index d4955a1821f85..4cd38b11b8b56 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -145,6 +145,7 @@ "@aws-cdk/aws-elasticsearch": "0.0.0", "@aws-cdk/aws-emr": "0.0.0", "@aws-cdk/aws-emrcontainers": "0.0.0", + "@aws-cdk/aws-emrserverless": "0.0.0", "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-eventschemas": "0.0.0", "@aws-cdk/aws-evidently": "0.0.0", @@ -339,6 +340,7 @@ "@aws-cdk/aws-elasticsearch": "0.0.0", "@aws-cdk/aws-emr": "0.0.0", "@aws-cdk/aws-emrcontainers": "0.0.0", + "@aws-cdk/aws-emrserverless": "0.0.0", "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-eventschemas": "0.0.0", "@aws-cdk/aws-evidently": "0.0.0", diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 7bfb5f121c69e..53d0a4d8b2d3d 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -205,6 +205,7 @@ "@aws-cdk/aws-elasticsearch": "0.0.0", "@aws-cdk/aws-emr": "0.0.0", "@aws-cdk/aws-emrcontainers": "0.0.0", + "@aws-cdk/aws-emrserverless": "0.0.0", "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-events-targets": "0.0.0", "@aws-cdk/aws-eventschemas": "0.0.0", diff --git a/packages/monocdk/package.json b/packages/monocdk/package.json index 991270ada859b..334954bf61ba4 100644 --- a/packages/monocdk/package.json +++ b/packages/monocdk/package.json @@ -202,6 +202,7 @@ "@aws-cdk/aws-elasticsearch": "0.0.0", "@aws-cdk/aws-emr": "0.0.0", "@aws-cdk/aws-emrcontainers": "0.0.0", + "@aws-cdk/aws-emrserverless": "0.0.0", "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-events-targets": "0.0.0", "@aws-cdk/aws-eventschemas": "0.0.0", From 9465789ba05d573b06f43ce2e643ad0ea9663a09 Mon Sep 17 00:00:00 2001 From: AWS CDK Team Date: Thu, 2 Jun 2022 22:18:47 +0000 Subject: [PATCH 23/23] chore(release): 1.159.0 --- CHANGELOG.md | 31 +++++++++++++++++++++++++++++++ version.v1.json | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1e96f8f71317..e366d4ad1f45c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,37 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.159.0](https://github.com/aws/aws-cdk/compare/v1.158.0...v1.159.0) (2022-06-02) + + +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES + +* **core:** so this PR attempts to smooth a rough edge by "locking" +the `logicalId` when `exportValue` is called. If the user attempts to +override the id _after_ that point, an error message will be thrown + +### Features + +* **cfnspec:** cloudformation spec v73.1.0 ([#20587](https://github.com/aws/aws-cdk/issues/20587)) ([419fdae](https://github.com/aws/aws-cdk/commit/419fdaec2770de1d21c0340f294ad72155d991ce)) +* **cognito:** OpenID Connect identity provider ([#20241](https://github.com/aws/aws-cdk/issues/20241)) ([33acc7c](https://github.com/aws/aws-cdk/commit/33acc7cc03c4a6700c05e840393ef90e5d8f68dc)) +* **integ-runner:** publish integ-runner cli ([#20477](https://github.com/aws/aws-cdk/issues/20477)) ([7779531](https://github.com/aws/aws-cdk/commit/777953106ac550b058fdaa3ccde25b62be07defa)) +* **lambda:** add insights version 1.0.135.0 ([#19588](https://github.com/aws/aws-cdk/issues/19588)) ([68761dc](https://github.com/aws/aws-cdk/commit/68761dc3ceadbe77e241fb85544e48544149568a)), closes [/docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-extension-versionsx86-64.html#Lambda-Insights-extension-1](https://github.com/aws//docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-extension-versionsx86-64.html/issues/Lambda-Insights-extension-1) [/docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-extension-versionsARM.html#Lambda-Insights-extension-ARM-1](https://github.com/aws//docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-extension-versionsARM.html/issues/Lambda-Insights-extension-ARM-1) +* **s3:** adds objectSizeLessThan property for s3 lifecycle rule ([#20429](https://github.com/aws/aws-cdk/issues/20429)) ([2bf30df](https://github.com/aws/aws-cdk/commit/2bf30df223cc5bb43c2fcfaaf32669a8438ad19a)), closes [#20425](https://github.com/aws/aws-cdk/issues/20425) [#20372](https://github.com/aws/aws-cdk/issues/20372) + + +### Bug Fixes + +* **core:** logicalId is consumed prior to being overridden ([#20560](https://github.com/aws/aws-cdk/issues/20560)) ([e44c2c4](https://github.com/aws/aws-cdk/commit/e44c2c436d41a9993714d7e9ff5a9ed95b5677f1)), closes [#14335](https://github.com/aws/aws-cdk/issues/14335) +* **ecr-assets:** cannot build ARM images using modern stack synthesis ([#20563](https://github.com/aws/aws-cdk/issues/20563)) ([9a23575](https://github.com/aws/aws-cdk/commit/9a23575f4590a170caf79f4141c16adf431e7c40)), closes [#20439](https://github.com/aws/aws-cdk/issues/20439) +* **ecs:** canContainersAccessInstanceRole is ignored when passed in AsgCapacityProvider constructor ([#20522](https://github.com/aws/aws-cdk/issues/20522)) ([dacefd6](https://github.com/aws/aws-cdk/commit/dacefd6c4770f06390f853fdf4703d8662beb3f5)), closes [#20293](https://github.com/aws/aws-cdk/issues/20293) [#20293](https://github.com/aws/aws-cdk/issues/20293) +* **ecs:** fix typo from fromServiceAtrributes to fromServiceAttributes ([#20456](https://github.com/aws/aws-cdk/issues/20456)) ([f4439ce](https://github.com/aws/aws-cdk/commit/f4439ceda079dd762ec30c6f4a893d6bcd7ed100)), closes [#20458](https://github.com/aws/aws-cdk/issues/20458) +* **events-targets:** EventBus IAM statements are only added for the first target ([#20479](https://github.com/aws/aws-cdk/issues/20479)) ([74318c7](https://github.com/aws/aws-cdk/commit/74318c7d22bfc00de9e005f68a0a6aaa58c7db39)), closes [#19407](https://github.com/aws/aws-cdk/issues/19407) +* **iam:** referencing the same immutable role twice makes it mutable ([#20497](https://github.com/aws/aws-cdk/issues/20497)) ([264c02e](https://github.com/aws/aws-cdk/commit/264c02e6014552cd73f38acef0df2205811d6c86)), closes [#7255](https://github.com/aws/aws-cdk/issues/7255) +* **integ-runner:** catch snapshot errors, treat `--from-file` as command-line ([#20523](https://github.com/aws/aws-cdk/issues/20523)) ([cedfde8](https://github.com/aws/aws-cdk/commit/cedfde8cb07eb879ee384bda93bba813ede91699)) +* **integ-runner:** don't throw error if tests pass ([#20511](https://github.com/aws/aws-cdk/issues/20511)) ([c274c2f](https://github.com/aws/aws-cdk/commit/c274c2f983de2dfd20ed2886a3c50f7fd3f6b3f4)), closes [#20384](https://github.com/aws/aws-cdk/issues/20384) +* **lambda:** function version ignores layer version changes ([#20150](https://github.com/aws/aws-cdk/issues/20150)) ([f19ecef](https://github.com/aws/aws-cdk/commit/f19ecefcdde712dfd951106bec3b1f850b66f2a8)), closes [#19098](https://github.com/aws/aws-cdk/issues/19098) +* Default username in RoleSessionName ([#20188](https://github.com/aws/aws-cdk/issues/20188)) ([b7bc10c](https://github.com/aws/aws-cdk/commit/b7bc10cc7a734fe3b4a9194dffbc017f2fe3ef43)), closes [#19401](https://github.com/aws/aws-cdk/issues/19401) [#7937](https://github.com/aws/aws-cdk/issues/7937) [#19401](https://github.com/aws/aws-cdk/issues/19401) + ## [1.158.0](https://github.com/aws/aws-cdk/compare/v1.157.0...v1.158.0) (2022-05-27) diff --git a/version.v1.json b/version.v1.json index aeca1be32b0b5..49cbd4aa4fe3c 100644 --- a/version.v1.json +++ b/version.v1.json @@ -1,3 +1,3 @@ { - "version": "1.158.0" + "version": "1.159.0" } \ No newline at end of file