https://github.com/edgee-cloud/amazon-s3-component
Amazon S3 Edgee Component
https://github.com/edgee-cloud/amazon-s3-component
Last synced: 2 months ago
JSON representation
Amazon S3 Edgee Component
- Host: GitHub
- URL: https://github.com/edgee-cloud/amazon-s3-component
- Owner: edgee-cloud
- License: apache-2.0
- Created: 2025-01-31T11:00:49.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-27T17:36:03.000Z (3 months ago)
- Last Synced: 2025-03-11T07:45:31.698Z (2 months ago)
- Language: Rust
- Size: 50.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Amazon S3 component for Edgee
[](https://coveralls.io/github/edgee-cloud/amazon-s3-component)
[](https://github.com/edgee-cloud/amazon-s3-component/issues)
[](https://www.edgee.cloud/edgee/amazon-s3-component)This component enables seamless integration between [Edgee](https://www.edgee.cloud) and [Amazon S3](https://aws.amazon.com/s3/), allowing you to collect and forward analytics events to your data lake on S3.
## Quick Start
1. Download the latest component version from our [releases page](../../releases)
2. Place the `s3.wasm` file in your server (e.g., `/var/edgee/components`)
3. Add the following configuration to your `edgee.toml`:```toml
[[destinations.data_collection]]
id = "amazon-s3"
file = "/var/edgee/components/s3.wasm"
settings.aws_access_key = "YOUR_AWS_ACCESS_KEY"
settings.aws_secret_key = "YOUR_AWS_SECRET_KEY"
settings.aws_region = "YOUR_AWS_REGION"
settings.s3_bucket = "YOUR_S3_BUCKET_NAME"
```## Event Handling
### Event Mapping
The component maps Edgee events to S3 objects as follows:| Edgee Event | S3 object | Description |
|-------------|----------------|-------------|
| Page | `{bucket}/{prefix}{random-key}.json` | Full JSON dump of the Page event |
| Track | `{bucket}/{prefix}{random-key}.json` | Full JSON dump of the Track event |
| User | `{bucket}/{prefix}{random-key}.json` | Full JSON dump of the User event |## Configuration Options
### Basic Configuration
```toml
[[destinations.data_collection]]
id = "amazon-s3"
file = "/var/edgee/components/s3.wasm"
settings.aws_access_key = "YOUR_AWS_ACCESS_KEY"
settings.aws_secret_key = "YOUR_AWS_SECRET_KEY"
settings.aws_region = "YOUR_AWS_REGION"
settings.s3_bucket = "YOUR_S3_BUCKET_NAME"# Optional configurations
settings.aws_session_token = "YOUR_AWS_SESSION_TOKEN" # Useful for tests, not recommended in prod since it's short-lived
settings.s3_key_prefix = "sub-folder/" # Optional prefix for all S3 objects
```### Event Controls
Control which events are forwarded to S3:
```toml
settings.edgee_page_event_enabled = true # Enable/disable page view tracking
settings.edgee_track_event_enabled = true # Enable/disable custom event tracking
settings.edgee_user_event_enabled = true # Enable/disable user identification
```## Development
### Building from Source
Prerequisites:
- [Rust](https://www.rust-lang.org/tools/install)
- wit-deps: `cargo install wit-deps`Build command:
```bash
edgee component build
```Test command:
```bash
make test
```Test coverage command:
```bash
make test.coverage[.html]
```### Contributing
Interested in contributing? Read our [contribution guidelines](./CONTRIBUTING.md)### Security
Report security vulnerabilities to [[email protected]](mailto:[email protected])