Skip to content

Commit fad01c9

Browse files
committed
setting CRYPTEIA_DEBUG i noticed its running so trying to see if i can do something outside lambda
1 parent 2715f11 commit fad01c9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/main.rs

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ const ENV_FILE: &str = "/tmp/crypteia.json";
1010
#[tokio::main]
1111
async fn main() -> Result<(), Error> {
1212
log::cloudwatch_metric("main", "initialized", false, None);
13+
14+
if std::env::var("AWS_LAMBDA_FUNCTION_NAME").is_err() {
15+
log::cloudwatch_metric("main", "running_outside_lambda", false, None);
16+
println!("Running outside of AWS Lambda environment.");
17+
}
1318
let env_vars: HashMap<String, String> = std::env::vars().collect();
1419
let env_map = ssm::get_envs(env_vars).await?;
1520
log::cloudwatch_metric("main", "fetched", false, None);

0 commit comments

Comments
 (0)