aws下载Yaml中的内容 [英] aws Download Content in Yaml
本文介绍了aws下载Yaml中的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试格式化我的Yaml以下载S3存储桶中的脚本以在SSM中运行.
Trying to format my yaml to download a script in S3 bucket to run in SSM.
我尝试了许多不同的格式,但是所有示例似乎都是JSON格式的
I've tried many different formats, but all examples seem to be JSON formatted
- action: aws:downloadContent
name: downloadContent
inputs:
sourceType: "S3"
sourceInfo:
path: https://bucket-name.s3.amazonaws.com/scripts/script.ps1
destinationPath: "C:\\Windows\\Temp"
失败,并显示以下消息:
Fails with the following message:
standardError": "invalid format in plugin properties map[destinationPath:C:\\Windows\\Temp sourceInfo:map[path:https://bucket-name.s3.amazonaws.com/scripts/script.ps1] sourceType:S3]; \nerror json: cannot unmarshal object into Go struct field DownloadContentPlugin.sourceInfo of type string"
推荐答案
这最终对我有用:
- action: aws:downloadContent
name: downloadContent
inputs:
sourceType: S3
sourceInfo: "{\"path\":\"https://bucket-name.s3.amazonaws.com/scripts/script.ps1\"}"
destinationPath: "C:\\Windows\\Temp"
我需要在YAML中嵌入确切的JSON语法.
I needed that exact JSON syntax embedded in the YAML.
这篇关于aws下载Yaml中的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文