You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何阻止AWS CLI跟随URL并使用其响应?SSM参数存储场景

解决AWS CLI自动解析SSM参数中URL的问题

AWS CLI默认会识别--value参数里的HTTP/HTTPS URL,自动发起请求并把响应内容存成SSM参数值。要直接存入URL本身,试试这几种实用方法:

  • Linux/macOS终端用单引号包裹URL:
    单引号会让CLI把内容当作纯字符串处理,不会触发URL解析逻辑。示例命令:

    aws ssm put-parameter --name /example --value 'https://endpointthatreturnsaresponsee' --type String
    
  • 用--cli-input-json传递完整参数:
    通过JSON结构明确指定参数值,完全绕过CLI的自动解析,跨平台通用。示例:

    aws ssm put-parameter --cli-input-json '{"Name": "/example", "Value": "https://endpointthatreturnsaresponsee", "Type": "String"}'
    
  • Windows环境用双引号包裹URL:
    在Windows cmd或PowerShell中,用双引号包裹URL即可避免自动解析:

    aws ssm put-parameter --name /example --value "https://endpointthatreturnsaresponsee" --type String
    

内容的提问来源于stack exchange,提问作者Tom Carpenter

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.09 16:07:05