AWS CloudFormation创建堆栈命令导致未创建堆栈



我正试图通过运行来创建一个新的AWS CodeBuild堆栈

aws cloudformation create-stack --stack-name codebuild-stack-1229a --disable-rollback --template-body file://codebuild.yml 
--parameters 
ParameterKey=DeploymentNamePrefix,ParameterValue=stack-1229a 
ParameterKey=SourceBranch,ParameterValue=dev 
--capabilities CAPABILITY_AUTO_EXPAND CAPABILITY_NAMED_IAM

命令返回:

{
"StackId": "arn:aws-us-gov:cloudformation:us-gov-west-1:xxxxxxxxxxxx:stack/codebuild-stack-1229b/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"
}

我在命令中添加了--debug开关,得到了这个输出(最后几行(:

2021-12-29 12:08:23,512 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://cloudformation.us-gov-west-1.amazonaws.com/, headers={'Content-Type': b'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': b'aws-cli/2.4.7 Python/3.8.8 Darwin/20.6.0 exe/x86_64 prompt/off command/cloudformation.create-stack', 'X-Amz-Date': b'20211229T180823Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=xxxxxxxxxxxx/20211229/us-gov-west-1/cloudformation/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=xxxxxxxxxxxx', 'Content-Length': '3850'}>
2021-12-29 12:08:23,512 - MainThread - botocore.httpsession - DEBUG - Certificate path: /usr/local/aws-cli/awscli/botocore/cacert.pem
2021-12-29 12:08:23,513 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): cloudformation.us-gov-west-1.amazonaws.com:443
2021-12-29 12:08:24,200 - MainThread - urllib3.connectionpool - DEBUG - https://cloudformation.us-gov-west-1.amazonaws.com:443 "POST / HTTP/1.1" 200 402
2021-12-29 12:08:24,200 - MainThread - botocore.parsers - DEBUG - Response headers: {'x-amzn-RequestId': 'xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx', 'Content-Type': 'text/xml', 'Content-Length': '402', 'Date': 'Wed, 29 Dec 2021 18:08:23 GMT'}
2021-12-29 12:08:24,200 - MainThread - botocore.parsers - DEBUG - Response body:
b'<CreateStackResponse xmlns="http://cloudformation.amazonaws.com/doc/2010-05-15/">n  <CreateStackResult>n    <StackId>arn:aws-us-gov:cloudformation:us-gov-west-1:xxxxxxxxxxxx:stack/codebuild-stack-1229b/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</StackId>n  </CreateStackResult>n  <ResponseMetadata>n    <RequestId>xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx</RequestId>n  </ResponseMetadata>n</CreateStackResponse>n'
2021-12-29 12:08:24,201 - MainThread - botocore.hooks - DEBUG - Event needs-retry.cloudformation.CreateStack: calling handler <bound method RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object at 0x7fe950eff9d0>>
2021-12-29 12:08:24,201 - MainThread - botocore.retries.standard - DEBUG - Not retrying request.
2021-12-29 12:08:24,201 - MainThread - botocore.hooks - DEBUG - Event after-call.cloudformation.CreateStack: calling handler <bound method RetryQuotaChecker.release_retry_quota of <botocore.retries.standard.RetryQuotaChecker object at 0x7fe950eff610>>
2021-12-29 12:08:24,201 - MainThread - awscli.formatter - DEBUG - RequestId: xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx
{
"StackId": "arn:aws-us-gov:cloudformation:us-gov-west-1:xxxxxxxxxxxx:stack/codebuild-stack-1229b/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

我没有看到任何错误或警告。AWS CodeBuild控制台不显示该命令要创建的构建项目。

我在哪里检查故障?欢迎提出任何建议。

确保您在CLI和web控制台中都处于正确的区域。

最新更新