All links of one day
in a single page.
<Previous day - Next day>

rss_feedDaily RSS Feed
floral_left The Daily Shaarli floral_right
——————————— February 22, 2017 - Wednesday 22, February 2017 ———————————
aws - iam - policy - separator - for - foreach - bash -
Warning : this loop does a lot of call to aws api, use it with caution

To know that I needed to list all policies and associated statements (for the default policy version)

```
#!/bin/bash
IFS=$'\n'
for line in $(aws iam list-policies|jq '.Policies|.[]|[ .PolicyName, .Arn, .DefaultVersionId ]| @csv' -r|sed 's/","/ /g'|sed 's/"//g'); do
    name=$(echo $line|cut -d' ' -f1);
    arn=$(echo $line|cut -d' ' -f2);
    version=$(echo $line|cut -d' ' -f3);
    echo "$name"
    aws iam get-policy-version --policy-arn $arn --version-id $version
done
```

Put this in a script, redirect output to a file and go get grep!
aws - beanstalk -

Since December 22th 2016 you are able to configure application version lifecycle in Beanstalk.

Very convenient, we can trash our custom api cleaning scripts :-)

-