@@ -155,7 +155,7 @@ export interface AppProps {
155
155
* The IAM service role to associate with the application. The App
156
156
* implements IGrantable.
157
157
*
158
- * @default - a new role is created
158
+ * @default - a new role is created with the AdministratorAccess-Amplify managed policy attached
159
159
*/
160
160
readonly role ?: iam . IRole ;
161
161
@@ -224,6 +224,7 @@ export class App extends Resource implements IApp, iam.IGrantable {
224
224
225
225
const role = props . role || new iam . Role ( this , 'Role' , {
226
226
assumedBy : new iam . ServicePrincipal ( 'amplify.amazonaws.com' ) ,
227
+ managedPolicies : [ iam . ManagedPolicy . fromAwsManagedPolicyName ( 'AdministratorAccess-Amplify' ) ] ,
227
228
} ) ;
228
229
this . grantPrincipal = role ;
229
230
@@ -239,7 +240,7 @@ export class App extends Resource implements IApp, iam.IGrantable {
239
240
buildSpec : props . autoBranchCreation . buildSpec && props . autoBranchCreation . buildSpec . toBuildSpec ( ) ,
240
241
enableAutoBranchCreation : true ,
241
242
enableAutoBuild : props . autoBranchCreation . autoBuild ?? true ,
242
- environmentVariables : Lazy . any ( { produce : ( ) => renderEnvironmentVariables ( this . autoBranchEnvironmentVariables ) } , { omitEmptyArray : true } ) , // eslint-disable-line max-len
243
+ environmentVariables : Lazy . any ( { produce : ( ) => renderEnvironmentVariables ( this . autoBranchEnvironmentVariables ) } , { omitEmptyArray : true } ) , // eslint-disable-line max-len
243
244
enablePullRequestPreview : props . autoBranchCreation . pullRequestPreview ?? true ,
244
245
pullRequestEnvironmentName : props . autoBranchCreation . pullRequestEnvironmentName ,
245
246
stage : props . autoBranchCreation . stage ,
0 commit comments