gpt4 book ai didi

amazon-web-services - 模型验证失败 (#/EventSourceArn : failed validation constraint for keyword [pattern])

转载 作者:行者123 更新时间:2023-12-03 07:10:36 25 4
gpt4 key购买 nike

在AWS云形成中,我面临以下验证错误:

Model validation failed (#/EventSourceArn: failed validation constraint for keyword [pattern])

canary.yaml

Canary:
Type: AWS::Synthetics::Canary
Properties:
Name:
Fn::Sub: test12345678901234567889-development
Code:
Handler: exports.handler
Script: |
const https = require('https')
const URL = process.env.URL;
var synthetics = require('Synthetics');
const log = require('SyntheticsLogger');
log.info('URL:'+URL);
exports.handler = async function(event) {
const promise = new Promise(function(resolve, reject) {
https.get(URL, (res) => {
resolve(res.statusCode)
}).on('error', (e) => {
reject(Error(e))
})
})
return promise
}
ExecutionRoleArn:
Fn::GetAtt:
- CloudWatchSyntheticsRole
- Arn
RuntimeVersion: syn-nodejs-puppeteer-3.2
RunConfig:
TimeoutInSeconds: 60
EnvironmentVariables:
URL : !Sub "http://{{resolve:ssm:/${Portfolio}/${ApplicationEnvironmentTag}/common/ApplicationLoadBalancerUrl}}/management/health"
ArtifactS3Location:
Fn::Join:
- ''
- - s3://
- Ref: ResultsBucket
StartCanaryAfterCreation: True
Schedule:
Expression: rate(1 minute) # every minute
DurationInSeconds: 0 # run indefinitely
SuccessRetentionPeriod: 90
FailureRetentionPeriod: 180

最佳答案

终于找到问题了

问题与金丝雀名称模式和验证有关。

名称不得超过 21 个字符。我的比那还要大。

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-canary.html#cfn-synthetics-canary-name

关于amazon-web-services - 模型验证失败 (#/EventSourceArn : failed validation constraint for keyword [pattern]),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69612011/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com