awslabs / aws-apigateway-lambda-authorizer-blueprints

Blueprints and examples for Lambda-based custom Authorizers for use in API Gateway.
Apache License 2.0
704 stars 363 forks source link

Rust blueprint serialization issue #45

Open niroam opened 2 years ago

niroam commented 2 years ago

With the rust code, when building a policy the add_method uses this code to serialize the Method enum

serde_json::to_string(&method).unwrap()

this creates a policy with double quotes in the method ARN "arn:aws:execute-api:ap-southeast-2:XXXXXXXXXX:YYYYYYYYYY/ESTestInvoke-stage/\"*\"/*"

Consider using something like this instead ?

json!(&method).as_str().unwrap()