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

add IoT 1-Click event #371

Merged
merged 1 commit into from May 22, 2021
Merged

add IoT 1-Click event #371

merged 1 commit into from May 22, 2021

Conversation

shirakiya
Copy link
Contributor

Add event struct for IoT 1-Click ( https://docs.aws.amazon.com/iot-1-click/latest/developerguide/1click-programming.html ).
I assume that we can type the event for lambda handler using this event struct.

import (
  	"github.com/aws/aws-lambda-go/lambda"
	"github.com/aws/aws-lambda-go/events"
)

func handleRequest(ctx context.Context, event events.IoTOneClickEvent) {
	...
}

func main() {
	lambda.Start(handleRequest)
}

I used the sample JSON on the below page to specify the JSON structure.
https://docs.aws.amazon.com/iot-1-click/latest/developerguide/1click-programming.html#1click-events

@bmoffatt
Copy link
Collaborator

lgtm, thanks!

@bmoffatt bmoffatt merged commit e0b9a6c into aws:master May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants