Reputation: 2238
I want to use certificate based authentication in AWS Lambda to generate oauth tokens.
Currently I am storing the certificates and private keys
locally and running it like a normal java application.
I am planning to use AWS Secrets manager
to store these certificates and keys. However the issue is since we are using terraform
to provision AWS
resources, it seems like we will have to keep these certs and keys in our bitbucket
repo which will have security risks. Is there any other way I can use these certificates in AWS lambda
without actually storing them in bitbucket
repo?
Upvotes: 0
Views: 999
Reputation: 200527
The Terraform aws_secretsmanager_secret_version
resource takes a string value, but that doesn't mean you have to hard-code the string inside that resource. You need to think about how you can read that key value into Terraform and reference it inside the resource.
For example, that string could come from a local file, or an S3 object. Terraform could also generate the TLS key for you.
Upvotes: 1