main.tf

1. Set Up the IAM Roles and Policies

  • Add IAM Role and IAM Policy

  • Attach IAM Policy to IAM Role

2. lambda python function : battery_health_lambda.py

3. Create a Zip of python application

4. Add aws_lambda_function function

5. Run and execute terraform main.tf

  • terraform init

  • terraform plan

  • terraform apply

6. Verify the lambda function from AWS console