C2_W3_lab2 Practice Lab 2: Implementing Monitoring with Amazon CloudWatch

Hello ,

I’m encountering an issue while running the Terraform configuration for setting up the SNS Topic Subscription in the cloudwatch.tf file. Each time I execute the Terraform plan or apply commands, I receive the following error:│ Error: creating SNS Topic Subscription: operation error SNS: Subscribe, https response error StatusCode: 400, RequestID: fe1b7653-6ba4-51a7-ac5c-163fe5ccb089, InvalidParameter: Invalid parameter: Email address
│ with module.monitoring.aws_sns_topic_subscription.cloudwatch_email_sub,
│ on modules/monitoring/cloudwatch.tf line 119, in resource “aws_sns_topic_subscription” “cloudwatch_email_sub”:
│ 119: resource “aws_sns_topic_subscription” “cloudwatch_email_sub” {
It appears that the email address parameter for the SNS subscription is being flagged as invalid. I’ve double-checked the email format and ensured that the notification_email variable contains a valid email address, but the issue persists.

Could you kindly assist in identifying and resolving the problem?

Thank you for your support!

Best regards,

Hello @gjulmiste,

I couldn’t reproduce your issue, but if there was an invalid email format you would get different errors with terraform init. In your case you get this error when trying to deploy resources with terraform apply. You could try in a new lab session or submit this form for a lab refresh. Note, it takes 2 business days to complete Thank you