Closed gcottrell1 closed 6 years ago
The reason being for the above is if we wanted to use different accounts with specific limited permissions (e.g. one for Lex and one for DynamoDB).
Ahh right, so eventstore uses the aws-sdk and that pulls the access key id and secret access key from the environment config. I will have a look into how we could prevent it from doing this automatically
As I read yesterday, the norm when using multiple AWS services with different users is to do say:
const s3 = AWS.S3({region:"us-east-1", accessKeyId="1234..."});
const ec2 = AWS.EC2({region:"us-west-2", accessKeyId="5678..."});
so eventstore automatically pulling them from environment config could cause some issues
Looks like we may just be able to pass that configuration into the hash based on https://github.com/adrai/node-eventstore/blob/21e0fbfb2dcd58b47c79500f82d770de2770181a/lib/databases/dynamodb.js#L39. It isn't documented but based on reading the code I think it will work.
Is this something you want to me to implement/try out now or are you just thinking for the future?
We can hold off for now
Is there a way to set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY values with this?