Matt Levine
07/25/2023, 1:14 AMAWS_CONTAINER_CREDENTIALS_RELATIVE_URI and makes them available for Application.cfc level params. However, haven’t quite got the permissions to work as expected. Is there a gotcha that makes it all now work?gavinbaumanis
07/25/2023, 1:56 AM//read up on how how to use the AWS CLI if you don't already know
//Access the secrets manager
aws_secrets=$(aws secretsmanager get-secret-value ... )
//Get the DB Password.
db_secretstring=$(echo $aws_secrets | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["SecretString"]')
db_password=$(echo $db_secretstring | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["password"]')
With the above there is now a system environment variable "db_password"
And we access it in code with the server.system.environment scope.Matt Levine
07/25/2023, 2:02 AMMatt Levine
07/25/2023, 2:02 AMpaul
07/25/2023, 2:06 AMpaul
07/25/2023, 2:07 AMDean
07/25/2023, 5:51 AMdougcain
07/25/2023, 8:18 AMMatt Levine
07/25/2023, 4:50 PM<http://169.254.170.2>$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
from within the container. So I have keys. It’s just that for some reason the retrieved keys are not useful.Matt Levine
07/25/2023, 4:56 PMToken value that is returned from the same `
<http://169.254.170.2>$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
endoint.Matt Levine
07/25/2023, 4:58 PMjamiejackson
07/25/2023, 6:31 PMDean
07/25/2023, 8:30 PMSo it may be that missing token and not keys that stops it from workingYes, this. Lucee doesnt have the ability to natively use temporary credentials (though, we have looked at the source code and it wouldnt be a stretch to fix that, considering it uses the AWS Java libraries) We rely heavily on S3 for storage and aws-cfml works great