如何在云形成 yaml 中包含本地机器路径而不是 S3 存储桶路径以包含 swagger 文件的网址。
我已经包含本地 swagger 文件路径的 yaml 文件为 -
然而,在 AWS 文档和我搜索的所有地方中,我得到的都是需要上传 Swagger 到 S3 存储桶,然后给出该路径,例如-
Fn::Transform:
Name: AWS::Include
Parameters:
Location: s3://MyAmazonS3BucketName/MyFileName.yaml
参考 - https://docs.aws.amazon.com/zh_cn/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html
我意识到一旦在 AWS 服务器上,AWS 就无法找到我们的机器文件。 有没有一种方法可以通过 CLI 命令同时包括或上传 Swagger 文件,而不是在您的 cloudFormation.yaml 文件中包含 Swagger 正文。
我的 CLI 命令是 -
aws cloudformation create-stack --stack-name justatemplate --template-body file://E:/Documents/swagger.yaml --no-verify-ssl --capabilities CAPABILITY_NAMED_IAM