Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Alexa skills trigger for lambda #9893

Closed
keedon opened this issue Nov 4, 2016 · 12 comments
Closed

Feature Request - Alexa skills trigger for lambda #9893

keedon opened this issue Nov 4, 2016 · 12 comments

Comments

@keedon
Copy link

keedon commented Nov 4, 2016

Please can you add the ability to add an Alexa trigger to lambda functoins.

Cheers

Keith

@apparentlymart
Copy link
Contributor

Hi @keedon. Thanks for the feature request!

We don't currently have any Alexa-specific resources in Terraform, so I assume there would be some foundational work here to support even basic interactions with Alexa.

I did some quick research to see if I could figure out what we'd need to add here, but my unfamiliarity with Alexa caused me to hit a wall; the docs for Alexa are not presented in the usual way AWS docs are supported, and are written more as a developer guide than as API docs, and thus it's hard to get a sense of what exactly Terraform would be interacting with in order to implement this.

Unfortunately, the "Triggers" UI in the AWS Lambda console does not have a direct equivalent in the underlying API, but instead is a higher-level abstraction over a number of service-specific APIs that need to be used to separately configure each integration. Thus in order to implement this we would need to figure out what underlying operations are performed when adding an Alexa Skills trigger in that UI.

Do you have familiarity with the APIs, if any, that can be used to set up the Alexa trigger? If you could point to the relevant API docs then it's more likely that I or someone else could pick out the relevant parts to add this to Terraform, though the additional caveat is that I don't have an any Alexa devices and so I'm not sure to what extent I'd be able to test such a thing.

@keedon
Copy link
Author

keedon commented Nov 6, 2016

I've had a look at the documentation, and there doesn't seem to be any api or cli method of adding a trigger, so I think this might be a non-starter. I'll keep an eye out and if this changes, I'll let you know

Cheers

Keith

@tim-wh
Copy link

tim-wh commented Nov 18, 2016

+1 for this, if and when API support is available

@stack72
Copy link
Contributor

stack72 commented Apr 18, 2017

Hi @keedon,

Thanks so much for the request for this enhancement!

While we'd love to see something like this, we don't currently have any plans to implement this ourselves. Until then, this issue is unlikely to see any movement and remain stale. We're trying to prune the stale issues (that aren't going to be addressed anytime soon) by closing them. Note that we only do this for enhancement requests and not bugs.

Thanks!

@stack72

@stack72 stack72 closed this as completed Apr 18, 2017
@flyinprogrammer
Copy link

for those who see this, all you need to do is add a permission resource like this:

resource "aws_lambda_permission" "with_alexa" {
  statement_id  = "AllowExecutionFromAlexa"
  action        = "lambda:InvokeFunction"
  function_name = "${aws_lambda_function.my-function.function_name}"
  principal     = "alexa-appkit.amazon.com"
}

@apparentlymart
Copy link
Contributor

Oh good.. thanks @flyinprogrammer!

@gurpreetatwal
Copy link

Should this be added as an example in the docs?

@apparentlymart
Copy link
Contributor

Since we don't currently have any Alexa-related resources there isn't a great place to put an example like that; it doesn't really scale for us to show on the lambda resource docs how to use every separate AWS service with it. However, if there's a section of the AWS Lambda manual we could link to that in turn links to guides for using different services with Lambda we could potentially link to that, which will presumably be more useful since AWS will continue to update it as new services are added.

@flyinprogrammer
Copy link

Maybe this is a happy medium?

hashicorp/terraform-provider-aws#1188

I'm just herpin' and derpin'.

@gurpreetatwal
Copy link

I was thinking something along the lines of what @flyinprogrammer PR'd but I also see the concern of having to update the docs for every possible trigger that AWS may add.

Right now the API Gateway docs have an example which creates aws_lambda_permission resource, but I found that to be very confusing. I did not realize until today that the aws_lambda_permission resource was equivalent to adding a trigger on the console.

@flyinprogrammer
Copy link

flyinprogrammer commented Jul 19, 2017

but I also see the concern of having to update the docs for every possible trigger that AWS may add.

I definitely agree that this will become a documentation nightmare in the mid-long term future.

@ghost
Copy link

ghost commented Apr 8, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants