From owner-freebsd-cloud@freebsd.org Mon Mar 11 09:42:31 2019 Return-Path: Delivered-To: freebsd-cloud@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDEFE153A1BF for ; Mon, 11 Mar 2019 09:42:31 +0000 (UTC) (envelope-from raf@rafal.net) Received: from smtp-out-2.mxes.net (smtp-out-2.mxes.net [205.237.194.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E54548D94F for ; Mon, 11 Mar 2019 09:42:30 +0000 (UTC) (envelope-from raf@rafal.net) Received: from Customer-MUA (mua.mxes.net [10.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 910F2274FD; Mon, 11 Mar 2019 05:42:21 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rafal.net; s=tm; t=1552297342; bh=39MZRwGLGs4YeCz4Ian824FGhFWRCBuggmSsnSVL2/8=; h=From:Date:Subject:Cc:To:From; b=wv56zBhFzQVR8N3Usb6f94xi0MpBqA2Y6UQKzRQbXP2sMIAgJY+3td9KQBnYBLze0 lSKbUVn2ocfduETeEYEfAwoJg5Ujs6bsyfTpwcpQkgX3DlZvOdqt0Qnr4yiZ98Lvsc 7qEBTX+y9Jh/abYMpvQZY0rxEE7e75lsd/lH6U7o= From: Rafal Lukawiecki Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Date: Mon, 11 Mar 2019 09:42:19 +0000 Subject: How to base64 encode and upload userdata for EC2 Launch Template Message-Id: <16C73F7C-3673-44CC-B59E-DA247A0C2DF7@rafal.net> To: freebsd-cloud@freebsd.org X-Mailer: iPad Mail (16D57) X-Sent-To: X-Sender: rafal.net X-Rspamd-Queue-Id: E54548D94F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=rafal.net header.s=tm header.b=wv56zBhF; dmarc=pass (policy=none) header.from=rafal.net; spf=pass (mx1.freebsd.org: domain of raf@rafal.net designates 205.237.194.127 as permitted sender) smtp.mailfrom=raf@rafal.net X-Spamd-Result: default: False [-6.09 / 15.00]; ARC_NA(0.00)[]; SUBJECT_ENDS_SPACES(0.50)[]; R_DKIM_ALLOW(-0.20)[rafal.net:s=tm]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:205.237.194.0/25]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[mxin.mxes.net,mxin.mxes.net]; DKIM_TRACE(0.00)[rafal.net:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; DMARC_POLICY_ALLOW(-0.50)[rafal.net,none]; IP_SCORE(-3.04)[ip: (-7.97), ipnet: 205.237.192.0/20(-3.98), asn: 10607(-3.19), country: US(-0.07)]; RCVD_IN_DNSWL_LOW(-0.10)[127.194.237.205.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:10607, ipnet:205.237.192.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-cloud@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "FreeBSD on cloud platforms \(EC2, GCE, Azure, etc.\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 09:42:32 -0000 Hello Everyone, Hello Colin, I hope someone can explain, as I have been lost in this for over a week. I w= ould like to pass a small (4-5kB) tarball of files for the built-in cloud in= it script of the official FreeBSD 12.0 EC2 AMI to get untarred and processed= (>, >>, or #!) upon instance launch. I have successfully done it for over 2= years using Launch Configurations but I cannot make it work using the new L= aunch Templates. No matter if base64 and upload via the console, or base64 and use aws cli, o= r create an LC and convert to an LT, it only works with LC. So far, I can see that depending which route I use to upload the file, when I= download it back from the finished template/configuration there seem to be 3= different userdata lengths, even though I always pass the same input. It su= ggests to me that some other processing of that input happens, and I am lost= where to hunt for it. Have any of you nailed it down? What steps do you take to prepare it? Many thanks and regards from Ireland, Rafal Lukawiecki=