Posts

Showing posts with the label SNS

Terraform - Automation of S3 event notification to SNS

Image
  This is an automation of  https://rsinfomindss.blogspot.com/2023/04/aws-s3-bucket-event-notification.html via terraform. We will start below modules: 1) Creating an S3 bucket. 2) Creating SNS topics. 3) Creating an SNS topic subscription. 4) Creating S3 bucket notification - Event notification for all S3 events. While applying you may get 400 errors and it means IAM policy issue with SNS Publish on the S3 service. We will start with provider configuration. terraform {   required_providers {     aws = {       source   = "hashicorp/aws"       #version = "~> 3.21" # Optional but recommended in production     }   } } provider "aws" {     region = "us-east-1"   } # Creating a S3 bucket module "s3_bucket" {     source = "terraform-aws-modules/s3-bucket/aws"     bucket = "rsinfominds"     versioning = {         enabled = true ...