sparse-intern-71089
09/19/2022, 4:56 PMearly-keyboard-41388
09/19/2022, 4:58 PMaws lambda add-permission --function-name "arn:aws:lambda:<region>:<account>:function:graphql:${stageVariables.GRAPHQL_ALIAS}" --source-arn "arn:aws:execute-api:<region>:<account>:<resource>/*/POST/graphql" --principal <http://apigateway.amazonaws.com|apigateway.amazonaws.com> --statement-id <statement_id> --action lambda:InvokeFunction
Got this from the AWS console (Api Gateway) for adding the lambda with the ${stageVariables}
in it.witty-candle-66007
09/19/2022, 4:59 PMearly-keyboard-41388
09/19/2022, 5:00 PMstageVariables
out of the stage.
Like from here: https://docs.aws.amazon.com/apigateway/latest/developerguide/amazon-api-gateway-using-stage-variables.htmlwitty-candle-66007
09/19/2022, 5:01 PMwitty-candle-66007
09/19/2022, 5:09 PMexport const goo = pulumi.concat("arn:aws:lambda:",aws.config.region,"blah blah ${stageVariables.GRAPHQL_ALIAS}:",bucket.id)
export const foo = pulumi.interpolate `arn:aws:lambda:${aws.config.region} blah blah \$\{stageVariables.GRAPHQL_ALIAS\}:${bucket.id}`
`witty-candle-66007
09/19/2022, 5:09 PMearly-keyboard-41388
09/19/2022, 5:11 PM:\${stageVariables.GRAPHQL_ALIAS}
Do it like this?
:\$\{stageVariables.GRAPHQL_ALIAS\}
early-keyboard-41388
09/19/2022, 5:14 PMPermission
for the lambda with the alias as the stageVariables
, it fails due to
"function_name" doesn't comply with restrictions
.
Maybe I’m using the wrong resource to do it..early-keyboard-41388
09/19/2022, 5:18 PMwitty-candle-66007
09/19/2022, 5:22 PM