Is there a way to pass apigateway.Method arguments...
# general
h
Is there a way to pass apigateway.Method arguments to apigateway.x.API()? I am having a hard time tracking
apiKeyRequired
and use of apigateway.Method at all (I have an apikey, usageplan, and usageplankey)
w
There is not currently. We will ideally add 1st class support for API keys to
API
. In the meantime, if you need to use those you may need to either create the individual resources directly, or use the overload of the constructor that allows passing an OpenAPI Json spec, which would I believe let you embed API key and other details. Cc also @lemon-spoon-91807.
h
I moved into doing it separately and setting up Integration has been causing lots of issues — I used
Copy code
const demo_lambda_uri = pulumi.interpolate
    `arn:aws:apigateway:${config.region}:lambda:path/2015-03-31/functions/${demo_lambda.arn}/invocations`;
to get a uri to pass to Integration… and I consistnetly get the AWS error`Invalid ARN specified in the request`
(my arn for my lambda does not have any wacky characters and I believe I am following what’s in the docs for
.Integration
)
l
does that uri work if you were to manually do this through the aws console?
h
yep 😕 maybe config.region isn’t returning. I will let you know
l
let me rephrase 🙂 do you know the final value being produced for demo_lambda_uri ? if you try to use that value yourself from the aws console do you get the same issue?
h
I’m gonna kill my stack and clena up config cause that value isn’t coming through properly 🙂 sorry for bothering you!
l
no bother at all!
hopefully this isn't too frustrating
h
it’s been ok - I appreciate the team’s support! this one is resolved (the namespaces setup in config wasn’t clear to me in the docs, but now I appreciate it)