Globals: Function: AutoPublishAlias: live DeploymentPreference: Type: AllAtOnce Resources: MinimalFunction: Type: AWS::Serverless::Function Properties: CodeUri: s3://sam-demo-bucket/hello.zip Handler: hello.handler Runtime: python2.7 FunctionWithRole: Type: AWS::Serverless::Function Properties: CodeUri: s3://sam-demo-bucket/hello.zip Handler: hello.handler Runtime: python2.7 Role: !GetAtt DeploymentRole.Arn DeploymentRole: Type: AWS::IAM::Role Properties: ManagedPolicyArns: - arn:aws:iam::aws:policy/service-role/AWSCodeDeployRole AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - Action: - sts:AssumeRole Effect: Allow Principal: Service: - codedeploy.amazonaws.com