aws-cdk 2.1101.0 → 2.1103.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/THIRD_PARTY_LICENSES +211 -342
- package/build-info.json +2 -2
- package/lib/cli/cdk-toolkit.js +18 -2
- package/lib/cli/cli-config.js +2 -1
- package/lib/cli/cli-type-registry.json +4 -0
- package/lib/cli/cli.js +13 -5
- package/lib/cli/convert-to-user-input.js +3 -1
- package/lib/cli/parse-command-line-arguments.js +6 -1
- package/lib/cli/user-input.d.ts +6 -0
- package/lib/cli/user-input.js +1 -1
- package/lib/commands/flags/operations.js +1 -1
- package/lib/commands/migrate.d.ts +1 -1
- package/lib/commands/migrate.js +4 -4
- package/lib/cxapp/cloud-assembly.d.ts +1 -1
- package/lib/cxapp/cloud-assembly.js +1 -1
- package/lib/cxapp/cloud-executable.d.ts +1 -1
- package/lib/cxapp/cloud-executable.js +1 -1
- package/lib/cxapp/environments.d.ts +1 -1
- package/lib/cxapp/environments.js +1 -1
- package/lib/cxapp/exec.d.ts +3 -3
- package/lib/cxapp/exec.js +12 -4
- package/lib/index.js +37752 -34224
- package/lib/init-templates/.init-version.json +1 -1
- package/lib/init-templates/app/python/README.template.md +1 -1
- package/package.json +10 -11
package/README.md
CHANGED
|
@@ -517,6 +517,49 @@ Hotswapping is currently supported for the following changes
|
|
|
517
517
|
- Source and Environment changes of AWS CodeBuild Projects.
|
|
518
518
|
- VTL mapping template changes for AppSync Resolvers and Functions.
|
|
519
519
|
- Schema changes for AppSync GraphQL Apis.
|
|
520
|
+
- Code files (S3-based) and container image (ECR-based) changes, along with environment variable
|
|
521
|
+
and description changes of Amazon Bedrock AgentCore Runtimes.
|
|
522
|
+
- **Note**: For S3-based code changes to be detected, use `Asset` from `aws-cdk-lib/aws-s3-assets`:
|
|
523
|
+
|
|
524
|
+
```typescript
|
|
525
|
+
// ✅ Recommended (hotswap works)
|
|
526
|
+
const asset = new aws_s3_assets.Asset(this, 'CodeAsset', {
|
|
527
|
+
path: path.join(__dirname, 'agent-code'),
|
|
528
|
+
});
|
|
529
|
+
|
|
530
|
+
const agentRuntimeArtifact = AgentRuntimeArtifact.fromS3(
|
|
531
|
+
{
|
|
532
|
+
bucketName: asset.s3BucketName,
|
|
533
|
+
objectKey: asset.s3ObjectKey, // Content hash, changes when code changes
|
|
534
|
+
},
|
|
535
|
+
AgentCoreRuntime.PYTHON_3_13,
|
|
536
|
+
['app.py'],
|
|
537
|
+
);
|
|
538
|
+
new Runtime(this, 'Runtime', {
|
|
539
|
+
runtimeName: 'runtime',
|
|
540
|
+
agentRuntimeArtifact,
|
|
541
|
+
});
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
- Do not use `Source.asset()` with `BucketDeployment`, as the generated object key is a token resolved at deployment time and does not change in the CloudFormation template (hotswap will not work):
|
|
545
|
+
|
|
546
|
+
```typescript
|
|
547
|
+
// ❌ Not recommended (hotswap doesn't work)
|
|
548
|
+
const deployment = new aws_s3_deployment.BucketDeployment(this, 'Deploy', {
|
|
549
|
+
sources: [aws_s3_deployment.Source.asset(path.join(__dirname, 'agent-code'))],
|
|
550
|
+
destinationBucket: bucket,
|
|
551
|
+
extract: false,
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
const agentRuntimeArtifact = AgentRuntimeArtifact.fromS3(
|
|
555
|
+
{
|
|
556
|
+
bucketName: bucket.bucketName,
|
|
557
|
+
objectKey: cdk.Fn.select(0, deployment.objectKeys), // Token, resolved at deployment time
|
|
558
|
+
},
|
|
559
|
+
AgentCoreRuntime.PYTHON_3_13,
|
|
560
|
+
['app.py'],
|
|
561
|
+
);
|
|
562
|
+
```
|
|
520
563
|
|
|
521
564
|
You can optionally configure the behavior of your hotswap deployments. Currently you can only configure ECS hotswap behavior:
|
|
522
565
|
|