question

hichamt avatar image
hichamt asked

API functions to Create/Update/Delete Lambda functions ?

Hi all I am working on an automation system for Alexa Lambda functions that: 1/ Create a new function + getting the ARN in the response 2/ Update a function 3/ Delete a function Is there way to this with an API ? Thanks a lot Hicham
alexa skills kitsubmission testing certification
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jjaquinta avatar image
jjaquinta answered
I have not seen any way to do this presently. Nor can you create/update/delete Alexa skills. But, given Amazons obsession with APIs, I suspect they will get around to this in a year or so. I think I put in a request for this. (Search for 'devops'.)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Nick Gardner avatar image
Nick Gardner answered
There are already existing AWS APIs which will allow you to create, update, and delete Lambda functions. You can find these in the various AWS SDKs for various languages found here: https://aws.amazon.com/tools/. Additionally, you can directly view the API reference for AWS Lambda and the supported functions here: http://docs.aws.amazon.com/lambda/latest/dg/API_Operations.html. To create a fully functional Alexa skill, you will still need to enter your skill information, including your intent schema and utterances, in the developer portal. Thanks, Nick
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Matt Kruse avatar image
Matt Kruse answered
The AWS API's already have the ability to do this, but it's not very easy to use. What language/technology are you using? If javascript, then check out some of the modules on npm that make this easier, especially as part of a grunt task. Also check out JAWS: https://github.com/jaws-framework/JAWS It's a bit of overkill, perhaps, but it lets you fully development a suite of lambda functions locally and deploy them automatically from the command-line.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

hichamt avatar image
hichamt answered
Hi folks I successfully created and updated my lambda function, still missing one last step => Do you know if it's possible to automatically add "Alexa Skills Kit" as an Event Source for a lambda function via the API ? Thanks in advance !!!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

hichamt avatar image
hichamt answered
seems to be here => http://docs.aws.amazon.com/lambda/latest/dg/API_CreateEventSourceMapping.html still not sure what to put here { "BatchSize": number, "Enabled": boolean, "EventSourceArn": "string", "FunctionName": "string", "StartingPosition": "string" }
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Matt Kruse avatar image
Matt Kruse answered
You will probably hit the same snag I did, looking for the ARN, so see this: https://forums.developer.amazon.com/forums/thread.jspa?messageID=26200
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

hichamt avatar image
hichamt answered
thanks Matt ! did the CLI command worked for you ?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Matt Kruse avatar image
Matt Kruse answered
I haven't had a chance to try it yet. Let me know if you do and if it works for you.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

hichamt avatar image
hichamt answered
Hi Matt, the command worked like a charm, thanks for sharing :) Best Hicham
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.