millions-furniture-75402
08/11/2020, 2:29 PMdelightful-controller-41497
08/11/2020, 2:35 PMmillions-furniture-75402
08/11/2020, 2:38 PMdelightful-controller-41497
08/11/2020, 2:42 PMmillions-furniture-75402
08/11/2020, 2:46 PMconst appLogRole = new aws.iam.Role(`${appName}-log-role`, {
assumeRolePolicy: `{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "<http://apigateway.amazonaws.com|apigateway.amazonaws.com>"
},
"Effect": "Allow",
"Sid": ""
}
]
}`,
});
const appLogPolicyAttachment = new aws.iam.RolePolicyAttachment(
`${appName}-log-ra`,
{
role: appLogRole,
policyArn: aws.iam.ManagedPolicies.AmazonAPIGatewayPushToCloudWatchLogs,
},
{ parent: appLogRole }
);
const appApiSettings = new aws.apigateway.Account(`${appName}-api-settings`, {
cloudwatchRoleArn: appLogRole.arn
});