Skip to content

Missing examples for custom API Gateway Authorizers #1058

@mattiZed

Description

@mattiZed

Hey guys,
first of all, appreciate your work on the project. Building web applications for AWS Lambda with minimal cold-start times is something that I have long been waiting for.

I'm a bit of a rust noob still, and my first project is trying to port a API Gateway custom authorizer from python to rust. I'm struggling to understand how the classes from event::apigw are intended to be used.

Something like

let statement = IamPolicyStatement {
    action: vec!["execute-api:Invoke".to_string()],
    effect: IamPolicyEffect::Allow,
    resource: vec!["*".to_string()],
    condition: None
};

does not work, because IamPolicyStatement is set to 'non_exhaustive'. I also did not find a new() Ctor. Could you point me to some example where it's clear how these structs should be used?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions