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

Aperta
#1,456 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
aws, typescript

Direzione di ricerca

Inizia con il percorso di deployment --hotswap che risolve il template CloudFormation, utilizzando la riproduzione segnalata: uno stack con AwsCustomResource e una funzione Lambda il cui codice cambia. Verifica il comportamento quando Custom::AWS è presente ma invariato, e considera il risultato atteso dell’issue: consentire di ignorare il controllo hotswap o di procedere in sicurezza.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
110
Fork
138
Merge medio
1g 9h
PR unite (30g)
55

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di aws/aws-cdk-cli

Tutte le issue di aws/aws-cdk-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.