这里是 AWS 新手。
我正在开发我的第一个 Bitbucket 管道以部署到 AWS。它分为三个步骤:
这是我最近的跑步:
事实上,我认为这是进步!我第一次运行这个时,我自己在 6 分半钟左右停止了它,因为它似乎挂在这条线上:
aws deploy wait deployment-successful --deployment-id d-V1OU4NNG8
这次它自己失败了,至少提供了一些诊断信息可供查看。
Status: Downloaded newer image for bitbucketpipelines/aws-code-deploy:0.2.10
INFO: Deploying app from revision.
aws deploy get-application-revision --application-name lightning-comm --revision revisionType=S3,s3Location={bucket=lightning-comm-codedeploy-deployment,bundleType=zip,key=lightning-comm-10-b614e62f}
{
"applicationName": "lightning-comm",
"revisionInfo": {
"lastUsedTime": 1726775747.124,
"firstUsedTime": 1726775747.124,
"registerTime": 1726775712.153,
"description": "Application revision registered by Deployment ID: d-K49RJELG8",
"deploymentGroups": []
},
"revision": {
"revisionType": "S3",
"s3Location": {
"bundleType": "zip",
"bucket": "lightning-comm-codedeploy-deployment",
"key": "lightning-comm-10-b614e62f"
}
}
}
aws deploy create-deployment --application-name lightning-comm --deployment-group deployment --revision revisionType=S3,s3Location={bucket=lightning-comm-codedeploy-deployment,bundleType=zip,key=lightning-comm-10-b614e62f} --ignore-application-stop-failures --file-exists-behavior OVERWRITE
{
"deploymentId": "d-V1OU4NNG8"
}
INFO: Deployment created with id d-V1OU4NNG8.
INFO: Waiting for deployment to complete.
aws deploy wait deployment-successful --deployment-id d-V1OU4NNG8
Waiter DeploymentSuccessful failed: Waiter encountered a terminal failure state
ERROR: Deployment failed. Fetching deployment information...
aws deploy get-deployment --deployment-id d-V1OU4NNG8
{
"deploymentInfo": {
"applicationName": "lightning-comm",
"status": "Failed",
"deploymentOverview": {
"Skipped": 0,
"Succeeded": 0,
"Failed": 1,
"Ready": 0,
"InProgress": 0,
"Pending": 0
},
"computePlatform": "Server",
"deploymentConfigName": "CodeDeployDefault.AllAtOnce",
"creator": "user",
"errorInformation": {
"message": "The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.",
"code": "HEALTH_CONSTRAINTS"
},
"fileExistsBehavior": "OVERWRITE",
"deploymentId": "d-V1OU4NNG8",
"deploymentStatusMessages": [],
"ignoreApplicationStopFailures": true,
"deploymentStyle": {
"deploymentType": "IN_PLACE",
"deploymentOption": "WITHOUT_TRAFFIC_CONTROL"
},
"updateOutdatedInstancesOnly": false,
"rollbackInfo": {},
"instanceTerminationWaitTimeStarted": false,
"deploymentGroupName": "deployment",
"createTime": 1726780175.753,
"completeTime": 1726780481.716,
"revision": {
"revisionType": "S3",
"s3Location": {
"bundleType": "zip",
"bucket": "lightning-comm-codedeploy-deployment",
"key": "lightning-comm-10-b614e62f"
}
}
}
}
这似乎是相关信息:
"errorInformation": {
"message": "The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.",
"code": "HEALTH_CONSTRAINTS"
}
好的,“失败的单个实例太多”、“运行状况良好的实例太少”——我只部署到一个 EC2 实例,而该实例失败了。无论出现什么问题,它都不会很快失败,大约需要 5 分钟以上才会失败。我想无论出现什么问题,或者是否需要检查其他诊断,这些都将在 AWS 端找到。我是 AWS 的新手。如果您能为我提供一些指导,告诉我在 AWS 端寻找什么以查找其他诊断,或者在哪里查找可能的错误配置,这将非常有帮助。谢谢!