Coyote Codornices Marin

Results 82 comments of Coyote Codornices Marin

Okay, it looks like first I want to `DescribeImages` to find the latest Amazon Linux version, and then `RunInstances` with my bootstrap commands in `UserData` (which is thinly documented and...

It looks like `UserData` can just contain the text of a shell script with a shebang at the top. So, in theory, we could just run the bootstrap script as-is,...

Looks like we should use the IAM roles for EC2 feature: https://aws.amazon.com/blogs/security/a-safer-way-to-distribute-aws-credentials-to-ec2/

It looks like we just need to use the same instance profile that we'd use to launch a job on EMR (that is the `mrjob-*` role we auto-create, or `EMR_EC2_DefaultRole`,...

I was only able to SSH to it when i used the security group created by the launch wizard, but mrjob won't need to SSH in.

Still trying to figure out how to tell if the EC2 instance's "bootstrap" (user data) script succeeded. We don't want to build an AMI from a partially configured image.

Okay, here's what the system log looks like when we run a bad script: ``` Starting cloud-init: Cloud-init v. 0.7.6 running 'modules:final' at Thu, 23 Aug 2018 21:40:47 +0000. Up...

When successful, it looks like this: ``` Starting cloud-init: Cloud-init v. 0.7.6 running 'modules:final' at Thu, 23 Aug 2018 22:08:11 +0000. Up 19.67 seconds. + true ```

`curl http://169.254.169.254/latest/meta-data/instance-id` returns the instance ID. See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-retrieval for more info.

There's no guarantee that an instance can use ec2 to, for example, tag itself, but we are expecting to use s3. So we could have the script touch a key...