:doc:`Greengrass <../../greengrass>` / Client / associate_service_role_to_account

*********************************
associate_service_role_to_account
*********************************



.. py:method:: Greengrass.Client.associate_service_role_to_account(**kwargs)

  Associates a role with your account. AWS IoT Greengrass will use the role to access your Lambda functions and AWS IoT resources. This is necessary for deployments to succeed. The role must have at least minimum permissions in the policy ''AWSGreengrassResourceAccessRolePolicy''.

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/AssociateServiceRoleToAccount>`_  


  **Request Syntax**
  ::

    response = client.associate_service_role_to_account(
        RoleArn='string'
    )
    
  :type RoleArn: string
  :param RoleArn: **[REQUIRED]** The ARN of the service role you wish to associate with your account.

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'AssociatedAt': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* success
      

      - **AssociatedAt** *(string) --* The time when the service role was associated with the account.
  
  **Exceptions**
  
  *   :py:class:`Greengrass.Client.exceptions.BadRequestException`

  
  *   :py:class:`Greengrass.Client.exceptions.InternalServerErrorException`

  