in feedback-app-frontend/amplify-infra-code/lib/amplify-infra-code-stack.ts [8:50]
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
// The code that defines your stack goes here
const feedbackAppFrontEndRepo = new codecommit.Repository(
this,
"FeedbackAppFrontEndRepo",
{
repositoryName: Constants.code_commit_repo_name,
description: "The repository for the frontend of the feedback app",
}
);
const amplifyRole = new iam.Role(
this,
"Feedback-App-Frontend-AmplifyRole",
{
assumedBy: new iam.ServicePrincipal("amplify.amazonaws.com"),
description: "The to be used by amplify to deploy the application",
roleName: Constants.amplify_role_name,
}
);
const feedbackFrontendApp = new amplify.App(
this,
Constants.amplify_app_name,
{
sourceCodeProvider: new amplify.CodeCommitSourceCodeProvider({
repository: feedbackAppFrontEndRepo,
}),
role: amplifyRole.withoutPolicyUpdates(),
}
);
amplifyRole.addToPolicy(
new iam.PolicyStatement({
actions: ["*"],
resources: ["*"],
})
);
const masterBranch = feedbackFrontendApp.addBranch("master");
}