241 文字
1 分
Q. aws-cdkがCloud assembly schema version mismatchエラーを吐く
状況
次のようなエラーが CI 上で発生していた。
$ cdk deploy
cli: import fails with with 'S3 error: Access Denied'
Overview: When using cdk import, the command tries to read a template that doesn't exist from the assets bucket.
Affected versions: cli: >=2.161.0 <=2.162.0
More information at: https://github.com/aws/aws-cdk/issues/31716
If you don’t want to see a notice anymore, use "cdk acknowledge <id>". For example, "cdk acknowledge 31716".This CDK CLI is not compatible with the CDK library used by your application. Please upgrade the CLI to the latest version.(Cloud assembly schema version mismatch: Maximum schema version supported is 38.x.x, but found 39.0.0)
調査
上部に出力されている「cli: import fails with with ‘S3 error: Access Denied’」が主原因のように見えるが、落ちたコミットを見るとaws-cdk-cli
のバージョンを上げるものであった。
改めて出力を見ると、最下部に「Cloud assembly schema version mismatch: Maximum schema version supported is 38.x.x, but found 39.0.0」とあり、aws-cdk
とaws-cdk-cli
のバージョンが一致していないことが原因であると推測される。
対応
aws-cdk
のバージョンも上げることで問題は解消した。
Q. aws-cdkがCloud assembly schema version mismatchエラーを吐く
https://blog.ohirunewani.com/posts/aws-cdk-cloud-assembly-schema-version-mismatch/