A collection of AWS Lambdas to continuously update a Hubspot account.
For the setup script to work correctly, lambdas must follow this folder structure:
lambdas
├── lambda1
│ ├── main.py
│ └── requirements.txt
└── lambda2
├── main.py
└── requirements.txt
- AWS CLI already configured with Administrator permission
- Terraform installed
- Python 3 installed
- Docker installed
Invoking function locally using a local sample payload
sam local invoke DaisyCustomerUpload --event event.json
Invoking function locally through local API Gateway
sam local start-api
Deployment is carried out using Terraform.
Running the setup.sh
script with the following parameters will build the project according to a strict directory layout.
./setup.sh <ftp_username> <ftp_password>
e.g.
./setup.sh OVR90120 fqfgsflusgfkqwg
Ensure your AWS Credentials file has a user specified that has permissions to write to the S3 bucket and DynamoDB Table. More permissions are often needed, these are stored in [deployment/iam/terraform-role.role]
Navigate to the terraform
folder and initialise Terraform
terraform init
Plan the Terraform to see what will be created.
terraform plan
Apply the Terraform to create the infrastructure.
terraform apply