- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.3k
Closed
Labels
@aws-cdk/aws-apigatewayRelated to Amazon API GatewayRelated to Amazon API GatewaydocumentationThis is a problem with documentation.This is a problem with documentation.language/pythonRelated to Python bindingsRelated to Python bindingsneeds-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.
Description
Example code has errors.
The example code has a couple of errors, with the iam.PolicyStatement. They look like issues with the automatic translation.
iam_user.attach_inline_policy(iam.Policy(self, "AllowBooks",
    statements=[
        iam.PolicyStatement(
            actions=["execute-api:Invoke"],
            effect=iam.Effect.Allow,                                          #  (1) should be  effect = iam.Effect.ALLOW
            resources=[get_books.method_arn()]                     # (2) should be resources = [ get_books.method_arn ]
(1) iam.Effect.Allow is not defined.. ALLOW needs to be capitalized
(2)  get_books.method_arn  is the attribute  its not a function to be called. This is a 📕 documentation issue
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-apigatewayRelated to Amazon API GatewayRelated to Amazon API GatewaydocumentationThis is a problem with documentation.This is a problem with documentation.language/pythonRelated to Python bindingsRelated to Python bindingsneeds-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.