Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
statements: [
new PolicyStatement({
actions: ["rds-data:*"],
resources: [
`arn:aws:rds:${this.region}:${this.account}:cluster:${DB_CLUSTER_ID}*`,
`arn:aws:rds:${this.region}:${this.account}:cluster:${DB_CLUSTER_ID}2*`
]
}),
new PolicyStatement({
actions: ["secretsmanager:*"],
resources: [`${secret.ref}*`, `${secret2.ref}*`]
})
]
});
user.attachInlinePolicy(policy);
const key = new CfnAccessKey(this, "TestUserKey", {
userName: user.userName
});
new CfnOutput(this, "AASAUserAccessKeyId", {
value: key.ref
});
new CfnOutput(this, "AASAUserSecretAccessKey", {
value: key.attrSecretAccessKey
});
}
}