Skip to content

Commit

Permalink
setting CRYPTEIA_DEBUG i noticed its running so trying to see if i ca…
Browse files Browse the repository at this point in the history
…n do something outside lambda
  • Loading branch information
jeremiahlukus committed Jun 14, 2024
1 parent 2715f11 commit fad01c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ const ENV_FILE: &str = "/tmp/crypteia.json";
#[tokio::main]
async fn main() -> Result<(), Error> {
log::cloudwatch_metric("main", "initialized", false, None);

if std::env::var("AWS_LAMBDA_FUNCTION_NAME").is_err() {
log::cloudwatch_metric("main", "running_outside_lambda", false, None);
println!("Running outside of AWS Lambda environment.");
}
let env_vars: HashMap<String, String> = std::env::vars().collect();
let env_map = ssm::get_envs(env_vars).await?;
log::cloudwatch_metric("main", "fetched", false, None);
Expand Down

0 comments on commit fad01c9

Please sign in to comment.