This is a simples AWS Lambda built with c# which is triggered by a change on DynamoDb.
- ✔️ .NET 8
- ✔️ AWS Lambda
- ✔️ Terraform
- ✔️ Unit tests
- ✔️ DynamoDb table
- ✔️ Github Action to run tests
- Create an IAM user on your AWS account with the roles
AWSLambda_FullAccess
,AmazonDynamoDBFullAccess
andIAMFullAccess
and generate an access key to it; - Install all the requirements;
- Configure your AWS CLI with the access key using
aws configure
; - Pack the lambda using
cd src/Holtz.Lambda.DynamoDb/ && dotnet lambda package -o ./publish/HoltzLambdaDynamoDb.zip && cd ../../
- Initialize your terraform using
terraform init
(Make sure you're in the folder{...}/Holtz/Holtz.Lambda.DynamoDb/
); - Apply your terraform using
terraform apply
(you need to verify carefully and type "yes" and only then the resources will be created on AWS).
After playing around with the application you'll want to teardown everything. To remove all AWS-related resources you just need to run terraform destroy
, verify and confirm it.
Also you should want to remove the user and/or its access key.
aws configure
aws dynamodb list-tables