This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$NewIAMPolicy1 = New-IAMPolicy -PolicyName 'Policy-EBSSnapshot' -PolicyDocument (Get-Content -Raw Policy-EBSSnapshot.json) -Description 'Policy to take Snapshot of EBS volumes.' | |
$NewIAMRole1 = New-IAMRole -AssumeRolePolicyDocument (Get-Content -raw AssumeRolePolicy-Lambda.json) -RoleName "Role-EBS-Snapshot" -Description 'Allows Lambda Function to call AWS services on your behalf.' | |
Register-IAMRolePolicy -RoleName "Role-EBS-Snapshot" -PolicyArn $NewIAMPolicy1.arn | |
$NewIAMPolicy2 = New-IAMPolicy -PolicyName 'Policy-LambdaInvoke' -PolicyDocument (Get-Content -Raw Policy-LambdaInvoke.json) -Description 'Policy to Invoke Lambda Function.' | |
$NewIAMRole2 = New-IAMRole -AssumeRolePolicyDocument (Get-Content -raw AssumeRolePolicy-StepFunction.json) -RoleName "Role-Lambda-Invoke" -Description 'Allows Step Function to call AWS services on your behalf.' | |
Register-IAMRolePolicy -RoleName "Role-Lambda-Invoke" -PolicyArn $NewIAMPolicy2.arn | |
$NewIAMPolicy3 = New-IAMPolicy -PolicyName 'Policy |
NewerOlder