I would do something like 
```
command -v ec2metadata >/dev/null 2>&1 && {  INSTANCE_ID=$(ec2metadata --instance-id); }
```
so that users who aren't on AWS can still use this profile.