()
| 108 | |
| 109 | #[tokio::main] |
| 110 | async fn main() -> Result<(), Error> { |
| 111 | // required to enable CloudWatch error logging by the runtime |
| 112 | tracing::init_default_subscriber(); |
| 113 | |
| 114 | let shared_config = aws_config::load_from_env().await; |
| 115 | let client = S3Client::new(&shared_config); |
| 116 | let client_ref = &client; |
| 117 | |
| 118 | let func = service_fn(move |event| async move { function_handler(event, 128, client_ref).await }); |
| 119 | |
| 120 | run(func).await?; |
| 121 | |
| 122 | Ok(()) |
| 123 | } |
| 124 | |
| 125 | #[cfg(test)] |
| 126 | fn get_thumbnail(vec: Vec<u8>, _size: u32) -> Result<Vec<u8>, String> { |
nothing calls this directly
no test coverage detected