Something like this should do the trick:
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
=> add(store = "Active Directory", types = ("claims:temp/attribute1","claims:temp/attribute2"), query = ";ad-attribute1,ad-attribute2;{0}", param = c.Value);
c1:[Type == "claims:temp/attribute1"] && c2:[Type == "claims:temp/attribute2"]
=> issue(Type = "https://aws.amazon.com/SAML/Attributes/Role", Value = "arn:aws:iam::" + c2.Value ":saml-provider/our-adfs,arn:aws:iam::" + c2.Value ":role/" + c1.Value);
You would need to replace the name of the attribute you are really using in the first rule ad-attribute1 and ad-attribute2 and it is assuming that the final format is what you really need.