https://kotlinlang.org logo
#kotless
Title
# kotless
g

gumil

06/19/2020, 6:26 PM
is there a way to add environment variables automatically in AWS lambda through kotless?
t

TanVD

06/19/2020, 6:32 PM
Yep:
Copy code
kotless {
    webapp {
        lambda {
            environment = hashMapOf("key" to "value")
        }
    }
}
Environment map would be passed as environment variables to lambda funciton
Also Kotless supports SSM integration which I would consider more preferable approach 🙂
g

gumil

06/19/2020, 6:34 PM
i'm quite new to the backend stuff and AWS, but what is SSM integration?
t

TanVD

06/19/2020, 6:43 PM
I mean AWS Parameter Store -- https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html . It is manged solution for keeping parameters and secrets. Kotless support permission generation for it
But if you are new to AWS environment variables are simpler 🙂
g

gumil

06/19/2020, 7:10 PM
yeah, i think i'd go for the env variables for now. thanks for the help
👍 1
h

Hakon Grotte

02/04/2022, 12:17 PM
@TanVD Is there any documentation/examples with Kotless + AWS Parameter Store out there? 🙂
t

TanVD

02/04/2022, 12:28 PM
Hm, there was an example for shortener with ssm parameters, but not right now 🙂
@SSMParameters
does not work?
5 Views