# clouddevopshub/image-resizing-project-on-aws architecture

> Architecture diagram of the GitHub repository clouddevopshub/image-resizing-project-on-aws, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/clouddevopshub/image-resizing-project-on-aws
- Repository: https://github.com/clouddevopshub/image-resizing-project-on-aws

## Overview

This repository provisions a serverless image-resizing service. A user uploads an original image to the source S3 bucket; an S3 event invokes Lambda, which resizes the image, stores the result in a destination bucket, and publishes a notification to SNS for email delivery. The graph includes the documented IAM execution role and permissions. Source excerpts were not available, so relationships are limited to those stated in the README; Terraform resource details are not independently verified.

Main entry points: [`lambda-function.tf`](https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/lambda-function.tf) (Resize function), [`s3-bucket.tf`](https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/s3-bucket.tf) (Source bucket), [`sns-topic.tf`](https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/sns-topic.tf) (SNS topic), [`iam-role.tf`](https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/iam-role.tf) (Lambda execution role)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storage["Image storage"]
  node_source_bucket[("Source bucket<br/>[s3-bucket.tf]")]
  node_destination_bucket[("Destination bucket<br/>[s3-bucket.tf]")]
end

subgraph group_processing["Image processing"]
  node_lambda["Resize function<br/>[lambda-function.tf]"]
end

subgraph group_notifications["Notifications"]
  node_sns["SNS topic<br/>[sns-topic.tf]"]
  node_email(("Email subscriber"))
end

subgraph group_security["Access control"]
  node_iam_role["Lambda execution role<br/>[iam-role.tf]"]
  node_iam_policy["S3 and SNS permissions<br/>[iam-policy.tf]"]
end

node_user(("Image uploader"))

node_user -->|"uploads image"| node_source_bucket
node_source_bucket -->|"triggers"| node_lambda
node_lambda -->|"reads original"| node_source_bucket
node_lambda -->|"stores resized image"| node_destination_bucket
node_lambda -->|"publishes result"| node_sns
node_sns -->|"sends notification"| node_email
node_lambda -->|"uses execution role"| node_iam_role
node_iam_role -->|"has permissions"| node_iam_policy

click node_source_bucket "https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/s3-bucket.tf"
click node_lambda "https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/lambda-function.tf"
click node_destination_bucket "https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/s3-bucket.tf"
click node_sns "https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/sns-topic.tf"
click node_iam_role "https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/iam-role.tf"
click node_iam_policy "https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/iam-policy.tf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_source_bucket,node_destination_bucket toneBlue
class node_lambda toneAmber
class node_sns,node_email toneMint
class node_iam_role,node_iam_policy toneRose
class node_user toneIndigo
```

## Components

### Image storage

- [Source bucket](https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/s3-bucket.tf): `s3-bucket.tf`
- [Destination bucket](https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/s3-bucket.tf): `s3-bucket.tf`

### Image processing

- [Resize function](https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/lambda-function.tf): `lambda-function.tf`

### Notifications

- [SNS topic](https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/sns-topic.tf): `sns-topic.tf`
- **Email subscriber**

### Access control

- [Lambda execution role](https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/iam-role.tf): `iam-role.tf`
- [S3 and SNS permissions](https://github.com/clouddevopshub/image-resizing-project-on-aws/blob/main/iam-policy.tf): `iam-policy.tf`

### Other components

- **Image uploader**

## Connections

- Image uploader → Source bucket: uploads image (evidence: `README.md`)
- Source bucket → Resize function: triggers (evidence: `README.md`)
- Resize function → Source bucket: reads original (evidence: `README.md`)
- Resize function → Destination bucket: stores resized image (evidence: `README.md`)
- Resize function → SNS topic: publishes result (evidence: `README.md`)
- SNS topic → Email subscriber: sends notification (evidence: `README.md`)
- Resize function → Lambda execution role: uses execution role (evidence: `README.md`)
- Lambda execution role → S3 and SNS permissions: has permissions (evidence: `README.md`)
