Skip to content

[aws-iam] FederatedPrincipal conditions property should not be required. #11139

@JordanDeBeer

Description

@JordanDeBeer

When creating an iam.FederatedPrincipal, the conditions parameter is required. This property should be optional.

Reproduction Steps

new iam.FederatedPrincipal('cognito-identity.amazonaws.com')

What did you expect to happen?

The principal would be returned and the FederatedPrincipal added to the policy.

What actually happened?

lib/streamer-badge-live.ts:46:22 - error TS2554: Expected 2-3 arguments, but got 1.

46         principals: [new iam.FederatedPrincipal("aws-cognito")],
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@aws-cdk/aws-iam/lib/principals.d.ts:364:36
    364     constructor(federated: string, conditions: Conditions, assumeRoleAction?: string);
                                           ~~~~~~~~~~~~~~~~~~~~~~
    An argument for 'conditions' was not provided.

Environment

  • **CLI Version :1.70.0
  • **Framework Version: 1.70.0
  • **Node.js Version:v12.18.3
  • **OS : Linux
  • **Language (Version):all

Other


This is 🐛 Bug Report

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-iamRelated to AWS Identity and Access ManagementbugThis issue is a bug.effort/smallSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions