(cdk): can't use hotswap when Custom::AWS is present in template

オープン
#1,456 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
aws, typescript

調査の方向性

報告された再現手順を使って、CloudFormation テンプレートを解決する --hotswap デプロイパスから始めます。AwsCustomResource とコードが変更される Lambda 関数を含む stack を使用します。Custom::AWS が存在するものの変更されていない場合の動作を確認し、issue の想定される結果を考慮します。hotswap チェックを回避できるようにするか、安全に続行できるようにすることです。

索引モデルが issue の本文から書いたものです。

説明

effort/medium feature-request p2
Describe the bug

Could not perform a hotswap deployment, because the CloudFormation template could not be resolved: We don't support attributes of the 'Custom::AWS' resource. This is a CDK limitation. Please report it at https://github.com/aws/aws-cdk/issues/new/choose.

The template i have does contain a Custom::AWS resource but cdk diff does not detect any changes to it.

[~] AWS::CloudFormation::Stack a.NestedStack/a.NestedStackResource aNaNREEA7D805
 └─ [~] TemplateURL
     └─ [~] .Fn::Join:
         └─ @@ -5,6 +5,6 @@
            [ ]     {
            [ ]       "Ref": "AWS::URLSuffix"
            [ ]     },
            [-]     "/cdk-hnb659fds-assets-<account>-<region>/<hash>.json"
            [+]     "/cdk-hnb659fds-assets-<account>-<region>/<hash>.json"
            [ ]   ]
            [ ] ]

Stack stack-bNbNRE1B71636-1XZCJ7DPIISJG
There were no differences
Stack stack-aNaNREEA7D805-VZ5MPHGEVZF3
Resources
[~] AWS::Lambda::Function a/fn fn588520B7
 ├─ [~] Code
 │   └─ [~] .S3Key:
 │       ├─ [-]<hash>.zip
 │       └─ [+] <hash>.zip
 └─ [~] Metadata
     └─ [~] .aws:asset:path:
         ├─ [-] asset.<hash>
         └─ [+] asset.<hash>
Regression Issue
  • Select this option if this issue appears to be a regression.
Last Known Working CDK Library Version

No response

Expected Behavior

If possible it should be possible for this check to be bypassed.

Current Behavior

Could not perform a hotswap deployment, because the CloudFormation template could not be resolved: We don't support attributes of the 'Custom::AWS' resource. This is a CDK limitation. Please report it at https://github.com/aws/aws-cdk/issues/new/choose.

Reproduction Steps

Create a simple stack with an AwsCustomResource and a lambda function. Update code in lambda function and attempt to deploy with --hotswap.

Possible Solution

No response

Additional Information/Context

No response

AWS CDK Library version (aws-cdk-lib)

2.218.0

AWS CDK CLI version

2.1031.0 (build 3d7b09b)

Node.js Version

v22.18.0

OS

MacOS 26

Language

TypeScript

Language Version

No response

Other information

No response

主要言語
TypeScript
スター
110
フォーク
138
平均マージ
1日 9時間
マージ済み PR(30日)
55

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws/aws-cdk-cli のほかの issue

aws/aws-cdk-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。