Skip to content

Commit

Permalink
Merge branch 'main' into TheRealAmazonKendra/bedrock
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Apr 20, 2024
2 parents e4c308b + 8bb8c55 commit 9ca153c
Show file tree
Hide file tree
Showing 409 changed files with 120,581 additions and 81,431 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

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.

## [2.138.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.137.0-alpha.0...v2.138.0-alpha.0) (2024-04-18)


### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

* **cognito-identitypool-alpha:** The argument of `IdentityPoolProviderUrl.userPool()` has been changed from `url: string` to `userPool: UserPool, userPoolClient: UserPoolClient`. If you want to specify custom identifier string, use `IdentityPoolProviderUrl.custom()` instead.

### Bug Fixes

* **cognito-identitypool-alpha:** inconvenient IdentityPoolProviderUrl.userPool() ([#29025](https://github.com/aws/aws-cdk/issues/29025)) ([90a7734](https://github.com/aws/aws-cdk/commit/90a773407753b4ff868dede4442bf20243dfeaec))

## [2.137.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.136.1-alpha.0...v2.137.0-alpha.0) (2024-04-10)


Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

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.

## [2.138.0](https://github.com/aws/aws-cdk/compare/v2.137.0...v2.138.0) (2024-04-18)


### Features

* **AppSync:** addRdsDataSource support for DatabaseCluster ([#29544](https://github.com/aws/aws-cdk/issues/29544)) ([1894f2d](https://github.com/aws/aws-cdk/commit/1894f2db54eed7d65c9f54cb07cee6dd84200ad7)), closes [#29302](https://github.com/aws/aws-cdk/issues/29302)
* **cognito:** support provider details for `UserPoolIdentityProviderSaml` ([#29588](https://github.com/aws/aws-cdk/issues/29588)) ([375f1a6](https://github.com/aws/aws-cdk/commit/375f1a6c0bd5952091b1bb4634faaabcb4ca126e)), closes [#29494](https://github.com/aws/aws-cdk/issues/29494) [#29598](https://github.com/aws/aws-cdk/issues/29598)
* **custom-resources:** add logging property to `AwsSdkCall` and create `Logging` class ([#29648](https://github.com/aws/aws-cdk/issues/29648)) ([b049064](https://github.com/aws/aws-cdk/commit/b0490640a25eb1946aa9db748cf85867e841f243))
* **ec2:** well-known port aliases ([#29793](https://github.com/aws/aws-cdk/issues/29793)) ([f10494c](https://github.com/aws/aws-cdk/commit/f10494cab79c033d7913a435b0e2db12fe59698d))
* **elasticloadbalancingv2:** add removeSuffix param for ExternalApplicationListener.addAction() ([#29746](https://github.com/aws/aws-cdk/issues/29746)) ([f4af330](https://github.com/aws/aws-cdk/commit/f4af33018e374ea97346e8ec70776feb46f6ab7b)), closes [#29496](https://github.com/aws/aws-cdk/issues/29496)
* **route53:** `DNSSEC` zone signing ([#28604](https://github.com/aws/aws-cdk/issues/28604)) ([213fffc](https://github.com/aws/aws-cdk/commit/213fffc84f2206f064ae5143b8dc6eff9d21b50d))
* **sns:** add TracingConfig prop ([#29783](https://github.com/aws/aws-cdk/issues/29783)) ([f14b60f](https://github.com/aws/aws-cdk/commit/f14b60fc990cb98d1d2b0e48f9a89492bddf868c)), closes [#29714](https://github.com/aws/aws-cdk/issues/29714)
* **stepfunctions-tasks:** add httpinvoke step functions task ([#28673](https://github.com/aws/aws-cdk/issues/28673)) ([178e481](https://github.com/aws/aws-cdk/commit/178e48189524c608decd631c5e76e95a34fe5122)), closes [#28278](https://github.com/aws/aws-cdk/issues/28278)
* update L1 CloudFormation resource definitions ([#29798](https://github.com/aws/aws-cdk/issues/29798)) ([7103fed](https://github.com/aws/aws-cdk/commit/7103fed9bc03062e464d907818afcf32c27ba6b2)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html#aws-resource-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html/issues/aws-resource-ec2) [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html#aws-resource-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html/issues/aws-resource-ec2) [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html/issues/cfn-ec2) [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html/issues/cfn-ec2)


### Bug Fixes

* **ecs-patterns:** integ test failed with certificate error ([#29623](https://github.com/aws/aws-cdk/issues/29623)) ([5347369](https://github.com/aws/aws-cdk/commit/5347369fa11f4f11ab3893b9ac4c8467c5d514c3)), closes [/github.com/aws/aws-cdk/pull/29186#issuecomment-1959231406](https://github.com/aws//github.com/aws/aws-cdk/pull/29186/issues/issuecomment-1959231406) [/github.com/aws/aws-cdk/pull/29186#issuecomment-1959231406](https://github.com/aws//github.com/aws/aws-cdk/pull/29186/issues/issuecomment-1959231406)
* **eks:** add support of Helm charts located in ECR of AWS CN region ([#29778](https://github.com/aws/aws-cdk/issues/29778)) ([0da25e5](https://github.com/aws/aws-cdk/commit/0da25e5da491b0778eed0444cbb05455bd562b42)), closes [#28460](https://github.com/aws/aws-cdk/issues/28460)
* **globalaccelerator:** changing `installLatestAwsSdk` breaks Security Group reference ([#29620](https://github.com/aws/aws-cdk/issues/29620)) ([ece7eb6](https://github.com/aws/aws-cdk/commit/ece7eb671e588aff6e9d0f2ee4b53933cb9589a5)), closes [#23796](https://github.com/aws/aws-cdk/issues/23796) [/github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-globalaccelerator/lib/_accelerator-security-group.ts#L32](https://github.com/aws//github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-globalaccelerator/lib/_accelerator-security-group.ts/issues/L32)
* **lambda:** version.fromVersionArn creates invalid Version object ([#29820](https://github.com/aws/aws-cdk/issues/29820)) ([8198884](https://github.com/aws/aws-cdk/commit/819888470248fed2ddbdac689f14254688eef88f))
* **spec2cdk:** get tag gives null result in Java CDK ([#29870](https://github.com/aws/aws-cdk/issues/29870)) ([5a918d1](https://github.com/aws/aws-cdk/commit/5a918d12ec0455626b5630b35aa47e6d9da6df7c))
* **stepfunctions:** the catch field in CustomState is not rendered ([#29654](https://github.com/aws/aws-cdk/issues/29654)) ([77e9fc6](https://github.com/aws/aws-cdk/commit/77e9fc6bd2066862312355801f7f04c5a5f02d6a))

## [2.137.0](https://github.com/aws/aws-cdk/compare/v2.136.1...v2.137.0) (2024-04-10)


Expand Down
42 changes: 42 additions & 0 deletions packages/@aws-cdk-testing/cli-integ/lib/eventually.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* @param maxAttempts the maximum number of attempts
* @param interval interval in milliseconds to observe between attempts
*/
export type EventuallyOptions = {
maxAttempts?: number;
interval?: number;
};

const wait = (ms: number): Promise<void> => new Promise((resolve) => setTimeout(resolve, ms));
const DEFAULT_INTERVAL = 1000;
const DEFAULT_MAX_ATTEMPTS = 10;

/**
* Runs a function on an interval until the maximum number of attempts has
* been reached.
*
* Default interval = 1000 milliseconds
* Default maxAttempts = 10
*
* @param fn function to run
* @param options EventuallyOptions
*/
const eventually = async <T>(call: () => Promise<T>, options?: EventuallyOptions): Promise<T> => {
const opts = {
interval: options?.interval ? options.interval : DEFAULT_INTERVAL,
maxAttempts: options?.maxAttempts ? options.maxAttempts : DEFAULT_MAX_ATTEMPTS,
};

while (opts.maxAttempts-- >= 0) {
try {
return await call();
} catch (err) {
if (opts.maxAttempts <= 0) throw err;
}
await wait(opts.interval);
}

throw new Error('An unexpected error has occurred.');
};

export default eventually;
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as fs from 'fs';
import * as path from 'path';
import * as yaml from 'yaml';
import { integTest, randomString, withoutBootstrap } from '../../lib';
import eventually from '../../lib/eventually';

jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime

Expand Down Expand Up @@ -283,17 +284,25 @@ integTest('can remove customPermissionsBoundary', withoutBootstrap(async (fixtur
}),
});
policyArn = policy.Policy?.Arn;
await fixture.cdkBootstrapModern({
// toolkitStackName doesn't matter for this particular invocation
toolkitStackName: bootstrapStackName,
customPermissionsBoundary: policyName,
});

const response = await fixture.aws.cloudFormation('describeStacks', { StackName: bootstrapStackName });
expect(
response.Stacks?.[0].Parameters?.some(
param => (param.ParameterKey === 'InputPermissionsBoundary' && param.ParameterValue === policyName),
)).toEqual(true);
// Policy creation and consistency across regions is "almost immediate"
// See: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
// We will put this in an `eventually` block to retry stack creation with a reasonable timeout
const createStackWithPermissionBoundary = async (): Promise<void> => {
await fixture.cdkBootstrapModern({
// toolkitStackName doesn't matter for this particular invocation
toolkitStackName: bootstrapStackName,
customPermissionsBoundary: policyName,
});

const response = await fixture.aws.cloudFormation('describeStacks', { StackName: bootstrapStackName });
expect(
response.Stacks?.[0].Parameters?.some(
param => (param.ParameterKey === 'InputPermissionsBoundary' && param.ParameterValue === policyName),
)).toEqual(true);
};

await eventually(createStackWithPermissionBoundary, { maxAttempts: 3 });

await fixture.cdkBootstrapModern({
// toolkitStackName doesn't matter for this particular invocation
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
{
"Resources": {
"MyApplicationForEnv1F597ED9": {
"Type": "AWS::AppConfig::Application",
"Properties": {
"Name": "awsappconfigmulticonfigenv-MyApplicationForEnv-1EE3EA95"
}
},
"MultiConfigEnvironment5F41B747": {
"Type": "AWS::AppConfig::Environment",
"Properties": {
"ApplicationId": {
"Ref": "MyApplicationForEnv1F597ED9"
},
"Name": "awsappconfigmulticonfigenv-MultiConfigEnvironment-59525230"
}
},
"QuickDeploymentStrategy980252EC": {
"Type": "AWS::AppConfig::DeploymentStrategy",
"Properties": {
"DeploymentDurationInMinutes": 1,
"GrowthFactor": 50,
"GrowthType": "LINEAR",
"Name": "awsappconfigmulticonfigenv-QuickDeploymentStrategy-CAB72574",
"ReplicateTo": "NONE"
}
},
"MyFirstConfigConfigurationProfileAB11F87A": {
"Type": "AWS::AppConfig::ConfigurationProfile",
"Properties": {
"ApplicationId": {
"Ref": "MyApplicationForEnv1F597ED9"
},
"LocationUri": "hosted",
"Name": "awsappconfigmulticonfigenv-MyFirstConfig-2FF7CAAB"
}
},
"MyFirstConfig117AFBAC": {
"Type": "AWS::AppConfig::HostedConfigurationVersion",
"Properties": {
"ApplicationId": {
"Ref": "MyApplicationForEnv1F597ED9"
},
"ConfigurationProfileId": {
"Ref": "MyFirstConfigConfigurationProfileAB11F87A"
},
"Content": "first config content",
"ContentType": "application/octet-stream"
},
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
},
"MyFirstConfigDeployment5AEBAD52B8EE4": {
"Type": "AWS::AppConfig::Deployment",
"Properties": {
"ApplicationId": {
"Ref": "MyApplicationForEnv1F597ED9"
},
"ConfigurationProfileId": {
"Ref": "MyFirstConfigConfigurationProfileAB11F87A"
},
"ConfigurationVersion": {
"Ref": "MyFirstConfig117AFBAC"
},
"DeploymentStrategyId": {
"Ref": "QuickDeploymentStrategy980252EC"
},
"EnvironmentId": {
"Ref": "MultiConfigEnvironment5F41B747"
}
}
},
"MySecondConfigConfigurationProfileD0CC1BAA": {
"Type": "AWS::AppConfig::ConfigurationProfile",
"Properties": {
"ApplicationId": {
"Ref": "MyApplicationForEnv1F597ED9"
},
"LocationUri": "hosted",
"Name": "awsappconfigmulticonfigenv-MySecondConfig-4F837809"
}
},
"MySecondConfig28DEBAC4": {
"Type": "AWS::AppConfig::HostedConfigurationVersion",
"Properties": {
"ApplicationId": {
"Ref": "MyApplicationForEnv1F597ED9"
},
"ConfigurationProfileId": {
"Ref": "MySecondConfigConfigurationProfileD0CC1BAA"
},
"Content": "second config content",
"ContentType": "application/octet-stream"
},
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
},
"MySecondConfigDeployment5AEBAD1470BE4": {
"Type": "AWS::AppConfig::Deployment",
"Properties": {
"ApplicationId": {
"Ref": "MyApplicationForEnv1F597ED9"
},
"ConfigurationProfileId": {
"Ref": "MySecondConfigConfigurationProfileD0CC1BAA"
},
"ConfigurationVersion": {
"Ref": "MySecondConfig28DEBAC4"
},
"DeploymentStrategyId": {
"Ref": "QuickDeploymentStrategy980252EC"
},
"EnvironmentId": {
"Ref": "MultiConfigEnvironment5F41B747"
}
},
"DependsOn": [
"MyFirstConfigDeployment5AEBAD52B8EE4"
]
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9ca153c

Please sign in to comment.