This sample code is part of AWS Database Blog Access Amazon Location Service from Amazon Aurora. It creates and configures a Lambda function to geocode address data stored in Amazon Aurora using Amazon Location Service. Please refer to the blog for solution details.
- Run the CloudFormation template
geocode-lambda-aurora.yml
to create the solution stack. The template requires Amazon Aurora cluster identifier. - Use
CreateFunction.sql
to create the Lambda user-defined function in Amazon Aurora cluster. Replace the placeholders<GEOCODE_LAMBDA_FUNCTION_NAME>
with actual value provided in the CloudFormation stack output. - Use
CreateTable.sql
to create customer_address table with the fields required to geocode address data. Load customer address data in this table. - Run the sample SQL queries provided in the blog to geocode address data.
geocode.py
Common module containing geocode_address function
lambda_function.py
Event handler for RDS invocation
CreateFunction.sql
Lambda UDF to call GeocodeAddress-Aurora Lambda function
CreateTable.sql
Customer Address table
geocode-lambda-aurora.yml
CloudFormation template to configure solution resources - Place index, Lambda functions and IAM permissions