Skip to content
This repository was archived by the owner on Mar 2, 2023. It is now read-only.

Latest commit

History

67 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

AWSIAM

AWS IAM Interface for Julia

Build Status

using AWSIAM
aws = AWSCore.aws_config()
println(iam_whoami(aws))
creds =iam_create_user(aws, "my_user")
@protectedtryiam(aws, Action ="CreateRole",
Path ="/",
RoleName = name,
AssumeRolePolicyDocument ="""{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com" }, "Action": "sts:AssumeRole" } ] }""")
catch e
@ignoreif e.code =="EntityAlreadyExists"endendiam(aws, Action ="PutRolePolicy",
RoleName = name,
PolicyName = name,
PolicyDocument = Policy)
@protectedtryiam(aws, Action ="CreateInstanceProfile",
InstanceProfileName = name,
Path ="/")
catch e
@ignoreif e.code =="EntityAlreadyExists"endend@repeat2tryiam(aws, Action ="AddRoleToInstanceProfile",
InstanceProfileName = name,
RoleName = name)
catch e
@retryif e.code =="LimitExceeded"iam(aws, Action ="RemoveRoleFromInstanceProfile",
InstanceProfileName = name,
RoleName = name)
endend

About

AWS IAM Identity and Access Management interface for Julia

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages