如何在不删除CloudFormation Stack的情况下恢复python lambda



我错误地删除了python lambda,这是使用CDKBucketDeployment. 我在部署新更改时遇到了这个问题。我不想删除我现有的CloudFormation Stack因为如果我删除这个,我需要创建新的Cognito用户池和我的应用程序url也会改变。

devWebClientStack: deploying...
[0%] start: Publishing c9ac4b3b65f3510a2088b7fd003de23d2aefac424025eb168725ce6769e3c176:current
[50%] success: Published c9ac4b3b65f3510a2088b7fd003de23d2aefac424025eb168725ce6769e3c176:current
[50%] start: Publishing f50bf04d69a5f8fec61ba6b259e3f76a66edc48a22f6b802dcc80d5bb807ed95:current
[100%] success: Published f50bf04d69a5f8fec61ba6b259e3f76a66edc48a22f6b802dcc80d5bb807ed95:current
devWebClientStack: creating CloudFormation changeset...
0/2 | 5:25:47 PM | UPDATE_IN_PROGRESS | AWS::CloudFormation::Stack | devWebClientStack User Initiated
0/2 | 5:25:54 PM | UPDATE_IN_PROGRESS | Custom::CDKBucketDeployment | DeployWithInvalidation/CustomResource/Default (DeployWithInvalidationCustomResourceE3FF7455)
0/2 | 5:25:55 PM | UPDATE_FAILED | Custom::CDKBucketDeployment | DeployWithInvalidation/CustomResource/Default (DeployWithInvalidationCustomResourceE3FF7455) Function not found: arn:aws:lambda:eu-central-1:316993037060:function:devWebClientStack-CustomCDKBucketDeployment8693BB6-OJIUwTSmAVQV (Service: AWSLambda; Status Code: 404; Error Code: ResourceNotFoundException; Request ID: 77adec99-0a74-4127-9c7c-086fc14a3051; Proxy: null)
new CustomResource (C:qavcopdeploymentsweb-clientnode_modules@aws-cdkcorelibcustom-resource.ts:115:21)
_ new BucketDeployment (C:qavcopdeploymentsweb-clientnode_modules@aws-cdkaws-s3-deploymentlibbucket-deployment.ts:201:5)
_ new WebClientStack (C:qavcopdeploymentsweb-clientlibweb-client-stack.ts:54:5)
_ Object.<anonymous> (C:qavcopdeploymentsweb-clientbinweb-client.ts:7:1)
_ Module._compile (internal/modules/cjs/loader.js:1072:14)
_ Module.m._compile (C:qavcopdeploymentsweb-clientnode_modulests-nodesrcindex.ts:1043:23)
_ Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
_ Object.require.extensions.<computed> [as .ts] (C:qavcopdeploymentsweb-clientnode_modulests-nodesrcindex.ts:1046:12)
_ Module.load (internal/modules/cjs/loader.js:937:32)
_ Function.Module._load (internal/modules/cjs/loader.js:778:12)
_ Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
_ main (C:qavcopdeploymentsweb-clientnode_modulests-nodesrcbin.ts:225:14)
_ Object.<anonymous> (C:qavcopdeploymentsweb-clientnode_modulests-nodesrcbin.ts:512:3)
_ Module._compile (internal/modules/cjs/loader.js:1072:14)
_ Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
_ Module.load (internal/modules/cjs/loader.js:937:32)
_ Function.Module._load (internal/modules/cjs/loader.js:778:12)
_ Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
_ internal/main/run_main_module.js:17:47
0/2 | 5:25:56 PM | UPDATE_ROLLBACK_IN_P | AWS::CloudFormation::Stack | devWebClientStack The following resource(s) failed to update: [DeployWithInvalidationCustomResourceE3FF7455].
2/2 | 5:26:04 PM | UPDATE_COMPLETE | Custom::CDKBucketDeployment | DeployWithInvalidation/CustomResource/Default (DeployWithInvalidationCustomResourceE3FF7455)
2/2 | 5:26:05 PM | UPDATE_ROLLBACK_COMP | AWS::CloudFormation::Stack | devWebClientStack
2/2 | 5:26:05 PM | UPDATE_ROLLBACK_COMP | AWS::CloudFormation::Stack | devWebClientStack
❌ devWebClientStack failed: Error: The stack named devWebClientStack failed to deploy: UPDATE_ROLL
BACK_COMPLETE
at Object.waitForStackDeploy (C:qavcopdeploymentsweb-clientnode_modulesaws-cdklibapiutilcloudformation.ts:307:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at Object.deployStack (C:qavcopdeploymentsweb-clientnode_modulesaws-cdklibapideploy-stack.ts:283:26)
at CdkToolkit.deploy (C:qavcopdeploymentsweb-clientnode_modulesaws-cdklibcdk-toolkit.ts:180:24)
at initCommandLine (C:qavcopdeploymentsweb-clientnode_modulesaws-cdkbincdk.ts:201:9)
The stack named devWebClientStack failed to deploy: UPDATE_ROLLBACK_COMPLETE
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! web-client@0.1.0 deploy: `cdk deploy --require-approval never`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the web-client@0.1.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersCYAQTAppDataRoamingnpm-cache_logs2022-06-10T11_56_08_461Z-debug.log

请提出解决方案。我如何在没有任何损失的情况下恢复?

我会联系AWS支持,他们可能会告诉你如何手动纠正这个问题。

相关内容

  • 没有找到相关文章

最新更新