Hi,
When I use aws ssm put-parameter
with using URL string for value option, I got some error.
It seems to me that it is sending a request to URL on value option.
hieki@Xil-liX : ~
$ aws --version
aws-cli/1.15.58 Python/2.7.1 Darwin/17.7.0 botocore/1.10.57
hieki@Xil-liX : ~
$ aws ssm put-parameter --name 'foobar' --type 'String' --value 'https://google.com'
An error occurred (ValidationException) when calling the PutParameter operation: 1 validation error detected: Value '<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="ja"><head><meta content="世界中のあらゆる情報を検索するためのツールを提供しています。さまざまな検索機能を活用して、お探しの情報を見つけてください。" name="description"><meta content="noodp" name="robots"><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image"><title>Google</title><script nonce="O/51EYrY2FWmL4eBss/oyA==">(function(){window.google={kEI:'I4dIW8SdAcK-0AThtLnYCg',kEXPI:'0,1353747,943,1071,1017,282,495,214,389,572,43,630,6,606,74,115,134,127,98,2339499,227,200,32,329244,1344,12383,2349,2506,32691,15248,867,1580,7,4469,636,5471,14329,2192,367,550,664,326,1776,113,2201,3191,725,3,339,1375,130,130,1028,2714,1365,575,1119,2,204,374,728,310,304,1818,254,1107,1705,7,1376,505,730,377,1240,479,666,628,8,1569,223,490,61,1232,1019,280,2,2825,279,473,6,878,393,88,44,22,604,2,153,506,1086,499,55,132,2,60,3,741,33,157,323,77,29,272,614,283,509,1587,296,1180,164,35,3,824,11,43,24,1,16,162,334,55,68,7,891,218,9,121,105,386,8,804,2,278,7,28,463,620,29,460,245,3,186,4,4,4,4,100,282,63,10,30,109,349,62,76,140,303,50,215,628,301,102,1327,656,319,763,216,7,2324915,3685998,2553,8797786,4,1572,549,332,445,1,2,1,1,77,1,1,900,581,3,312,6,3,1,2,1,1,1600,1,22,330,4,15,85,15,23,9,16,10,1,1,1,1,1,10',authuser:0,kscs:'c9c918f0_I4dIW8SdAcK-0AThtLnYCg',kGL:'JP'};google.kHL='ja';})();google.time=function(){return(new Date).getTime()};(function(){google.lc=[];google.li=0;google.getEI=function(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||google.kEI};google.getLEI=function(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute("leid")));)a=a.parentNode;return b};google.https=function(){return"https:"==window.location.protocol};google.ml=function(){return null};google.wl=function(a,b){try{google.ml(Error(a),!1,b)}catch(d){}};google.log=function(a,b,d,c,g){if(a=google.logUrl(a,b,d,c,g)){b=new Image;var e=google.lc,f=google.li;e[f]=b;b.onerror=b.onload=b.onabort=function(){delete e[f]};google.vel&&google.vel.lu&&google.vel.lu(a);b.src=a;google.li=f+1}};google.logUrl=function(a,b,d,c,g){var e="",f=google.ls||"";d||-1!=b.search("&ei=")||(e="&ei="+google.getEI(c),-1==b.search("&lei=")&&(c=google.getLEI(c))&&(e+="&lei="+c));c="";!d&&google.cshid&&-1==b.search("&cshid=")&&"slh"!=a&&(c="&cshid="+google.cshid);a=d||"/"+(g||"gen_204")+"?atyp=i&ct="+a+"&cad="+b+e+f+"&zx="+google.time()+c;/^http:/i.test(a)&&google.https()&&(google.ml(Error("a"),!1,{src:a,glmm:1}),a="");return a};}).call(this);(function(){google.y={};google.x=function(a,b){if(a)var c=a.id;else{do c=Math.random();while(google.y[c])}google.y[c]=[a,b];return!1};google.lm=[];google.plm=function(a){google.lm.push.apply(google.lm,a)};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};}).call(this);google.f={};</script><script nonce="O/51EYrY2FWmL4eBss/oyA==">var a=window.location,b=a.href.indexOf("#");if(0<=b){var c=a.href.substring(b+1);/(^|&)q=/.test(c)&&-1==c.indexOf("#")&&a.replace("/search?"+c.replace(/(^|&)fp=[^&]*/g,"")+"&cad=h")};</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}
</style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.h{color:#36c}.q{color:#00c}.ts td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}a.gb1,a.gb2,a.gb3,a.gb4{color:#11c !important}body{background:#fff;color:black}a{color:#11c;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#36c}a:visited{color:#551a8b}a.gb1,a.gb4{text-decoration:underline}a.gb3:hover{text-decoration:none}#ghead a.gb2:hover{color:#fff !important}.sblc{padding-top:5px}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}.lsbb{background:#eee;border:solid 1px;border-color:#ccc #999 #999 #ccc;height:30px}.lsbb{display:block}.ftl,#fll a{display:inline-block;margin:0 12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top}.lsb:active{background:#ccc}.lst:focus{outline:none}</style><script nonce="O/51EYrY2FWmL4eBss/oyA=="></script><link href="/images/branding/product/ico/googleg_lodp.ico" rel="shortcut icon"></head><body bgcolor="#fff"><script nonce="O/51EYrY2FWmL4eBss/oyA==">(function(){var src='/images/nav_logo229.png';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;}
if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}
}
})();</script><div id="mngb"> <div id=gbar><nobr><b class=gb1>検索</b> <a class=gb1 href="https://www.google.co.jp/imghp?hl=ja&tab=wi">画像</a> <a class=gb1 href="https://maps.google.co.jp/maps?hl=ja&tab=wl">マップ</a> <a class=gb1 href="https://play.google.com/?hl=ja&tab=w8">Play</a> <a class=gb1 href="https://www.youtube.com/?gl=JP&tab=w1">YouTube</a> <a class=gb1 href="https://news.google.co.jp/nwshp?hl=ja&tab=wn">ニュース</a> <a class=gb1 href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a class=gb1 href="https://drive.google.com/?tab=wo">ドライブ</a> <a class=gb1 style="text-decoration:none" href="https://www.google.co.jp/intl/ja/options/"><u>もっと見る</u> »</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href="http://www.google.co.jp/history/optout?hl=ja" class=gb4>ウェブ履歴</a> | <a href="/preferences?hl=ja" class=gb4>設定</a> | <a target=_top id=gb_70 href="https://accounts.google.com/ServiceLogin?hl=ja&passive=true&continue=https://www.google.com/" class=gb4>ログイン</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div> </div><center><br clear="all" id="lgpd"><div id="lga"><img alt="Google" height="92" src="/images/branding/googlelogo/1x/googlelogo_white_background_color_272x92dp.png" style="padding:28px 0 14px" width="272" id="hplogo" onload="window.lol&&lol()"><br><br></div><form action="/search" name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td width="25%"> </td><td align="center" nowrap=""><input name="ie" value="ISO-8859-1" type="hidden"><input value="ja" name="hl" type="hidden"><input name="source" type="hidden" value="hp"><input name="biw" type="hidden"><input name="bih" type="hidden"><div class="ds" style="height:32px;margin:4px 0"><input style="color:#000;margin:0;padding:5px 8px 0 6px;vertical-align:top" autocomplete="off" class="lst" value="" title="Google 検索" maxlength="2048" name="q" size="57"></div><br style="line-height:0"><span class="ds"><span class="lsbb"><input class="lsb" value="Google 検索" name="btnG" type="submit"></span></span><span class="ds"><span class="lsbb"><input class="lsb" value="I'm Feeling Lucky" name="btnI" onclick="if(this.form.q.value)this.checked=1; else top.location='/doodles/'" type="submit"></span></span></td><td class="fl sblc" align="left" nowrap="" width="25%"><a href="/advanced_search?hl=ja&authuser=0">検索オプション</a><a href="/language_tools?hl=ja&authuser=0">言語ツール</a></td></tr></table><input id="gbv" name="gbv" type="hidden" value="1"></form><div id="gac_scont"></div><div style="font-size:83%;min-height:3.5em"><br></div><span id="footer"><div style="font-size:10pt"><div style="margin:19px auto;text-align:center" id="fll"><a href="/intl/ja/ads/">広告掲載</a><a href="http://www.google.co.jp/intl/ja/services/">ビジネス ソリューション</a><a href="https://plus.google.com/115899767381375908215" rel="publisher">+Google</a><a href="/intl/ja/about.html">Google について</a><a href="https://www.google.com/setprefdomain?prefdom=JP&prev=https://www.google.co.jp/&sig=__wfPj_i1UURpb5c_othCslNTS7bo%3D">Google.co.jp</a></div></div><p style="color:#767676;font-size:8pt">© 2018 - <a href="/intl/ja/policies/privacy/">プライバシー</a> - <a href="/intl/ja/policies/terms/">規約</a></p></span></center><script nonce="O/51EYrY2FWmL4eBss/oyA==">(function(){window.google.cdo={height:0,width:0};(function(){var a=window.innerWidth,b=window.innerHeight;if(!a||!b){var c=window.document,d="CSS1Compat"==c.compatMode?c.documentElement:c.body;a=d.clientWidth;b=d.clientHeight}a&&b&&(a!=google.cdo.width||b!=google.cdo.height)&&google.log("","","/client_204?&atyp=i&biw="+a+"&bih="+b+"&ei="+google.kEI);}).call(this);})();</script><div id="xjsd"></div><div id="xjsi"><script nonce="O/51EYrY2FWmL4eBss/oyA==">(function(){function c(b){window.setTimeout(function(){var a=document.createElement("script");a.src=b;google.timers&&google.timers.load.t&&google.tick&&google.tick("load",{gen204:"xjsls",clearcut:31});document.getElementById("xjsd").appendChild(a)},0)}google.dljp=function(b,a){google.xjsu=b;c(a)};google.dlj=c;}).call(this);if(!google.xjs){window._=window._||{};window._DumpException=window._._DumpException=function(e){throw e};window._F_installCss=window._._F_installCss=function(c){};google.dljp('/xjs/_/js/k\x3dxjs.hp.en.0wBcmwc0jkU.O/m\x3dsb_he,d/am\x3dRMHY/rt\x3dj/d\x3d1/rs\x3dACT90oEDzbHsRfgGux40AgWm0x5IfYjlmA','/xjs/_/js/k\x3dxjs.hp.en.0wBcmwc0jkU.O/m\x3dsb_he,d/am\x3dRMHY/rt\x3dj/d\x3d1/rs\x3dACT90oEDzbHsRfgGux40AgWm0x5IfYjlmA');google.xjs=1;}google.pmc={"sb_he":{"agen":true,"cgen":true,"client":"heirloom-hp","dh":true,"dhqt":true,"ds":"","ffql":"ja","fl":true,"host":"google.com","isbh":28,"jsonp":true,"msgs":{"cibl":"検索をクリア","dym":"もしかして:","lcky":"I\u0026#39;m Feeling Lucky","lml":"詳細","oskt":"入力ツール","psrc":"この検索キーワードは\u003Ca href=\"/history\"\u003Eウェブ履歴\u003C/a\u003Eから削除されました","psrl":"削除","sbit":"画像で検索","srch":"Google 検索"},"nds":true,"ovr":{},"pq":"","refpd":true,"refspre":true,"rfs":[],"sbpl":24,"sbpr":24,"scd":10,"sce":5,"stok":"LKlxMvP7iWDuZUt5L7gIKJDR_xA"},"d":{},"ZI/YVQ":{},"Qnk92g":{},"U5B21g":{},"DPBNMg":{},"YFCs/g":{}};google.x(null,function(){});(function(){var r=[];google.plm(r);})();(function(){var m=[]
;google.jsc && google.jsc.m(m);})();</script></div></body></html>' at 'value' failed to satisfy constraint: Member must have length less than or equal to 4096
Is this supposed behavior?
I was able to set this value on the management console.
@Hieki, thank you for reaching out.
This is a result of a feature of the CLI when a value starts with: http:// or https:// it will actually grab the contents and use the contents as the value it sends to the API. Previously, there was no explicit option for turning this off. This issue was escalated as a new feature request to deprecation path of the automatic https:// and http:// following. Work was done (#3384) to add a configuration option to disable this feature by setting cli_follow_urlparam = false
in the config file. The fix was release under AWS CLI version 1.15.48.
Related documentation: https://docs.aws.amazon.com/cli/latest/topic/config-vars.html
Previous discussions: #3398 #2507 #3076 #2577
Let us know if that helps of if there are any other questions.
-Upgrade CLI
pip install awscli --upgrade --user
2.- Check the config
less ~/.aws/config
3.- Disable this feature by setting/append cli_follow_urlparam = false in the config file
vi ~/.aws/config
Most helpful comment
@Hieki, thank you for reaching out.
This is a result of a feature of the CLI when a value starts with: http:// or https:// it will actually grab the contents and use the contents as the value it sends to the API. Previously, there was no explicit option for turning this off. This issue was escalated as a new feature request to deprecation path of the automatic https:// and http:// following. Work was done (#3384) to add a configuration option to disable this feature by setting
cli_follow_urlparam = false
in the config file. The fix was release under AWS CLI version 1.15.48.Related documentation: https://docs.aws.amazon.com/cli/latest/topic/config-vars.html
Previous discussions: #3398 #2507 #3076 #2577
Let us know if that helps of if there are any other questions.