def _create_identifier(factory_self, identifier, resource_name):
        """
        Creates a read-only property for identifier attributes.
        """

        def get_identifier(self):
            # The default value is set to ``None`` instead of
            # raising an AttributeError because when resources are
            # instantiated a check is made such that none of the
            # identifiers have a value ``None``. If any are ``None``,
            # a more informative user error than a generic AttributeError
            # is raised.
            return getattr(self, '_' + identifier.name, None)

        get_identifier.__name__ = str(identifier.name)
        get_identifier.__doc__ = docstring.IdentifierDocstring(
            resource_name=resource_name,
            identifier_model=identifier,
            include_signature=False,
        )

        return property(get_identifier)

        Creates a read-only property for identifier attributes.
        
boto3/resources/factory.py