Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/d-w-arnold/aws-ec2-examples

AWS EC2 user data source code, and other config files.
https://github.com/d-w-arnold/aws-ec2-examples

aws-ec2 cloud-init ec2-instance ec2-user-data shell

Last synced: 9 days ago
JSON representation

AWS EC2 user data source code, and other config files.

Awesome Lists containing this project

README

        

# aws-ec2-examples

What is [AWS EC2](https://aws.amazon.com/ec2/)?

This repo is a submodule of: [aws-cdk-examples](https://github.com/d-w-arnold/aws-cdk-examples)

### User Data

Each directory contains a `user-data.sh` script, which acts as the [EC2 user data](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html).

### Useful debug commands

Note: These commands are intended to be run on the EC2 instance which has the EC2 user data set.

#### Check which steps of EC2 User Data have run:

```bash
cat /var/log/cloud-init-output.log | grep "##"
```

#### Tail the last 200 lines of the output log for the EC2 User Data:

```bash
tail -f -n 200 /var/log/cloud-init-output.log
```

#### See user data passed to the EC2 instance.

```bash
curl -s http://instance-data/latest/user-data
```