File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ resource "aws_lambda_permission" "api_gateway" {
3434resource "aws_apigatewayv2_route" "contact" {
3535 api_id = aws_apigatewayv2_api. portfolio . id
3636 route_key = " POST /api/contact"
37- target = " integration /${ aws_apigatewayv2_integration . contact . id } "
37+ target = " integrations /${ aws_apigatewayv2_integration . contact . id } "
3838
3939 depends_on = [aws_apigatewayv2_integration . contact ]
4040}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ data "archive_file" "lambda_placeholder" {
33 output_path = " ${ path . module } /lambda_placeholder.zip"
44
55 source {
6- content = " def handler(event, contact ): return {'statusCode': 200, 'body': 'placeholder'}"
6+ content = " def handler(event, context ): return {'statusCode': 200, 'body': 'placeholder'}"
77 filename = " handler.py"
88 }
99}
@@ -18,8 +18,8 @@ resource "aws_lambda_function" "contact" {
1818
1919 environment {
2020 variables = {
21- SENDER_EMAIL = var.sender_email
22- RECIPENT_EMAIL = var.recipient_email
21+ SENDER_EMAIL = var.sender_email
22+ RECIPIENT_EMAIL = var.recipient_email
2323 }
2424 }
2525
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ def handler(event, context):
2828 ses .send_email (
2929 Source = sender ,
3030 Destination = {
31- 'ToAddress ' : [reciepient ]
31+ 'ToAddresses ' : [reciepient ]
3232 },
3333 Message = {
3434 'Subject' : {
You can’t perform that action at this time.
0 commit comments