Tobias T
05/30/2022, 12:43 PMThomas Ankcorn
05/30/2022, 12:54 PM@aws
pragma in your .arc file
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.PolicyStatement.html
https://arc.codes/docs/en/reference/project-manifest/aws#examplesTobias T
05/30/2022, 12:55 PMTobias T
05/30/2022, 1:21 PMconst policy = new iam.ManagedPolicy(this, "AuthPolicy", {
statements: [
new iam.PolicyStatement({
effect: iam.Effect.ALLOW,
actions: ["cognito-idp:AdminCreateUser"],
resources: [auth.userPoolArn],
}),
],
});
Do I attach this policy to the app
in my index.ts ?Tobias T
05/30/2022, 2:44 PMThomas Ankcorn
05/30/2022, 3:31 PMThomas Ankcorn
05/30/2022, 3:32 PMTobias T
05/30/2022, 3:39 PMauth.cdk.unauthRole.addToPolicy(
new iam.PolicyStatement({
effect: iam.Effect.ALLOW,
actions: ["cognito-idp:AdminCreateUser"],
resources: [auth.userPoolArn],
}),
);
Tobias T
05/30/2022, 3:40 PMjustindra
05/30/2022, 4:01 PMTobias T
05/30/2022, 4:15 PMTobias T
05/30/2022, 4:19 PMThomas Ankcorn
05/30/2022, 4:30 PMjustindra
05/30/2022, 5:05 PMKlaus
05/30/2022, 7:04 PMfn
is a reference to your function, you could follow the examples above