Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
executable file 17 lines (14 sloc) 903 Bytes
#!/bin/sh
[ $# -eq 0 ] && { echo "Usage: $0 name_of_idp "; exit 1; }
# call to create the saml provider in the AWS accounts
aws iam create-saml-provider --saml-metadata-document file://idp.xml --name $1 --profile=$2
if [ $? -ne 0 ]
then
echo "creation failed, read the readme and make sure you have an IAM role to perform this action"
exit 1
fi
# create iam roles that saml users can assume, currently administrator or readonly roles:
aws iam create-role --role-name administrator --assume-role-policy-document file://shibpolicy.json --profile=$2
aws iam attach-role-policy --role-name administrator --policy-arn arn:aws:iam::aws:policy/AdministratorAccess --profile=$2
aws iam create-role --role-name readonly --assume-role-policy-document file://shibpolicy.json --profile=$2
aws iam attach-role-policy --role-name readonly --policy-arn arn:aws:iam::aws:policy/ReadOnlyAccess --profile=$2
You can’t perform that action at this time.