components
                                
                                 components copied to clipboard
                                
                                    components copied to clipboard
                            
                            
                            
                        AwsIamRole - it isn't possible to specify trust relationship policy document.
Currently it isn't possible to define trust relationship policy document for a role:
https://github.com/serverless/components/blob/765740cbfe74887d9028c94551cb86604f2598b2/registry/AwsIamRole/src/index.js#L97
Expected result:
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": [
          "lambda.amazonaws.com",
          "apigateway.amazonaws.com"
        ]
      },
      "Action": "sts:AssumeRole"
    },
    {
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::585857563047:role/externalRole"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
@kostjazvankovich good point, we should probably update this component to more accurately reflect the AWS API. AwsIamRole should be separated from AwsIamPolicy and we should be able to specify which policies to attach to the role through a property.
Works fine in 2.8.0, can be closed :)