From 79352c9a625a608c141a48693b577d63c89ba15e Mon Sep 17 00:00:00 2001 From: "Joshua C. Forest" Date: Mon, 5 Feb 2024 15:34:07 -0500 Subject: [PATCH] Theoretically we can remove the rBuildsBatchIamRole because the AWSServiceRoleForBatch will be automatically created if we don't specify a service role for the compute environment --- serverless-resources.yml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/serverless-resources.yml b/serverless-resources.yml index b167262..28ca69b 100644 --- a/serverless-resources.yml +++ b/serverless-resources.yml @@ -6,21 +6,6 @@ rBuildsSecurityGroup: VpcId: ${self:custom.vpcId} Tags: ${self:provider.tagsList} - -rBuildsBatchIamRole: - Type: AWS::IAM::Role - Properties: - Path: /service-role/ - AssumeRolePolicyDocument: - Version: '2012-10-17' - Statement: - - Effect: Allow - Principal: - Service: - - batch.amazonaws.com - Action: sts:AssumeRole - ManagedPolicyArns: - - arn:aws:iam::aws:policy/service-role/AWSBatchServiceRole rBuildsSpotFleetIamRole: Type: AWS::IAM::Role Properties: @@ -103,8 +88,6 @@ rBuildsBatchComputeEnvironment: DependsOn: rBuildsBatchIamRole Properties: Type: MANAGED - ServiceRole: - "Fn::GetAtt": [ rBuildsBatchIamRole, Arn ] ComputeResources: AllocationStrategy: BEST_FIT_PROGRESSIVE LaunchTemplate: @@ -135,6 +118,7 @@ rBuildsBatchComputeEnvironment: MinvCpus: 0 DesiredvCpus: 0 MaxvCpus: 256 + UpdateToLatestImageVersion: true rBuildsBatchJobQueue: Type: AWS::Batch::JobQueue