{"id":1207592,"date":"2021-05-05T11:00:37","date_gmt":"2021-05-05T18:00:37","guid":{"rendered":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=1207592"},"modified":"2021-05-05T11:05:50","modified_gmt":"2021-05-05T18:05:50","slug":"integrating-arcgis-survey123-with-aws-lambda","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda","title":{"rendered":"Integrating ArcGIS Survey123 with AWS Lambda"},"author":83632,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[37501,615021,738191],"tags":[28321,42301,350642,42371,350622],"industry":[],"product":[36571,36551,36691,36601],"class_list":["post-1207592","blog","type-blog","status-publish","format-standard","hentry","category-administration","category-aec","category-developers","tag-amazon-web-services","tag-arcgis-enterprise","tag-aws-lambda","tag-survey123","tag-webhooks","product-arcgis-enterprise","product-arcgis-online","product-survey123","product-developers"],"acf":{"short_description":"Learn how to integrate ArcGIS Survey123 (and other tips and tricks) with AWS Lambda to create webhooks.","flexible_content":[{"acf_fc_layout":"content","content":"<p style=\"text-align: justify\">This is a follow-up to my previous blog post on <a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/api-python\/developers\/integrating-the-arcgis-api-for-python-and-survey123-with-azure-functions\/\">integrating the ArcGIS API for Python and Survey123 with Azure Functions<\/a>. In that post, I highlighted two separate solutions using Azure Functions. While it is not necessary, it would be worthwhile to give it read to understand some of the context behind the use of serverless functions in the ArcGIS platform.<\/p>\n<p style=\"text-align: justify\">The first solution in my original post outlined the process for setting up an Azure Function with the ArcGIS API for Python. This is certainly possible in AWS Lambda but there are some limitations, such as building a <a href=\"https:\/\/developers.arcgis.com\/python\/guide\/install-and-set-up\/#Install-with-minimum-dependencies\">minimum dependencies package<\/a> in a Linux environment due to strict size requirements imposed for Lambda. I will not be focusing on that integration here as it would take another blog post entirely to address the steps.<\/p>\n<p style=\"text-align: justify\">The intent of this post is to really walk you through that process of setting up a webhook using an <a href=\"https:\/\/aws.amazon.com\/api-gateway\/\">API Gateway<\/a> and <a href=\"https:\/\/aws.amazon.com\/lambda\/\">Lambda<\/a> in AWS, as well as some bonus security tips on setting up a custom Lambda authorizer for the API Gateway. The end goal of sending an email notification when a response is submitted in Survey123 is pretty much the same as the second solution in my previous post. You can find the code samples used throughout this post on <a href=\"https:\/\/github.com\/EsriPS\/ArcGIS-Blog-Samples\/tree\/main\/Integrating%20AWS%20Lambda%20with%20ArcGIS\">GitHub<\/a>.<\/p>\n"},{"acf_fc_layout":"sidebar","content":"<p>To get the most out of this blog post, the following prerequisites are recommended:<\/p>\n<ul>\n<li>Moderate experience with Python and\/or JavaScript<\/li>\n<li>Moderate experience with creating and administering surveys in Survey123<\/li>\n<li>Minimal experience with AWS Lambda and API Gateway<\/li>\n<\/ul>\n","image_reference":false,"layout":"standard","image_reference_figure":"","snippet":"","spotlight_name":"","section_title":"","position":"Center","spotlight_image":false},{"acf_fc_layout":"content","content":"<h2>Setting Up The Lambda Function<\/h2>\n<p style=\"text-align: justify\">1. In the AWS console, look for Lambda under <strong>Services<\/strong> or search for it in the search bar. The console should bring you to the <strong>Functions<\/strong> page.<br \/>\n2. Click <strong>Create function<\/strong>. You will be presented with four different options to create your new function.<\/p>\n<ul>\n<li style=\"text-align: justify\">For this guide, leave the default <strong>Author from scratch<\/strong> selected.<\/li>\n<li style=\"text-align: justify\">Give your function a unique name.<\/li>\n<li style=\"text-align: justify\">You can choose whatever Runtime environment with which you are comfortable, but seeing as my sample has been written in Python I will select the Python 3.8 environment.<\/li>\n<li style=\"text-align: justify\">Leave the other defaults as-is and proceed with creating your function.<\/li>\n<\/ul>\n"},{"acf_fc_layout":"image","image":{"ID":1207762,"id":1207762,"title":"Create Lambda Function","filename":"create_function.png","filesize":56813,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/create_function.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/create_function","alt":"Filled in options for creating a Lambda Function","author":"83632","description":"","caption":"","name":"create_function","status":"inherit","uploaded_to":1207592,"date":"2021-04-21 20:41:39","modified":"2021-04-21 20:43:14","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1365,"height":679,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/create_function-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/create_function.png","medium-width":464,"medium-height":231,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/create_function.png","medium_large-width":768,"medium_large-height":382,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/create_function.png","large-width":1365,"large-height":679,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/create_function.png","1536x1536-width":1365,"1536x1536-height":679,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/create_function.png","2048x2048-width":1365,"2048x2048-height":679,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/create_function-826x411.png","card_image-width":826,"card_image-height":411,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/create_function.png","wide_image-width":1365,"wide_image-height":679}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p style=\"text-align: justify\">3. You should be brought to an overview page with the Code tab open by default once your function is successfully created. Most of our time will be spent on this and the <strong>Configuration<\/strong> tabs.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1207772,"id":1207772,"title":"Overview Page","filename":"overview_page.png","filesize":55276,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/overview_page.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/overview_page","alt":"Overview page for a Lambda Function.","author":"83632","description":"","caption":"","name":"overview_page","status":"inherit","uploaded_to":1207592,"date":"2021-04-21 20:46:18","modified":"2021-04-21 20:46:47","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1649,"height":821,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/overview_page-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/overview_page.png","medium-width":464,"medium-height":231,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/overview_page.png","medium_large-width":768,"medium_large-height":382,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/overview_page.png","large-width":1649,"large-height":821,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/overview_page-1536x765.png","1536x1536-width":1536,"1536x1536-height":765,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/overview_page.png","2048x2048-width":1649,"2048x2048-height":821,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/overview_page-826x411.png","card_image-width":826,"card_image-height":411,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/overview_page.png","wide_image-width":1649,"wide_image-height":821}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p style=\"text-align: justify\">4. Double-click the <strong>lambda_function.py<\/strong> file in the <strong>Code source<\/strong> pane. You should see some sample code in your editor. Essentially, this <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/python-handler.html\">function handler<\/a> is where all the magic happens; in more technical terms, where the code executes when the function is invoked by some type of event (trigger). The handler takes in two arguments: the event and context objects. Our focus will be on the event object as it will contain important information from Survey123 that is used to do some extra validation on the request in my code to ensure its authenticity. I do want to point out that these validation checks are not entirely necessary (it is a bit superfluous for security-sake), but will provide you with an idea on how to traverse the request sent to the handler.<\/p>\n<ul>\n<li style=\"text-align: justify\">Delete all the sample code in the editor.<\/li>\n<li style=\"text-align: justify\">Copy and paste the code provided in the python file in the <a href=\"https:\/\/github.com\/EsriPS\/ArcGIS-Blog-Samples\/blob\/main\/Integrating%20AWS%20Lambda%20with%20ArcGIS\/S123%20Lambda%20Function\/lambda_function.py\">S123 Lambda Function<\/a> folder on GitHub within the editor. My sample code uses <a href=\"https:\/\/aws.amazon.com\/ses\/\">AWS SES<\/a> to send email notifications, but this code can be modified to use another email service (if using SES, ensure to input your sender and recipients in the sample). I want to draw your attention to lines 50-58 and 62-70, the return statements for the handler. The <a href=\"https:\/\/docs.aws.amazon.com\/apigateway\/latest\/developerguide\/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-output-format\">API Gateway expects a JSON object<\/a> to be returned by the Lambda function, particularly the status code, body, and any headers (more on that later).<\/li>\n<\/ul>\n"},{"acf_fc_layout":"image","image":{"ID":1207802,"id":1207802,"title":"Lambda Return Statements","filename":"return_statements.png","filesize":15173,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/return_statements.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/return_statements","alt":"Return statements from the Python Lambda function.","author":"83632","description":"","caption":"","name":"return_statements","status":"inherit","uploaded_to":1207592,"date":"2021-04-21 20:53:42","modified":"2021-04-21 20:54:41","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":552,"height":305,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/return_statements-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/return_statements.png","medium-width":464,"medium-height":256,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/return_statements.png","medium_large-width":552,"medium_large-height":305,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/return_statements.png","large-width":552,"large-height":305,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/return_statements.png","1536x1536-width":552,"1536x1536-height":305,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/return_statements.png","2048x2048-width":552,"2048x2048-height":305,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/return_statements.png","card_image-width":552,"card_image-height":305,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/return_statements.png","wide_image-width":552,"wide_image-height":305}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<ul>\n<li style=\"text-align: justify\">Click <strong>Deploy<\/strong> to save the changes.<\/li>\n<\/ul>\n"},{"acf_fc_layout":"image","image":{"ID":1207832,"id":1207832,"title":"deploy_highlighted","filename":"deploy_highlighted.png","filesize":29329,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_highlighted.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/deploy_highlighted","alt":"Deploy text highlighted in red to save the Lambda function changes.","author":"83632","description":"","caption":"","name":"deploy_highlighted","status":"inherit","uploaded_to":1207592,"date":"2021-04-21 21:03:11","modified":"2021-04-21 21:10:22","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":842,"height":659,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_highlighted-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_highlighted.png","medium-width":333,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_highlighted.png","medium_large-width":768,"medium_large-height":601,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_highlighted.png","large-width":842,"large-height":659,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_highlighted.png","1536x1536-width":842,"1536x1536-height":659,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_highlighted.png","2048x2048-width":842,"2048x2048-height":659,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_highlighted-594x465.png","card_image-width":594,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_highlighted.png","wide_image-width":842,"wide_image-height":659}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p style=\"text-align: justify\">5. Let\u2019s head over to the <strong>Configuration<\/strong> tab to make one more change.<\/p>\n<ul>\n<li style=\"text-align: justify\">Under <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/configuration-envvars.html\">Environment variables<\/a>, select <strong>Edit<\/strong> and add the three variables (key\/value pairs) used in the script.<\/li>\n<\/ul>\n"},{"acf_fc_layout":"image","image":{"ID":1207882,"id":1207882,"title":"Environment Variables","filename":"environment_variables.png","filesize":14753,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/environment_variables.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/environment_variables","alt":"The three environment variables used in the lambda function.","author":"83632","description":"","caption":"","name":"environment_variables","status":"inherit","uploaded_to":1207592,"date":"2021-04-21 21:12:22","modified":"2021-04-21 21:12:48","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":680,"height":282,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/environment_variables-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/environment_variables.png","medium-width":464,"medium-height":192,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/environment_variables.png","medium_large-width":680,"medium_large-height":282,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/environment_variables.png","large-width":680,"large-height":282,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/environment_variables.png","1536x1536-width":680,"1536x1536-height":282,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/environment_variables.png","2048x2048-width":680,"2048x2048-height":282,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/environment_variables.png","card_image-width":680,"card_image-height":282,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/environment_variables.png","wide_image-width":680,"wide_image-height":282}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p style=\"text-align: justify\">6. Our function is now completely setup and ready to be invoked by a <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/lambda-invocation.html\">trigger<\/a>.<\/p>\n<ul>\n<li>In the <strong>Function overview<\/strong> pane, select <strong>Add trigger<\/strong>. Choose the following options for the <strong>Trigger configuration<\/strong> and leave the defaults under the <strong>Additional settings<\/strong>.<\/li>\n<\/ul>\n"},{"acf_fc_layout":"image","image":{"ID":1207892,"id":1207892,"title":"Trigger Configuration","filename":"trigger_configuration.png","filesize":48666,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_configuration.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/trigger_configuration","alt":"All the completed options for adding a trigger to a Lambda function.","author":"83632","description":"","caption":"","name":"trigger_configuration","status":"inherit","uploaded_to":1207592,"date":"2021-04-21 21:15:08","modified":"2021-04-21 21:15:44","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":822,"height":703,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_configuration-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_configuration.png","medium-width":305,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_configuration.png","medium_large-width":768,"medium_large-height":657,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_configuration.png","large-width":822,"large-height":703,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_configuration.png","1536x1536-width":822,"1536x1536-height":703,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_configuration.png","2048x2048-width":822,"2048x2048-height":703,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_configuration-544x465.png","card_image-width":544,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_configuration.png","wide_image-width":822,"wide_image-height":703}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<ul>\n<li>Select <strong>Add<\/strong> to add the trigger to your Lambda function. You should see the new API Gateway trigger under <strong>Triggers<\/strong> in the <strong>Configuration<\/strong> tab. Select the trigger link to proceed with setting up the API Gateway.<\/li>\n<\/ul>\n"},{"acf_fc_layout":"image","image":{"ID":1207912,"id":1207912,"title":"Trigger Link","filename":"trigger_link.png","filesize":15616,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_link.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/trigger_link","alt":"The trigger link (after being added to the function) is highlighted in red.","author":"83632","description":"","caption":"","name":"trigger_link","status":"inherit","uploaded_to":1207592,"date":"2021-04-21 21:17:01","modified":"2021-04-21 21:17:51","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":774,"height":257,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_link-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_link.png","medium-width":464,"medium-height":154,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_link.png","medium_large-width":768,"medium_large-height":255,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_link.png","large-width":774,"large-height":257,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_link.png","1536x1536-width":774,"1536x1536-height":257,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_link.png","2048x2048-width":774,"2048x2048-height":257,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_link.png","card_image-width":774,"card_image-height":257,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/trigger_link.png","wide_image-width":774,"wide_image-height":257}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h2 style=\"text-align: justify\">Configuring the API Gateway<\/h2>\n<p style=\"text-align: justify\">The API Gateway is one of the most critical components in this workflow, as it creates and exposes a REST endpoint to which the Survey123 request is sent. As of right now, this endpoint will not work since we have not configured <a href=\"https:\/\/docs.aws.amazon.com\/apigateway\/latest\/developerguide\/how-to-cors.html\">Cross-origin resource sharing (CORS)<\/a> for our API. This is entirely due to the fact that the HTTP request is non-simple, requiring a <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Glossary\/Preflight_request\">preflight request<\/a> to be sent to the server for verification. If you selected the API Gateway link after setting up the trigger in the Lambda function, you should be brought to the Resources page for your API.<\/p>\n<p style=\"text-align: justify\">1. Select <strong>Actions<\/strong> and then <strong>Enable CORS<\/strong><\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1209482,"id":1209482,"title":"Enable CORS","filename":"enable_cors.png","filesize":29940,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/enable_cors","alt":"Enable Cors button is highlighted in red in the API Gateway configuration page.","author":"83632","description":"","caption":"","name":"enable_cors","status":"inherit","uploaded_to":1207592,"date":"2021-04-22 13:43:25","modified":"2021-04-22 13:44:13","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":635,"height":492,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors.png","medium-width":337,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors.png","medium_large-width":635,"medium_large-height":492,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors.png","large-width":635,"large-height":492,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors.png","1536x1536-width":635,"1536x1536-height":492,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors.png","2048x2048-width":635,"2048x2048-height":492,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors-600x465.png","card_image-width":600,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors.png","wide_image-width":635,"wide_image-height":492}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p style=\"text-align: justify\">2. The only default option we will change is the <strong>Access-Control-Allow-Origin<\/strong>. As of right now, it is set to a wildcard (*), allowing requests to come from any origin. Let\u2019s change that to only allow those requests from the Survey123 website. Change the wildcard to <a href=\"https:\/\/survey123.arcgis.com\/\">https:\/\/survey123.arcgis.com<\/a>. Those three headers should also look familiar to you, since they were included in our return statement in the Lambda function. If you were to remove those headers, our function would throw an error.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1209492,"id":1209492,"title":"Enable CORS Configuration","filename":"enable_cors_config.png","filesize":15668,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors_config.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/enable_cors_config","alt":"All of the completed options for enabling CORS on the API Gateway.","author":"83632","description":"","caption":"","name":"enable_cors_config","status":"inherit","uploaded_to":1207592,"date":"2021-04-22 13:46:36","modified":"2021-04-22 13:47:24","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":648,"height":333,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors_config-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors_config.png","medium-width":464,"medium-height":238,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors_config.png","medium_large-width":648,"medium_large-height":333,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors_config.png","large-width":648,"large-height":333,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors_config.png","1536x1536-width":648,"1536x1536-height":333,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors_config.png","2048x2048-width":648,"2048x2048-height":333,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors_config.png","card_image-width":648,"card_image-height":333,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/enable_cors_config.png","wide_image-width":648,"wide_image-height":333}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p style=\"text-align: justify\">3. Click <strong>Enable CORS and replace existing CORS headers<\/strong> and <strong>Yes, replace existing values<\/strong> at the next prompt. If you do not see any errors during the configuration, that means CORS was enabled successfully.<\/p>\n<p style=\"text-align: justify\">4. Next, we need to deploy our changes to our <strong>default<\/strong> <a href=\"https:\/\/docs.aws.amazon.com\/apigateway\/latest\/developerguide\/set-up-stages.html\">stage<\/a> to make it usable in the webhook process. This process essentially saves any changes you have made to your resources. Typically, you would follow a development lifecycle and deploy changes from dev -&gt; stag -&gt; prod to ensure things run smoothly. In the <strong>Resources<\/strong> pane, select <strong>Actions<\/strong> and then <strong>Deploy API<\/strong>.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1209502,"id":1209502,"title":"Deploy API Gateway","filename":"deploy_api.png","filesize":22904,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/deploy_api","alt":"The deploy API action is highlighted in red within the configuration page.","author":"83632","description":"","caption":"","name":"deploy_api","status":"inherit","uploaded_to":1207592,"date":"2021-04-22 13:49:35","modified":"2021-04-22 13:50:13","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":601,"height":374,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api.png","medium-width":419,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api.png","medium_large-width":601,"medium_large-height":374,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api.png","large-width":601,"large-height":374,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api.png","1536x1536-width":601,"1536x1536-height":374,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api.png","2048x2048-width":601,"2048x2048-height":374,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api.png","card_image-width":601,"card_image-height":374,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api.png","wide_image-width":601,"wide_image-height":374}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p style=\"text-align: justify\">5. In the pop-up box, you will be prompted to select a <strong>Deployment stage<\/strong>. You can either apply the changes to the default or create a new one.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1209512,"id":1209512,"title":"Deploy API Configuration","filename":"deploy_api_config.png","filesize":16411,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api_config.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/deploy_api_config","alt":"The default pop-up when deploying an API Gateway to a stage.","author":"83632","description":"","caption":"","name":"deploy_api_config","status":"inherit","uploaded_to":1207592,"date":"2021-04-22 13:51:12","modified":"2021-04-22 13:51:42","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":617,"height":330,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api_config-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api_config.png","medium-width":464,"medium-height":248,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api_config.png","medium_large-width":617,"medium_large-height":330,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api_config.png","large-width":617,"large-height":330,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api_config.png","1536x1536-width":617,"1536x1536-height":330,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api_config.png","2048x2048-width":617,"2048x2048-height":330,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api_config.png","card_image-width":617,"card_image-height":330,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/deploy_api_config.png","wide_image-width":617,"wide_image-height":330}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p style=\"text-align: justify\">6. Once the changes are deployed to the API Gateway, all we need to do now is to configure the webhook in our published survey.<\/p>\n<ul>\n<li style=\"text-align: justify\">In the <strong>Stages<\/strong> pane, you should be presented with your <strong>Invoke URL<\/strong> at the top of the page. Something to note, the <strong>Invoke URL<\/strong> presented on this page does not provide the complete path needed for our webhook. The complete URL should include the resource path. You can find your resource path by clicking the arrow next to your stage name. For example, my complete <strong>Invoke URL<\/strong> would be: <a href=\"https:\/\/randomid.execute-api.us-east-1.amazonaws.com\/default\/testEmailWebhooks\">https:\/\/randomid.execute-api.us-east-1.amazonaws.com\/default\/testEmailWebhooks<\/a>.<\/li>\n<\/ul>\n"},{"acf_fc_layout":"image","image":{"ID":1209522,"id":1209522,"title":"Invoke URL","filename":"invoke_url.png","filesize":68453,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/invoke_url.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/invoke_url","alt":"The default stage editor shows the invoke URL and resource path (highlighted in red) for the API Gateway.","author":"83632","description":"","caption":"","name":"invoke_url","status":"inherit","uploaded_to":1207592,"date":"2021-04-22 13:53:16","modified":"2021-04-22 13:54:14","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1891,"height":831,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/invoke_url-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/invoke_url.png","medium-width":464,"medium-height":204,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/invoke_url.png","medium_large-width":768,"medium_large-height":337,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/invoke_url.png","large-width":1891,"large-height":831,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/invoke_url-1536x675.png","1536x1536-width":1536,"1536x1536-height":675,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/invoke_url.png","2048x2048-width":1891,"2048x2048-height":831,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/invoke_url-826x363.png","card_image-width":826,"card_image-height":363,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/invoke_url.png","wide_image-width":1891,"wide_image-height":831}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<ul>\n<li style=\"text-align: justify\">Navigate to your published survey at the Survey123 website and proceed to the <strong>Add Webhook<\/strong> page under the <strong>Settings<\/strong> tab. Provide a unique <strong>Name<\/strong> for your webhook, paste your full <strong>Invoke URL<\/strong> into the <strong>Payload URL<\/strong>, and select <strong>Save<\/strong>.<\/li>\n<\/ul>\n"},{"acf_fc_layout":"image","image":{"ID":1209642,"id":1209642,"title":"S123 Webhook Configuration","filename":"s123_webhook.png","filesize":29410,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/s123_webhook.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/s123_webhook","alt":"The payload URL is highlighted in red in the S123 configuration page for a webhook.","author":"83632","description":"","caption":"","name":"s123_webhook","status":"inherit","uploaded_to":1207592,"date":"2021-04-22 15:18:23","modified":"2021-04-22 15:18:55","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1274,"height":745,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/s123_webhook-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/s123_webhook.png","medium-width":446,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/s123_webhook.png","medium_large-width":768,"medium_large-height":449,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/s123_webhook.png","large-width":1274,"large-height":745,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/s123_webhook.png","1536x1536-width":1274,"1536x1536-height":745,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/s123_webhook.png","2048x2048-width":1274,"2048x2048-height":745,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/s123_webhook-795x465.png","card_image-width":795,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/s123_webhook.png","wide_image-width":1274,"wide_image-height":745}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p style=\"text-align: justify\">7. Upon successful configuration, you should receive an email notification.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1209652,"id":1209652,"title":"Email Respone","filename":"email.png","filesize":16377,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/email.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/email","alt":"The email response from a successful S123 webhook.","author":"83632","description":"","caption":"","name":"email","status":"inherit","uploaded_to":1207592,"date":"2021-04-22 15:19:59","modified":"2021-04-22 15:20:29","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":741,"height":159,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/email-213x159.png","thumbnail-width":213,"thumbnail-height":159,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/email.png","medium-width":464,"medium-height":100,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/email.png","medium_large-width":741,"medium_large-height":159,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/email.png","large-width":741,"large-height":159,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/email.png","1536x1536-width":741,"1536x1536-height":159,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/email.png","2048x2048-width":741,"2048x2048-height":159,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/email.png","card_image-width":741,"card_image-height":159,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/email.png","wide_image-width":741,"wide_image-height":159}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<ul>\n<li style=\"text-align: justify\">If you need to debug any issues with the script in your Lambda Function, navigate to the <strong>Monitor<\/strong> tab for your Function in the AWS Console and select <strong>View logs in CloudWatch<\/strong>. These logs will provide you with more in-depth information to troubleshoot.<\/li>\n<\/ul>\n"},{"acf_fc_layout":"image","image":{"ID":1209662,"id":1209662,"title":"Cloud Watch in Lambda","filename":"cloud_watch.png","filesize":77160,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/cloud_watch.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/cloud_watch","alt":"The selection for View logs in CloudWatch are highlighted in red on the Lambda configuration page.","author":"83632","description":"","caption":"","name":"cloud_watch","status":"inherit","uploaded_to":1207592,"date":"2021-04-22 15:21:46","modified":"2021-04-22 15:22:31","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1641,"height":713,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/cloud_watch-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/cloud_watch.png","medium-width":464,"medium-height":202,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/cloud_watch.png","medium_large-width":768,"medium_large-height":334,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/cloud_watch.png","large-width":1641,"large-height":713,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/cloud_watch-1536x667.png","1536x1536-width":1536,"1536x1536-height":667,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/cloud_watch.png","2048x2048-width":1641,"2048x2048-height":713,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/cloud_watch-826x359.png","card_image-width":826,"card_image-height":359,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/cloud_watch.png","wide_image-width":1641,"wide_image-height":713}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h2 style=\"text-align: justify\">Throwing a Lambda authorizer into the mix (Optional)<\/h2>\n<p style=\"text-align: justify\">If you are like me and prefer a little more security implemented into your API Gateway, we can add a custom <a href=\"https:\/\/docs.aws.amazon.com\/apigateway\/latest\/developerguide\/apigateway-use-lambda-authorizer.html\">Lambda authorizer<\/a> to control who invokes the Lambda function attached to our REST API by parsing out specific information. Essentially, this will provide an extra layer of security to authenticate access to the Lambda function and thereby limiting its invocation to valid requests only.<\/p>\n<p>1. Navigate to the Lambda functions page in the AWS console and select <strong>Create function<\/strong>.<\/p>\n<ul>\n<li>Give your new function a name. Leave all the defaults, including the <strong>Runtime<\/strong> selection as Node.js (my example is in JavaScript as I found it easier to implement), and click <strong>Create function<\/strong>.<\/li>\n<\/ul>\n"},{"acf_fc_layout":"image","image":{"ID":1209672,"id":1209672,"title":"Authorizer Function","filename":"authorizer_function.png","filesize":43696,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_function.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/authorizer_function","alt":"Completed inputs for creating the authorizer function in Lambda.","author":"83632","description":"","caption":"","name":"authorizer_function","status":"inherit","uploaded_to":1207592,"date":"2021-04-22 15:24:25","modified":"2021-04-22 15:25:09","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":552,"height":783,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_function-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_function.png","medium-width":184,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_function.png","medium_large-width":552,"medium_large-height":783,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_function.png","large-width":552,"large-height":783,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_function.png","1536x1536-width":552,"1536x1536-height":783,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_function.png","2048x2048-width":552,"2048x2048-height":783,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_function-328x465.png","card_image-width":328,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_function.png","wide_image-width":552,"wide_image-height":783}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<ul>\n<li style=\"text-align: justify\">Double-click the <strong>index.js<\/strong> file in the <strong>Code source<\/strong> pane.<\/li>\n<li style=\"text-align: justify\">Delete all the sample code in the editor.<\/li>\n<li style=\"text-align: justify\">Copy and paste the code provided in the JavaScript file in the <a href=\"https:\/\/github.com\/EsriPS\/ArcGIS-Blog-Samples\/blob\/main\/Integrating%20AWS%20Lambda%20with%20ArcGIS\/Custom%20Lambda%20Authorizer\/index.js\">Custom Lambda Authorizer folder<\/a> on GitHub within the editor. My sample code verifies the survey\u2019s item ID and organization\u2019s URL based upon what is returned in the headers of the request. If the values in the headers match up with the values stored in the Environment variables, the authorizer will permit our function to be invoked. Otherwise, the browser will return an Unauthorized response.<\/li>\n<li style=\"text-align: justify\">Click <strong>Deploy<\/strong> to save the changes.<\/li>\n<\/ul>\n"},{"acf_fc_layout":"image","image":{"ID":1209682,"id":1209682,"title":"Authorizer Code","filename":"authorizer_code.png","filesize":55897,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_code.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/authorizer_code","alt":"The JavaScript code used in the Lambda authorizer.","author":"83632","description":"","caption":"","name":"authorizer_code","status":"inherit","uploaded_to":1207592,"date":"2021-04-22 15:27:21","modified":"2021-04-22 15:27:53","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1151,"height":698,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_code-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_code.png","medium-width":430,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_code.png","medium_large-width":768,"medium_large-height":466,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_code.png","large-width":1151,"large-height":698,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_code.png","1536x1536-width":1151,"1536x1536-height":698,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_code.png","2048x2048-width":1151,"2048x2048-height":698,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_code-767x465.png","card_image-width":767,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/authorizer_code.png","wide_image-width":1151,"wide_image-height":698}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p style=\"text-align: justify\">2. In the <strong>Configuration<\/strong> tab under <strong>Environment variables<\/strong>, select <strong>Edit<\/strong> and add the two variables used in the script.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1209692,"id":1209692,"title":"Authorizer Environment Variables","filename":"auth_env_variables.png","filesize":12572,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/auth_env_variables.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/auth_env_variables","alt":"The two environment variables used in the Lambda authorizer function.","author":"83632","description":"","caption":"","name":"auth_env_variables","status":"inherit","uploaded_to":1207592,"date":"2021-04-22 15:29:26","modified":"2021-04-22 15:30:43","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":640,"height":238,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/auth_env_variables-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/auth_env_variables.png","medium-width":464,"medium-height":173,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/auth_env_variables.png","medium_large-width":640,"medium_large-height":238,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/auth_env_variables.png","large-width":640,"large-height":238,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/auth_env_variables.png","1536x1536-width":640,"1536x1536-height":238,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/auth_env_variables.png","2048x2048-width":640,"2048x2048-height":238,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/auth_env_variables.png","card_image-width":640,"card_image-height":238,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/auth_env_variables.png","wide_image-width":640,"wide_image-height":238}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p style=\"text-align: justify\">3. In your API Gateway, go to <strong>Authorizers<\/strong> and select <strong>Create New Authorizer<\/strong>.<\/p>\n<ul>\n<li style=\"text-align: justify\">Give it a unique name.<\/li>\n<li style=\"text-align: justify\">Leave the type as <strong>Lambda<\/strong>.<\/li>\n<li style=\"text-align: justify\">Search for the name of the function you just created for the authorizer under the <strong>Lambda Function<\/strong>.<\/li>\n<li style=\"text-align: justify\">Select <strong>Request<\/strong> under <strong>Lambda Event Payload. <\/strong>Ensure to delete the <strong>empty Identity Source<\/strong> that gets created under <strong>Identity Sources<\/strong>.<\/li>\n<li style=\"text-align: justify\">Disable <strong>Authorization Caching<\/strong> as we are not using any <strong>Identity Sources<\/strong>.<\/li>\n<li style=\"text-align: justify\">Click <strong>Create <\/strong>and<strong> Grant &amp; Create <\/strong>in the pop-up<strong>.<\/strong><\/li>\n<\/ul>\n"},{"acf_fc_layout":"image","image":{"ID":1209712,"id":1209712,"title":"API Gateway Authorizer","filename":"api_gateway_authorizer.png","filesize":13426,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/api_gateway_authorizer.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/api_gateway_authorizer","alt":"Completed configuration for creating an authorizer in the API Gateway.","author":"83632","description":"","caption":"","name":"api_gateway_authorizer","status":"inherit","uploaded_to":1207592,"date":"2021-04-22 15:32:19","modified":"2021-04-22 15:32:50","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":464,"height":612,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/api_gateway_authorizer-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/api_gateway_authorizer.png","medium-width":198,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/api_gateway_authorizer.png","medium_large-width":464,"medium_large-height":612,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/api_gateway_authorizer.png","large-width":464,"large-height":612,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/api_gateway_authorizer.png","1536x1536-width":464,"1536x1536-height":612,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/api_gateway_authorizer.png","2048x2048-width":464,"2048x2048-height":612,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/api_gateway_authorizer-353x465.png","card_image-width":353,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/api_gateway_authorizer.png","wide_image-width":464,"wide_image-height":612}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p style=\"text-align: justify\">4. The last step in this process is to apply the authorizer to a resource method in the API Gateway.<\/p>\n<ul>\n<li style=\"text-align: justify\">Navigate to the <strong>Resources<\/strong> pane and select the <strong>ANY<\/strong> resource.<\/li>\n<li style=\"text-align: justify\">On the <strong>Method Execution<\/strong> page for this resource, select <strong>Method Request<\/strong>.<\/li>\n<li style=\"text-align: justify\">Click the pencil icon next to <strong>Authorization<\/strong>. Select your custom authorizer under <strong>Request authorizer<\/strong> and click the checkmark (if you do not see it listed, you may need to refresh the page).<\/li>\n<li style=\"text-align: justify\">Select <strong>Actions<\/strong> and <strong>Deploy API<\/strong> to ensure the changes get saved to your stage.<\/li>\n<\/ul>\n"},{"acf_fc_layout":"image","image":{"ID":1209952,"id":1209952,"title":"Adding Authorizer to Method","filename":"2021-04-02_13-51-29.png","filesize":34599,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/2021-04-02_13-51-29.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\/2021-04-02_13-51-29","alt":"The process to add an authorizer to the ANY Method Request.","author":"83632","description":"","caption":"","name":"2021-04-02_13-51-29","status":"inherit","uploaded_to":1207592,"date":"2021-04-22 17:09:37","modified":"2021-04-22 17:10:40","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1565,"height":860,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/2021-04-02_13-51-29-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/2021-04-02_13-51-29.png","medium-width":464,"medium-height":255,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/2021-04-02_13-51-29.png","medium_large-width":768,"medium_large-height":422,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/2021-04-02_13-51-29.png","large-width":1565,"large-height":860,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/2021-04-02_13-51-29-1536x844.png","1536x1536-width":1536,"1536x1536-height":844,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/2021-04-02_13-51-29.png","2048x2048-width":1565,"2048x2048-height":860,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/2021-04-02_13-51-29-826x454.png","card_image-width":826,"card_image-height":454,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/2021-04-02_13-51-29.png","wide_image-width":1565,"wide_image-height":860}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p style=\"text-align: justify\">5. Retest your webhook through Survey123 to ensure it still works as expected. If you do not receive an email or get any errors in your browser\u2019s console, you can check the CloudWatch logs of your authorizer for more information. I would highly recommend viewing the logs regardless as it will give you an idea on how the request is presented to the authorizer, which differs from the one sent to your actual Lambda function for the webhook.<\/p>\n"},{"acf_fc_layout":"content","content":"<h2 style=\"text-align: justify\">Conclusion<\/h2>\n<p style=\"text-align: justify\">This blog post walked you through an example on integrating Survey123 webhooks with AWS Lambda and the API Gateway with some additional security suggestions to lock things down further. Lastly, it should be noted that this workflow in AWS can also be applied to other components of the ArcGIS platform.<\/p>\n"}],"authors":[{"ID":83632,"user_firstname":"Taylor","user_lastname":"Teske","nickname":"TTeske","user_nicename":"tteske","display_name":"Taylor Teske","user_email":"TTeske@esri.com","user_url":"","user_registered":"2020-08-17 14:33:05","user_description":"Taylor is a Technical Consultant in Professional Services out of Denver, CO, focusing on integrating the ArcGIS platform with other technologies and systems on-premise and in the cloud.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/08\/12000854_10204717383794222_8647597220309105249_o-465x465.jpg' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"}],"related_articles":[{"ID":969521,"post_author":"10512","post_date":"2020-09-10 05:00:46","post_date_gmt":"2020-09-10 12:00:46","post_content":"","post_title":"Integrating the ArcGIS API for Python and Survey123 with Azure Functions","post_excerpt":"","post_status":"publish","comment_status":"open","ping_status":"closed","post_password":"","post_name":"integrating-the-arcgis-api-for-python-and-survey123-with-azure-functions","to_ping":"","pinged":"","post_modified":"2021-05-05 06:27:06","post_modified_gmt":"2021-05-05 13:27:06","post_content_filtered":"","post_parent":0,"guid":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=969521","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"7","filter":"raw"},{"ID":387392,"post_author":"8152","post_date":"2019-04-02 10:04:24","post_date_gmt":"2019-04-02 17:04:24","post_content":"","post_title":"Webhooks - Don't call us, we'll call you","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"webhooks-dont-call-us-well-call-you","to_ping":"","pinged":"","post_modified":"2022-05-12 15:18:12","post_modified_gmt":"2022-05-12 22:18:12","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=387392","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"},{"ID":1166972,"post_author":"8272","post_date":"2021-03-23 06:30:15","post_date_gmt":"2021-03-23 13:30:15","post_content":"","post_title":"Use webhooks to automate workflows in ArcGIS Field Maps","post_excerpt":"","post_status":"publish","comment_status":"open","ping_status":"closed","post_password":"","post_name":"use-webhooks-to-automate-workflows-in-arcgis-field-maps","to_ping":"","pinged":"","post_modified":"2022-07-05 08:45:23","post_modified_gmt":"2022-07-05 15:45:23","post_content_filtered":"","post_parent":0,"guid":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=1166972","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"1","filter":"raw"},{"ID":456752,"post_author":"8282","post_date":"2019-03-18 09:00:31","post_date_gmt":"2019-03-18 16:00:31","post_content":"","post_title":"How we did it: Webhooks at Dev Summit 2019","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"webhooks-dev-summit-2019","to_ping":"","pinged":"","post_modified":"2019-04-03 10:42:19","post_modified_gmt":"2019-04-03 17:42:19","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=456752","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"},{"ID":120161,"post_author":"3991","post_date":"2013-07-30 10:15:54","post_date_gmt":"2013-07-30 10:15:54","post_content":"","post_title":"Scheduling a Python script or model to run at a prescribed time","post_excerpt":"","post_status":"publish","comment_status":"open","ping_status":"closed","post_password":"","post_name":"scheduling-a-python-script-or-model-to-run-at-a-prescribed-time","to_ping":"","pinged":"","post_modified":"2013-07-30 10:15:54","post_modified_gmt":"2013-07-30 10:15:54","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/products\/product\/uncategorized\/scheduling-a-python-script-or-model-to-run-at-a-prescribed-time\/","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"}],"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/Lambda-Blog-Post-Card.png","wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/Lambda-Blog-Post-Banner-smaller-2.png"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Integrating ArcGIS Survey123 with AWS Lambda<\/title>\n<meta name=\"description\" content=\"Walk through an example of how to integrate components of the ArcGIS platform with AWS Lambda to enhance established workflows.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Integrating ArcGIS Survey123 with AWS Lambda\" \/>\n<meta property=\"og:description\" content=\"Walk through an example of how to integrate components of the ArcGIS platform with AWS Lambda to enhance established workflows.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-05T18:05:50+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\"},\"author\":{\"name\":\"Taylor Teske\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/a912bf390e0eb74d92cebe8fa15ead5f\"},\"headline\":\"Integrating ArcGIS Survey123 with AWS Lambda\",\"datePublished\":\"2021-05-05T18:00:37+00:00\",\"dateModified\":\"2021-05-05T18:05:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\"},\"wordCount\":6,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"Amazon Web Services\",\"ArcGIS Enterprise\",\"AWS Lambda\",\"Survey123\",\"Webhooks\"],\"articleSection\":[\"Administration\",\"Architecture, Engineering, and Construction\",\"Developers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\",\"name\":\"Integrating ArcGIS Survey123 with AWS Lambda\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2021-05-05T18:00:37+00:00\",\"dateModified\":\"2021-05-05T18:05:50+00:00\",\"description\":\"Walk through an example of how to integrate components of the ArcGIS platform with AWS Lambda to enhance established workflows.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Integrating ArcGIS Survey123 with AWS Lambda\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/a912bf390e0eb74d92cebe8fa15ead5f\",\"name\":\"Taylor Teske\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/08\/12000854_10204717383794222_8647597220309105249_o-465x465.jpg\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/08\/12000854_10204717383794222_8647597220309105249_o-465x465.jpg\",\"caption\":\"Taylor Teske\"},\"description\":\"Taylor is a Technical Consultant in Professional Services out of Denver, CO, focusing on integrating the ArcGIS platform with other technologies and systems on-premise and in the cloud.\",\"sameAs\":[\"www.linkedin.com\/in\/taylor-teske-b37aaa71\"],\"url\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Integrating ArcGIS Survey123 with AWS Lambda","description":"Walk through an example of how to integrate components of the ArcGIS platform with AWS Lambda to enhance established workflows.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda","og_locale":"en_US","og_type":"article","og_title":"Integrating ArcGIS Survey123 with AWS Lambda","og_description":"Walk through an example of how to integrate components of the ArcGIS platform with AWS Lambda to enhance established workflows.","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2021-05-05T18:05:50+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda"},"author":{"name":"Taylor Teske","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/a912bf390e0eb74d92cebe8fa15ead5f"},"headline":"Integrating ArcGIS Survey123 with AWS Lambda","datePublished":"2021-05-05T18:00:37+00:00","dateModified":"2021-05-05T18:05:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda"},"wordCount":6,"commentCount":1,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["Amazon Web Services","ArcGIS Enterprise","AWS Lambda","Survey123","Webhooks"],"articleSection":["Administration","Architecture, Engineering, and Construction","Developers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda","name":"Integrating ArcGIS Survey123 with AWS Lambda","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2021-05-05T18:00:37+00:00","dateModified":"2021-05-05T18:05:50+00:00","description":"Walk through an example of how to integrate components of the ArcGIS platform with AWS Lambda to enhance established workflows.","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/survey123\/developers\/integrating-arcgis-survey123-with-aws-lambda#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Integrating ArcGIS Survey123 with AWS Lambda"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/a912bf390e0eb74d92cebe8fa15ead5f","name":"Taylor Teske","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/08\/12000854_10204717383794222_8647597220309105249_o-465x465.jpg","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2020\/08\/12000854_10204717383794222_8647597220309105249_o-465x465.jpg","caption":"Taylor Teske"},"description":"Taylor is a Technical Consultant in Professional Services out of Denver, CO, focusing on integrating the ArcGIS platform with other technologies and systems on-premise and in the cloud.","sameAs":["www.linkedin.com\/in\/taylor-teske-b37aaa71"],"url":""}]}},"text_date":"May 5, 2021","author_name":"Taylor Teske","author_page":false,"custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/04\/Lambda-Blog-Post-Banner-smaller-2.png","primary_product":"ArcGIS Survey123","tag_data":[{"term_id":28321,"name":"Amazon Web Services","slug":"amazon-web-services","term_group":0,"term_taxonomy_id":28321,"taxonomy":"post_tag","description":"","parent":0,"count":3,"filter":"raw"},{"term_id":42301,"name":"ArcGIS Enterprise","slug":"arcgis-enterprise","term_group":0,"term_taxonomy_id":42301,"taxonomy":"post_tag","description":"","parent":0,"count":209,"filter":"raw"},{"term_id":350642,"name":"AWS Lambda","slug":"aws-lambda","term_group":0,"term_taxonomy_id":350642,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":42371,"name":"Survey123","slug":"survey123","term_group":0,"term_taxonomy_id":42371,"taxonomy":"post_tag","description":"","parent":0,"count":65,"filter":"raw"},{"term_id":350622,"name":"Webhooks","slug":"webhooks","term_group":0,"term_taxonomy_id":350622,"taxonomy":"post_tag","description":"","parent":0,"count":12,"filter":"raw"}],"category_data":[{"term_id":37501,"name":"Administration","slug":"administration","term_group":0,"term_taxonomy_id":37501,"taxonomy":"category","description":"","parent":0,"count":422,"filter":"raw"},{"term_id":615021,"name":"Architecture, Engineering, and Construction","slug":"aec","term_group":0,"term_taxonomy_id":615021,"taxonomy":"category","description":"","parent":0,"count":129,"filter":"raw"},{"term_id":738191,"name":"Developers","slug":"developers","term_group":0,"term_taxonomy_id":738191,"taxonomy":"category","description":"","parent":0,"count":420,"filter":"raw"}],"product_data":[{"term_id":36571,"name":"ArcGIS Enterprise","slug":"arcgis-enterprise","term_group":0,"term_taxonomy_id":36571,"taxonomy":"product","description":"","parent":0,"count":972,"filter":"raw"},{"term_id":36551,"name":"ArcGIS Online","slug":"arcgis-online","term_group":0,"term_taxonomy_id":36551,"taxonomy":"product","description":"","parent":0,"count":2419,"filter":"raw"},{"term_id":36691,"name":"ArcGIS Survey123","slug":"survey123","term_group":0,"term_taxonomy_id":36691,"taxonomy":"product","description":"","parent":36591,"count":177,"filter":"raw"},{"term_id":36601,"name":"Developers","slug":"developers","term_group":0,"term_taxonomy_id":36601,"taxonomy":"product","description":"","parent":0,"count":761,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=survey123","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/1207592","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/83632"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=1207592"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/1207592\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=1207592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=1207592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=1207592"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=1207592"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=1207592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}