From owner-freebsd-cloud@freebsd.org Mon Mar 11 19:37:14 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 87C42152C0A8 for ; Mon, 11 Mar 2019 19:37:14 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from mail.tarsnap.com (mail.tarsnap.com [54.86.246.204]) by mx1.freebsd.org (Postfix) with ESMTP id 2450977731 for ; Mon, 11 Mar 2019 19:37:14 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: (qmail 71789 invoked from network); 11 Mar 2019 19:39:12 -0000 Received: from unknown (HELO exbuntu.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 11 Mar 2019 19:39:12 -0000 Received: (qmail 17207 invoked from network); 11 Mar 2019 19:37:46 -0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by clamshell.daemonology.net with SMTP; 11 Mar 2019 19:37:46 -0000 Subject: Re: How to base64 encode and upload userdata for EC2 Launch Template To: Rafal Lukawiecki Cc: freebsd-cloud@freebsd.org References: <16C73F7C-3673-44CC-B59E-DA247A0C2DF7@rafal.net> From: Colin Percival Openpgp: preference=signencrypt Autocrypt: addr=cperciva@freebsd.org; prefer-encrypt=mutual; keydata= mQGhBElrAAcRBACDfDys4ZtK+ErCJ1HAzYeteKpm3OEsvT/49AjUTLihkF79HhIKrCQU+1KC zv7BwHCMLb6hq30As9L7iFKG7n5QFLFC4Te/VcITUnWHMG/c3ViLOfJGvi+9/nOEHaM1dVJY D6tEp5yM1nHmVQpo9932j4KGuGFR0LhOK5IHXOSfGwCgxSFDPdgxe2OEjWxjGgY+oV3EafcD +JROXCTjlcQiG/OguQH4Vks3mhHfFnEppLxTkDuYgHZQiUtpcT9ssH5khgqoTyMar05OUdAj ZIhNbWDh4LgTj+7ZmvLhXT5Zxw8LX9d7T36aTB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XrZU0Fu/R8Rm8rlnkQKA+95mRTUq1xL5P5NZIi4gJ Z569OPMFiEkEGBECAAkFAklrAAcCGwwACgkQOM7KaQxqam41igCfbaldnFTu5uAdrnrghESv EI3CAo8AoLkNMks1pThl2BJNRm4CtTK9xZeH Message-ID: <00238cea-75dc-57e2-a304-671a8dc5f5b5@freebsd.org> Date: Mon, 11 Mar 2019 12:37:46 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2450977731 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:14618, ipnet:54.86.0.0/16, country:US] 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 19:37:14 -0000 Try it without the 'y' flag. It's possible that this will produce something too big to pass as a user-data file; but if it's small enough this would be a useful indication of where the problem lies. Colin Percival On 3/11/19 12:24 PM, Rafal Lukawiecki wrote: > I have been using “tar cvyf fff ddd”, which I think is a compressed tarball using bzip. Should I use something else? > > I have also noticed odd behaviour in the Console for LCs, but different behaviour in the Console for LCs, and yet different for CLI… > > Thank you, Colin. > Rafal > >> On 11 Mar 2019, at 19:21, Colin Percival wrote: >> >> On 3/11/19 2:42 AM, Rafal Lukawiecki wrote: >>> I hope someone can explain, as I have been lost in this for over a week. I would like to pass a small (4-5kB) tarball of files for the built-in cloud init 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 Launch Templates. >> >> Is this a tarball, or a compressed tarball? >> >> There's a longstanding bug (which I'm told is going to get fixed eventually!) >> in the AWS Console whereby any non-7-bit-clean user-data files get mangled >> and come out with each byte UTF-8 encoded. I was only aware of this as an >> issue with the Console but it's entirely possible that someone at Amazon wrote >> the same bug in multiple places. >> >> -- >> Colin Percival >> Security Officer Emeritus, FreeBSD | The power to serve >> Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid > > > -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid